henkwiedig
Posts: 1
Joined: Thu Jul 26, 2012 10:05 pm

Re: Decoding the RPi serial number

Thu Jul 26, 2012 10:08 pm

1303594640 looks like an epoch timestamp to me

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Decoding the RPi serial number

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
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Decoding the RPi serial number

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).

Vanguard
Posts: 2
Joined: Sun Mar 04, 2012 11:24 pm
Location: Stockport
Contact: Website

Re: Decoding the RPi serial number

Fri Jul 27, 2012 2:19 pm

Yup, both the same serial on those commands.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Decoding the RPi serial number

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, RasP.iO

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 26 guests