-
Notifications
You must be signed in to change notification settings - Fork 17
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
Serial Numbers/UIDs #7
Comments
You're right, for now this should be using development IDs. In the beginning (when the rp2040-dongle was emulating the Nodle U1 board), I had the complete unique ID as a serial number: https://github.com/OpenLightingProject/rp2040-dongle/blob/main/src/usb_descriptors.c#L160 (still current in main branch). I can't really think of a proper solution since no matter how we shorten, truncate or hash the 8 byte long unique id of the flash, the result will never be guaranteed to be unique, thus they are not safe to protect clashes reliably. The only thing we could do is to reserve another range (7a70:40000000 - 7a70:4fffffff) and hope they never collide (it's still 28 bit of "randmon-ness", which should suffice in most cases). |
Thanks!
Agreed, I guess all we can really do is hope no-one is unlucky. OLE also allows a UID value from flash (e.g. for testing collisions or other purposes), so that could be a possible option if someone did have a clash.
For a bit of background see here for more detail of how the OLE UIDs are defined: If you're never planning to do dummy RDM responders, or responders dummying proxy devices, then you'd only need one UID per device, so could avoid the shift. Although it might be good to keep that an option unless memory space is likely to be too limiting. I'll have a bit of a ponder, but keeping the potential Microchip OUIs and any future ones sequential and chucking this in at 7a70:e... feels like it might make sense. |
Random lsusb serial: I don't know if it gives much hint to the numbering, or if it's truly random? |
Implemented in the JaRule-branch: https://github.com/OpenLightingProject/rp2040-dongle/blob/JaRuleProto/src/usb_descriptors.c#L183 and https://github.com/OpenLightingProject/rp2040-dongle/blob/JaRuleProto/src/usb_descriptors.c#L210
Yes. At least when I made it that far that I can read & write the flash. Currently, it's the bootloader loading the program and running it. Until now there was no point in storing persistent settings. But yes, I did see the
Indeed, that source code is a good reading. I was not aware that the JaRule devices can act as an RDM proxy and use those 4 bits for that. Nice idea 👍 |
That's the one form the bootloader, right? I thought the same at first, however it's not what the both of us thought it was: raspberrypi/pico-examples#6 (comment) What you are seeing there is some kind of revision number of the bootloader and is the same on all Pico boards ;) When the device is running in |
I suspect there's unfortunately not a huge amount of progress likely to be made with Microchip based JaRule stuff, but equally given this is almost pseudo-random UID allocation given the overflow it's probably still sense to split them up. Are you interested in that level of flexibility in your device?
It was some random one off the Internet! I guess if I load your main branch, I should see my serial there to compare. |
Regarding RDM proxy and the reserved bits, I'm totally unsure. I don't have any experience at all with RDM and cannot judge if the dongle should support that. Sure, with a good number of ports, it could be configured as RDM-capable splitter where this feature would come in handy. Indeed, if you flash the current |
I see you've already mentioned this partly in #2 but given it's important we don't get UID clashes in our space so for now if you're using static ones it would be good to switch to some of the reserved ones here (any of the development blocks are fine):
https://wiki.openlighting.org/index.php/Open_Lighting_Allocations#UIDs
What serial(s)/MAC(s) does the RP2040 chip ship with and I can suggest some ways we could make use of them based on what we've done in the past.
The text was updated successfully, but these errors were encountered: