Fix T1000-E application reporting the bootloader's USB product name
boards/tracker-t1000-e.json set the application's usb_product to "T1000-E-BOOT". PlatformIO's nordicnrf52 builder turns that key into -DUSB_PRODUCT, which lands in the USB device descriptor, so a running node enumerates as "T1000-E-BOOT" while the Seeed bootloader enumerates as "T1000-E". The firmware that is not the bootloader is the one wearing the bootloader's name. That misidentification is load-bearing in the web flasher. flasher.meshcore.io calls navigator.serial.requestPort() with no filters, so the row label in the browser's port chooser -- which the browser builds from the USB iProduct string -- is the only signal the user has. The nRF52 flow prompts twice, once for the 1200-baud DFU touch and again for the flash itself, with no re-enumeration watcher in between, and at that second prompt the two candidate rows read: T1000-E-BOOT (239a:8029) <- the application T1000-E (2886:0057) <- the actual bootloader which is backwards at the moment the user has to tell them apart. The same define is also the Adafruit core's CFG_DEFAULT_NAME, so it is what a companion advertises over BLE whenever the intended name is too long for the GAP device-name attribute and setName() silently fails (#1769). The string is user-visible over Bluetooth as well. Name the application after the firmware it runs rather than after the board. This deliberately differs from the hardware-name convention in the other nRF52 board files ("WisCore RAK4631 Board", "Seeed Wio Tracker L1") because the string's job here is to distinguish the running application from a bootloader that will never claim to be MeshCore; "Seeed T1000-E" would sit one word away from the bootloader's "T1000-E". Upload and flashing are unaffected -- PlatformIO's port autodetect matches on hwids (VID:PID), not on this string. On Linux the /dev/serial/by-id symlink does change, from usb-Seeed_Studio_T1000-E-BOOT_<serial>-if00 to usb-Seeed_Studio_MeshCore_T1000-E_<serial>-if00, so anything pinned to the old path needs updating.
This commit is contained in:
1 parent
d929643524
commit
3641e3bb23
1 file changed
+1
-1
@@ -13,7 +13,7 @@
|
||||
["0x239A", "0x002A"],
|
||||
["0x239A", "0x802A"]
|
||||
],
|
||||
"usb_product": "T1000-E-BOOT",
|
||||
"usb_product": "MeshCore T1000-E",
|
||||
"mcu": "nrf52840",
|
||||
"variant": "Seeed_T1000-E",
|
||||
"bsp": {
|
||||
|
||||
Reference in new issue
Block a user