device-os icon indicating copy to clipboard operation
device-os copied to clipboard

Fix msom usb + ble setup names

Open scott-brust opened this issue 2 years ago • 3 comments

Problem

Msom setup shows the wrong name: Mseries. It should be M SoM Same for P2 BLE setup.

Solution

Fix the hardcoded USB + BLE setup strings

Steps to Test

Build + flash branch. Setup msom on setup.particle.io, name should show as M SoM

Example App

tinker

References

Links to the Community, Docs, Other Issues, etc..


Completeness

  • [x] User is totes amazing for contributing!
  • [ ] Contributor has signed CLA (Info here)
  • [ ] Problem and Solution clearly stated
  • [ ] Run unit/integration/application tests on device
  • [ ] Added documentation
  • [ ] Added to CHANGELOG.md after merging (add links to docs and issues)

scott-brust avatar Jan 29 '24 20:01 scott-brust

spaces in ble and wifi are fine - we need to be consistent in our product messaging mostly (so I'm assuming these follow the existing B SoM definitions?)

mrlambchop avatar Jan 29 '24 21:01 mrlambchop

The PR changes the product reported in USB enumeration while the USB list command remains "M SoM". I am assuming setup takes the system USB enumeration string and the CLI sanitizes this already to "M SoM".

As reported before running this branch:

$ particle usb list
.............. [........................] (M SoM)

$ dmesg
[15713.215453] usb 1-1: new high-speed USB device number 4 using xhci_hcd
[15713.849042] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
[15713.849048] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 64
[15713.857880] usb 1-1: New USB device found, idVendor=2b04, idProduct=c023, bcdDevice= 2.51
[15713.857886] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15713.857889] usb 1-1: Product: Mseries
[15713.857892] usb 1-1: Manufacturer: Particle
[15713.857895] usb 1-1: SerialNumber: ........................
[15713.861620] cdc_acm 1-1:1.1: ttyACM0: USB ACM device

After running this branch:

$ particle usb list
.............. [........................] (M SoM)

$ dmesg
[16432.209940] usb 1-1: new high-speed USB device number 10 using xhci_hcd
[16432.359128] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
[16432.359133] usb 1-1: config 1 interface 2 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 64
[16432.367417] usb 1-1: New USB device found, idVendor=2b04, idProduct=c023, bcdDevice= 2.51
[16432.367422] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[16432.367425] usb 1-1: Product: M SoM
[16432.367429] usb 1-1: Manufacturer: Particle
[16432.367431] usb 1-1: SerialNumber: ........................
[16432.370733] cdc_acm 1-1:1.1: ttyACM0: USB ACM device

eberseth avatar Jan 29 '24 21:01 eberseth

My main concern is the space. This constant is used for the BLE advertising name BleGap::setDeviceName and the Wi-Fi setup SSID fetch_or_generate_setup_ssid (is that still a thing in modern devices?). I'm not sure what issues we introduce with BLE and Wi-Fi stacks if we add a space in the name.

The only limitation is that the string must fit in the 20 character max for BLE advertising name. This includes a trailing serial number added by default. I tested this PR and can see the string M SoM-XXXXXX is advertised correctly so we should be under the limit. IMG_0259

spaces in ble and wifi are fine - we need to be consistent in our product messaging mostly (so I'm assuming these follow the existing B SoM definitions?)

Bsom advertises as Boron-XXXXX IMG_0260

It reports B SoM CDC Mode in usb:

lsusb
...
Bus 020 Device 007: ID 2b04:c017 2b04 B SoM CDC Mode  Serial: e00fce68cfe73d72b2773776

@mrlambchop Do we want to change the bsom USB and BLE names as well?

scott-brust avatar Jan 30 '24 16:01 scott-brust

Superseded by #2753

avtolstoy avatar Mar 14 '24 15:03 avtolstoy