Skip to content

DEV-1389: Recognise NeuroSmart's Shimmer3R units (Neurosmart-XXXX-BT/BLE) - #356

Merged
MAzalya merged 1 commit into
masterfrom
DEV-1389_neurosmart_bt_names
Nov 19, 2026
Merged

MAzalya merged 1 commit into
masterfrom
DEV-1389_neurosmart_bt_names

Conversation

@JongChern

@JongChern JongChern commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

DEV-1389. NeuroSmart's Shimmer3R GSR+ units are renamed in the factory to Neurosmart-XXXX-BT and Neurosmart-XXXX-BLE (DEV-1388). A paired device is a Shimmer by its Bluetooth name, so these units were classified as Unknown and dropped, in Consensys and in the Android API's paired list.

Goes with ShimmerResearch/Shimmer-Advance-API#524, which needs this branch. Merge this one first.

What changes

  • HwDriverShimmerDeviceDetails.SH_SEARCH.BT.isNeurosmartName: exactly Neurosmart-XXXX-BT or Neurosmart-XXXX-BLE, XXXX being four hex digits in either case.
    • Nothing looser: Neurosmart-2F31, MyNeurosmart-2F31-BT and neurosmart-2F31-BT are rejected.
  • BluetoothDeviceDetails.checkDeviceType() classifies such a name as Shimmer3.
  • BluetoothDeviceDetails.setMacId() keeps such a name as the address where macOS connects by name, as it does a Shimmer… name.
  • ShimmerBluetoothManager.isSerialPortHandle(): on macOS such a name is a serial port's handle, as a Shimmer… one is. getBluetoothDeviceDetails() uses it.

Testing

Tests Count
API_00050_BluetoothNameClassificationTest 4
SerialPortHandleTest 2
  • The Neurosmart tests failed before the change. Undoing either new check fails its test.
  • Every name recognised before classifies as it did: Shimmer3, Shimmer3R, S3BLE, Shimmer4, ShimmerECGmd, RN42, Verisense and Nonin.
  • The other driverUtilities tests still pass: 88 in all.
  • On hardware, Windows over Classic. A Shimmer3R on LogAndStream v1.1.26 was renamed Neurosmart-9A3F-BT with the Shimmer Capture web app, as the factory does it, then re-paired. In Consensys built from this branch and ShimmerResearch/Shimmer-Advance-API#524:
    • it was classified as Shimmer3 and listed;
    • it connected, and streamed for 15 s;
    • every other paired Shimmer in the same scan classified as before, none as Unknown.
  • USB-C and SD import passed too, once ShimmerResearch/Shimmer-Advance-API#524 also accepted the unit's USB product name, Neurosmart XXXX. That fix is in #524 alone.
  • Not yet tested: BLE, macOS, and the Android API, which needs this branch republished.

Android

Android gets this only once shimmerdriver and shimmerbluetoothmanager are republished and ShimmerAndroidAPI is pinned to them. That goes with the next Java release, after the Java and Android HILs.

Other APIs

  • C# API: filters by name only in example apps, not the library. None needed.
  • Web SDK, pyshimmer, Swift: no name filter. None needed.
  • shimmer-host-core: only its Android capture example and a live test match "Shimmer3R". None needed in the library.

🤖 Generated with Claude Code

…XXXX-BT/BLE names

NeuroSmart's Shimmer3R units are renamed in the factory (DEV-1388). A
paired device is a Shimmer by its Bluetooth name, so a Neurosmart unit was
classified as Unknown and dropped, in Consensys and in the Android API.

- HwDriverShimmerDeviceDetails.SH_SEARCH.BT.isNeurosmartName: exactly
  Neurosmart-XXXX-BT or Neurosmart-XXXX-BLE, XXXX four hex digits.
- BluetoothDeviceDetails classifies such a name as Shimmer3, and keeps it as
  the address where macOS connects by name.
- ShimmerBluetoothManager.isSerialPortHandle: on macOS such a name is a
  serial port's handle, as a Shimmer one is.

Every name recognised before classifies as it did (API_00050).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JongChern JongChern self-assigned this Nov 18, 2026
@JongChern
JongChern marked this pull request as ready for review November 18, 2026 07:23

@MAzalya MAzalya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (DEV-1389). Looks good to merge. The rule is exact and well tested, every name recognised before is unchanged, and CI is green.

Notes for the follow-ups, not blockers here:

  • Android needs a code change as well as the republish. ShimmerBluetoothManagerAndroid.connectShimmer3BLEThroughBTAddress (line ~226) picks HW_ID.SHIMMER_3R only when the name contains "Shimmer3R", so a Neurosmart-XXXX-BLE unit would be built as a Shimmer3. The paired list will be fine after the pin bump. Worth noting on DEV-1389 or the Android follow-up.
  • The prefix is case-sensitive and NEUROSMART-… is explicitly rejected. That's fine as long as the factory tool always writes exactly Neurosmart (DEV-1388).
  • Nit, pre-existing: BluetoothDeviceDetails.setMacId assigns mShimmerMacId = mac; twice.

@MAzalya MAzalya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The rule is exact (Neurosmart-XXXX-BT/BLE, four hex digits), every name recognised before is unchanged, and the tests cover both. The Android BLE HW_ID note in my earlier comment is for the Android follow-up, not this PR.

@MAzalya
MAzalya merged commit a29481f into master Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants