-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware API addition: get_serial_number() #54
Comments
Hey @njh! The MAC address option has a small problem that users might try it alongside So the serial number is my preferred option. Happy to accept PR for that. Would your use case be okay with the Simulator returning a serial number '0000000000000000', or would that cause problems? |
Thanks Joe! Yes, lets start with that. Alternatives might be to either generate (and persist) a random number in the simulator. Or include part of the first network interface MAC address in the simulator. I'm not sure if it is worth contacting Raspberry Pi and asking if there is a structure to the serial number - and if some space could be reserved for 'fake pis'? |
A generated/persisted number would be a handy workaround! I wouldn't expect these numbers to be used for anything except direct comparisons, so we could design our own identifier scheme for the simulator |
You could use a uuid for this - see the python uuid module for more details On 14 Nov 2016 09:54, "Joe Rickerby" notifications@github.com wrote:
|
That's what I'm using in a one of my app:
|
Hello,
I am interesting in getting a unique identifier for a Tingbot device, so that it can be used as a connection identifier when an app is installed on multiple devices.
A couple of options I have considered:
/proc/cpuinfo
(which includes the Ethernet MAC address) - http://raspberrypi.stackexchange.com/questions/2086/how-do-i-get-the-serial-numberI am leaning towards the second option, because it should work with the simulator too.
What do you think? Would you accept a Pull Request?
Thanks,
nick.
The text was updated successfully, but these errors were encountered: