-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
RFC: Zephyr should provide a unique id interface #9711
Comments
We are doing it too, for updatehub support. Having a common way to do it does make a lot of sense. |
CC #12372 |
Now that the hwinfo support has been merged, I guess this can be closed, correct? |
@aurel32 Well, it certainly would help if there was a bit more API around that to make it generally usable. I wouldn't say this is fully achieved as long as every application is identifying the device by it's model number. |
This is done, see hwinfo API. |
Many (most?) MCUs provide some unique serial or ID factory programmed into the chip which could (and often should) be used to derive constant serial numbers, device identifiers, hostnames, MAC addresses etc. from.
At the moment applications and the kernel chose various details internally (e.g. hostname == board name, MAC address hardcoded or random, serial number hardcoded or application specifically read from non-volatile storage) which is neither portable nor comfortable nor does it allow the same application to run on different devices and represent themselves as such out-of-the-box and hence should be addressed.
There should be a driver interface which allows writing drivers which can obtain the device specific serialisation information and present it to the kernel. Examples for such drivers would be:
There should also be an API in the kernel which allows to retrieve that information in various useful formats, e.g.:
And of course other interfaces and sample application should be adapted to use the unique id interface instead of guessing/hardcoding values or introducing their own way of configuration.
The text was updated successfully, but these errors were encountered: