Decoding the RPi serial number


30 posts   Page 2 of 2   1, 2
by henkwiedig » Thu Jul 26, 2012 10:08 pm
1303594640 looks like an epoch timestamp to me
Posts: 1
Joined: Thu Jul 26, 2012 10:05 pm
by AndrewS » Fri Jul 27, 2012 10:48 am
henkwiedig wrote:1303594640 looks like an epoch timestamp to me

Interesting theory, but that timestamp equates to April 2011 (before Pis started being manufactured), and the serial number on my Pi equates to a timestamp of November 2030 ;)
User avatar
Posts: 2808
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by AndrewS » Fri Jul 27, 2012 12:08 pm
Just been doing some interesting investigation :geek: 8-)
Found the
Code: Select all
/opt/vc/bin/vcgencmd otp_dump
option, which I'm assuming dumps the 256 bytes of OneTimeProgrammable memory stored inside the BCM2835 (doesn't display the first 28 bytes for some reason), formatted as 4-bytes per line. Most of them are zero, but line 28: contains the serial number of my RPi :)
So can everyone looking at this thread confirm that:
Code: Select all
cat /proc/cpuinfo | grep ^Serial | cut -d: -f2
and:
Code: Select all
/opt/vc/bin/vcgencmd otp_dump | grep ^28: | cut -d: -f2
print out the same number? Seems like the RPi's serial number is 32-bit, even though /proc/cpuinfo displays it as 64-bit (i.e. with eight leading zeros).
User avatar
Posts: 2808
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by Vanguard » Fri Jul 27, 2012 2:19 pm
Yup, both the same serial on those commands.
Posts: 2
Joined: Sun Mar 04, 2012 11:24 pm
Location: Stockport
by alexeames » Sat Jul 28, 2012 12:26 pm
AndrewS wrote:So can everyone looking at this thread confirm that:
Code: Select all
cat /proc/cpuinfo | grep ^Serial | cut -d: -f2
and:
Code: Select all
/opt/vc/bin/vcgencmd otp_dump | grep ^28: | cut -d: -f2
print out the same number?


Yep. The second one doesn't have the leading zeros.
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2054
Joined: Sat Mar 03, 2012 11:57 am
Location: UK