1

I am designing a product for which the Raspberry Pi is part of the system. It is basically used as the bridge for BLE sensors to communicate with cloud servers. Basically, each time my product is shipped, a pre-programmed Raspberry Pi is shipped as well. However, I need a way to physically identify each unit during production to be able to track which unit goes where and to whom, etc... This leads me to using a serial number. The problem is that to give or extract a serial number, we have to wait for the Rpi to boot, which can take up to 60 seconds when the desktop portion is activated. When you have 150 units in production, this can take a while to happen.

Anyone have a recommendation for a different approach or can confirm that my approach is the right one?

Thanks,

Alex C
  • 111
  • 1
  • Does the user get access to the Pi? If not, you could just write a file onto the SD card when you flash it. That could probably be automated in a software process. – Brick Sep 17 '18 at 23:55

1 Answers1

2

Presumably, you're looking for something that's encoded in hardware instead of a number you generate, and write to the SD card? If so:

  1. Raspberry Pis have "randomly assigned" serial numbers that are written to non-volatile memory. Long discussion here on whether or not these serial numbers are unique, but the bottom line is that the algorithm is proprietary to the chip manufacturer. Which effectively means, "nobody knows if the serial number can be counted on to be truly unique". It's apparently considered "unique enough" to protect a £2.40 MPEG-2 license key though - if that lets you sleep better :)

If this is the way you want to go, you'll have to wait on boot, and then you can read the value in software (as described here).

  1. Perhaps a better approach would be to program a serial number you generate and control onto an I2C serial number chip (as suggested by @Ghanima in this Q&A). Adding it to the RPi, and interfacing it electrically are more-or-less straightforward.
Seamus
  • 21,900
  • 3
  • 33
  • 70