-
Notifications
You must be signed in to change notification settings - Fork 513
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
Use the device ID as the USB serial number for Core #1367
Conversation
b079059
to
21b5e12
Compare
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.
Works as expected.
Should we also fix Core bootloader same way? There is the same magic IntToUnicode
device id manipulation in dfu_usb.c
Sure for the bootloader. I had not found the place where the bootloader
logic lived. It's not worth the trouble of updating the bootloader just for
this but when the next strong reason to update the bootloader comes this
fix will be ready.
…On Aug 17, 2017 5:10 AM, "Andrey Tolstoy" ***@***.***> wrote:
***@***.**** approved this pull request.
Works as expected.
Should we also fix Core bootloader same way? There is the same magic
IntToUnicode device id manipulation in dfu_usb.c
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1367 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB1KwfDL3FIz7qL-R1KxGhRQUVi-DJa2ks5sZANzgaJpZM4O36qE>
.
|
Reading this back it didn't sound clear. I think fixing the bootloader code now is fine, but if my understanding that actually updating the bootloader on devices out in the wild is difficult this change is not enough to justify asking people to update their bootloader. |
@avtolstoy - ok to merge this one in 0.8.0-rc.2? |
@m-mcgowan If we are not going to update the same code in the bootloader (https://github.com/particle-iot/firmware/blob/60f703bd4165a292f89124a7e3755e4eb37b1a03/bootloader/src/core/dfu_usb.c#L96, then yes. |
Port code from Photon/Electron to Core
…al number buffer size to be increased (since it's unicode, and was only 26 bytes before.) The device ID requires 50 bytes - 12 bytes, as hex digits (*2) in unicode (*2) with a 0 terminator.
6b45f6c
to
9262140
Compare
Problem
When connecting a Core to USB, the serial number reported is a strange number instead of the device ID. The Photon and Electron report their device ID.
This is blocking the CLI from using the USB serial number to detect the device ID of any connected device.
Solution
Port USB serial number code from Photon/Electron to Core.
Note: DFU mode still reports the original serial number instead of the device ID. I'm not sure how to recompile and flash the piece of software that contains DFU to a Core. It would be good to update in the long run, but it's not crucial to do it right away.
Steps to Test
Connect Core to USB, flash system firmware from PR.
Completeness