Serial number or any unique identifier

Started by shug, April 02, 2014, 11:44:24 AM

Previous topic - Next topic

shug

Hi all,
do you known if each A20 boards have a serial number or a something like a unique identifier ?
I would like to identify each board on my network (not using lac address has it can be changed)
Thanks !

laskov

You may put a file in /etc (or somewhere else: /, /root, /home/olimex) with a description you like or change hostname of the boards by editing /etc/hostname and /etc/hosts. After that start /etc/init.d/hostname.sh and reboot. If boards are in the same network you must change their hostnames to avoid conflicts, I think.

shug

Thanks for your reply.
Of course I can put a file on the board filesystem but I'll have to deploy 250 of them and I don't want a specific SD card for each with the dedicated file.

laskov

So you must use DHCP server to assign IPs and hostnames.

shug

Yes I known but this is not my problem. I just my boards to say "I'm board with identified by ###" without taking care about the network name or ip or mac address.

dave-at-axon

Hi Shug,

I checked the A20 documents and there is apparently now unique ID in the processor and nothing else within the A20 design would have either. As you said, the Ethernet MAC can be changed so that's not much use.

An option you could consider is to have a small PCB made up that plugs into one of the UEXT connections and uses the following I2C serial device.

http://www.maximintegrated.com/datasheet/index.mvp/id/5248

laskov

#6
Something like #!/bin/bash
if [! -f /etc/board_ID]; then echo $RANDOM > /etc/board_ID; echo -n "Hi! I'm board with identifier "; cat /etc/board_ID; fi
or the second line only in /etc/rc.local

This will make a file with a random number at first boot and will send to you "Hi! I'm board with identifier ###". You may save its number.

BTW you can configure DHCP to assign uniform IP based on MAC address.

N8body

#7
According to
http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf
(Page : 237)
There is a Security Key which can be programmed.
There are some information here :
http://linux-sunxi.org/SID_Register_Guide

If you use a SDCard,you can just use the Serial Number of it:
http://blog.bones-embedded.ch/read-sd-card-serial-number-from-cid/

dave-at-axon

Quote from: N8body on April 03, 2014, 11:11:08 AM
There is a Security Key which can be programmed.

That is the issue that the original poster already indicated. He does not want to have to programme each device before use. He needs a unique number on the device without having to programme each device prior to using it.

I think his only option is to have something like the Maxim part I described.