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

feature/dfu_device_id #949

merged 4 commits into from Jun 8, 2016


Copy link

commented Apr 10, 2016

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.


  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • N/A API tests compiled
  • N/A Run unit/integration/application tests on device
  • Add documentation: (Need a new DFU section for the DFU memory map for the DCT region.)
  • Add to after merging (add links to docs and issues)

@m-mcgowan m-mcgowan added this to the 0.6.x milestone Apr 10, 2016


This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2016


  • - dfu-util -d 2b04:d006 -a 1 -s 3618:12 -U device_id && xxd -g 12 device_id matches the device ID printed by particle serial identify.
    • - Photon
    • - Electron


DfuSe interface name: "DCT Flash   "
Upload  [=========================] 100%           12 bytes
Upload done.
0000000: 350031000exxxx3035353132           5.1..Q405512

Scream:electron mat1$ particle serial identify

Your device id is 350031000exxxx3035353132
Your IMEI is .....
Your ICCID is .....
Your system firmware version is 0.5.0

@monkbroc monkbroc removed the in progress label Apr 27, 2016

@@ -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

This comment has been minimized.

Copy link

monkbroc Apr 27, 2016


Wouldn't it be more accurate to say "the Particle device ID"? It's not an STM code, right?

This comment has been minimized.

Copy link

avtolstoy Apr 27, 2016


They are actually the same. We use standard STM32 Unique device ID register (96 bits).

This comment has been minimized.

Copy link

monkbroc Apr 27, 2016


I added "Device electronic signature" in a comment in the appropriate HAL function since that's the STM name for the unique device ID.


This comment has been minimized.

Copy link

commented Apr 27, 2016

Reviewed. Good to merge.

@monkbroc monkbroc removed their assignment Apr 27, 2016

@m-mcgowan m-mcgowan force-pushed the feature/dfu_device_id branch from 55f8460 to eed95ca Jun 8, 2016

@m-mcgowan m-mcgowan merged commit b4a8420 into develop Jun 8, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/travis-ci/push The Travis CI build is in progress

@m-mcgowan m-mcgowan deleted the feature/dfu_device_id branch Jun 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.