-
Notifications
You must be signed in to change notification settings - Fork 514
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
feature/dfu_device_id #949
Conversation
Tests:
Results:
|
@@ -75,8 +75,8 @@ typedef struct __attribute__((packed)) application_dct { | |||
uint8_t alt_device_private_key[192]; // alternative device private key | |||
uint8_t alt_server_public_key[192]; | |||
uint8_t alt_server_address[DCT_SERVER_ADDRESS_SIZE]; // server address info | |||
|
|||
uint8_t reserved2[640]; | |||
uint8_t device_id[12]; // the STM32 device ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more accurate to say "the Particle device ID"? It's not an STM code, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are actually the same. We use standard STM32 Unique device ID register (96 bits).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added "Device electronic signature" in a comment in the appropriate HAL function since that's the STM name for the unique device ID.
Reviewed. Good to merge. |
55f8460
to
eed95ca
Compare
Makes the device ID available via dfu, via the DCT, offset 3618, length 12.
The device ID is copied to persistent storage if the first byte is not 0xFF.
Works on the P1/Photon/Electron.
Core TBD.
The DCT contained a field "device_id" which stored a 6 digit random code. This was renamed "device_code", so we can use "device_id" for the 12 byte stm32 id.
Doneness: