7

I've a bunch of ARM devices. They don't differ in hardware. Can I somehow obtain a unique ID for each device without using MAC-address? This ID must stay the same even if I reflash the NAND with a new kernel and rootfs. Its hardware based on the Atmel AT91SAM9.

4
  • 1
    Why not use the MAC address which is made exactly for that? May 13, 2016 at 19:05
  • 1
    @JuliePelletier Because it is not a reliable method. In several ARM SBCs when loading the boot confs and firmware files, you end up with the same default MAC. May 13, 2016 at 20:43
  • What kind of ARM device? There's no standard device identifier, each manufacturer makes their own. May 13, 2016 at 22:18
  • @Gilles Updated question.
    – OrangeTux
    May 14, 2016 at 11:28

1 Answer 1

7

Get the serial of the device from /proc/cpuinfo

grep Serial /proc/cpuinfo 
Serial      : 1651660a0642ebb0

(taken from my A20 based SoC, Lamobo R1 aka Banana Pi R1 and ArmBian/Jessie with kernel 4.5.2)

grep Serial /proc/cpuinfo 
Serial          : 64355040058f0d000000

(taken from my H3 based Soc, Orange Pi One with Armbian/Jessie kernel 3.4)

Getting Your Raspberry Pi Serial Number Using Python

About this serial number : It is supposed to be unique, but it is read differently on different SoCs. And sometimes either software or configurations fail.

SID Register Guide

Few use cases for the SID are, but not limited to:
- Generate per-device unique MAC address
- Store/use as an RSA etc key
- Write in-house serial numbers

In the raspberry this number is generally used as a SN to buy a video codec license. It is also known that the reading can fail when u-boot is not properly configured.

Not all ARM SoCs support this functionality. As per the updated question, the Atmel AT91SAM9 seems to not have this functionality. However, I will leave this answer here for others searching for it.

5
  • 5
    This isn't available on all ARM devices, and some devices with a Serial entry in /proc/cpuinfo don't actually populate it properly — my Banana Pis just say Serial : 0000000000000000. May 13, 2016 at 20:45
  • @StephenKitt Lamobo/ Banana PI R1 here with ArmBian, and working. I could swear it is a u-boot/Linux configuration matter for it to show. I will double check with a workmate that has one too. Out of curiosity, which distro? May 13, 2016 at 20:59
  • @RuiFRibeiro I'm using Debian Stretch. May 13, 2016 at 21:01
  • Like @StephenKitt already mentions. The serial can be 000000000 which is true in my case.
    – OrangeTux
    May 14, 2016 at 11:28
  • I googled around, and also confirmed it with someone more knowledgeable int the armbian forum, tkaiser). No word yet from my workmate with the plain Banana Pi May 15, 2016 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.