3

I want to find the unique ID of a Raspberry Pi (BCM2835/2836/2837), without using kernel lookup.

Can anyone give me the memory address of the device serial number?

Before anyone suggests how to do it using kernel, I already know how to get the serial number that way. I want the bare metal method which I have not been able to find anywhere (I did check the kernel source but that is rather convoluted and obfuscated and looks like a huge effort to trace back).

Surely there must be a memory address or some registers I can easily set to return the serial number, or is it a Videocore function and not accessible via ARM memory access without using mailbox?

1 Answer 1

3

The serial can be read by querying mailbox 0 channel 8 with the tag 0x00010004 as described here in the Raspberry Pi firmware wiki. The serial number is returned as a uint64 variable.

Get board serial

  • Tag: 0x00010004
  • Request:
    • Length: 0
  • Response:
    • Length: 8
    • Value:
      • u64: board serial
4
  • Thankyou for answer, I maybe did not ask my question properly as I really want is memory address to check to find serial number. I find this link : raspberrypi.org/forums/viewtopic.php?f=72&t=98085 and the last comment states by mimi123 » Thu Feb 12, 2015 7:34 pm You can fetch the serial number from the OTP directly GPU-side. (The VC4 IOMMU is setted up to deny OTP register accesses as there is (on the other VC4-based boards)HDCP keys there,...) You can disable that. It's just toogling a register from the VC4. I want to avoid using kernel as it allows security spoofing ID
    – fishy
    Commented Mar 7, 2017 at 15:17
  • I am hoping I can flush serial number direct to external dongle bit banging data to gpio to make security checks. I will check this link github.com/hermanhermitage/videocoreiv for more information at somepoint but this early stage of my research for security applications and signing code for passport and avoid piracy.
    – fishy
    Commented Mar 7, 2017 at 15:21
  • @fishy That comment seems to say that the serial number is on the GPU (VC) side, which AFAIK cannot be programmed due to lack of documentation. Even if we knew the address, what use would it be if we can't program the VC? Commented Mar 7, 2017 at 15:21
  • 1
    Thankyou again for help, if you have any other ideas I am always thankful. I think this is very complex problem without easy solution and rpi foundation do not offer technical support. Maybe I will solve it if I have enough time maybe others will know or help or maybe there is no solution? Time will tell :)
    – fishy
    Commented Mar 7, 2017 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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