Skip to content
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

Get an unique device ID #6

Closed
thibaultmeyer opened this issue Jan 23, 2021 · 7 comments · Fixed by #25
Closed

Get an unique device ID #6

thibaultmeyer opened this issue Jan 23, 2021 · 7 comments · Fixed by #25

Comments

@thibaultmeyer
Copy link

thibaultmeyer commented Jan 23, 2021

Hello,

is there a way to obtain a unique identifier for each device? Something like MAC address on other device Who has a network card ?

@Wren6991
Copy link
Contributor

All RP2040s are identical, and there's no persistent state of any kind on-device, so there's no UID for RP2040s. Flash chips tend to have a unique identifier (usually the 4Bh command), so that would get you a per-board ID on Pico.

There's some careful footwork involved in sending serial commands to the flash chip, owing to the fact you are also executing code from it, so we can look at adding a general interface to the hardware_flash library for posting commands and getting a response back.

@xhawk18
Copy link

xhawk18 commented Jan 24, 2021

unique id is the basic but necessary feature for all MCU ...

@Wren6991
Copy link
Contributor

unique id is the basic but necessary feature for all MCU ...

Yes, it's also a standard feature on the flash chips we boot from, which have a 1:1 association with the MCU.

Small OTP stores take up a lot of space on 40nm (it's the programming hardware, not the storage) so why make people pay for a duplicate feature on their silicon? We do need to add an example though, since as you say it needs to be something that's trivial to get at in user software. I'll get on that.

@kripton
Copy link
Contributor

kripton commented Jan 26, 2021

Is the serial number the device presents to the USB host when running the bootloader also coming from the flash?

usb 1-4: Product: RP2 Boot
usb 1-4: Manufacturer: Raspberry Pi
usb 1-4: SerialNumber: E0C912D24340

@XanaduNWH
Copy link

Is the serial number the device presents to the USB host when running the bootloader also coming from the flash?

usb 1-4: Product: RP2 Boot
usb 1-4: Manufacturer: Raspberry Pi
usb 1-4: SerialNumber: E0C912D24340

I have a same SerialNumber in my dmesg :(

@aallan
Copy link

aallan commented Jan 27, 2021

usb 1-4: SerialNumber: E0C912D24340

This is the firmware revision number. It will be the same on all chips.

@kilograham kilograham linked a pull request Jan 31, 2021 that will close this issue
@kilograham
Copy link
Contributor

merged into develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants