Skip to content

DEV-1504 Native BLE as a ShimmerPC transport (Mac line) - #359

Open
JongChern wants to merge 2 commits into
Consensys_v2.3.2from
DEV-1504_native_ble_on_v2.3.2
Open

JongChern wants to merge 2 commits into
Consensys_v2.3.2from
DEV-1504_native_ble_on_v2.3.2

Conversation

@JongChern

@JongChern JongChern commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Mac release line. Mac Consensys is built from Consensys_v2.3.2, not master, so this puts DEV-1504 there for macOS testing. It is the same two commits as the master PR (master PR), cherry-picked with -x.

Merge order: merged before Consensys_v2.3.2 itself is merged into master, this would reach master with that merge, ahead of Consensys 2.2.14. So merge it after Consensys 2.2.13 is released, or after the Consensys_v2.3.2 → master merge.

What

Native BLE as a transport of ShimmerPC. Consensys can connect a Shimmer3/3R through shimmerble, an in-process BLE library (Rust on btleplug, loaded through JNI), instead of the gRPC BLE server.

  • ByteCommunicationNativeBle is a ByteCommunication, like ByteCommunicationJSSC. ShimmerPC.setNativeBleDevice() selects it; without it, ShimmerPC uses its COM port as before. The device object, its protocol and its state are the same over Classic and BLE.
  • A link lost over BLE makes reads and writes fail, as a lost COM port does, so ShimmerPC's existing connection-lost handling applies.
  • shimmerble/, the driver.ble.nativeble binding and the native-ble.yml workflow come from the DEV-1132 prototype. ShimmerBLENative is left out; the transport replaces it.
  • The Windows x64 and macOS arm64 builds of the library are committed under ShimmerDriverPC/src/main/resources/native/, both from one run of the Native BLE library workflow (37553575065), so every build of the driver carries them, Consensys's release build included. The READMEs say how to refresh them: bump the version, run the workflow, commit its binaries. A local buildNative is not to be committed.

Other APIs

None need this change: it is a transport for the Java driver, with no change to the wire format, parsing, calibration or timestamps. shimmer-host-core is not affected.

Cherry-pick conflicts: .gitignore and ShimmerDriverPC/build.gradle. Only the native BLE sections were taken; master's other changes to those files are not on this line.

Tests

  • Consensys compiles against the three DEV-1504_native_ble_on_v2.3.2 branches, and the DEV-1504 unit tests pass on Windows: 15 in the driver, 9 in Shimmer-Advance-API, 5 in ConsensysApps.
  • No hardware run on this line yet. DEV-1544 asks for the full test on macOS and Windows.

Related

🤖 Generated with Claude Code

JongChern and others added 2 commits November 19, 2026 14:56
Adds shimmerble, the in-process BLE library (Rust on btleplug, loaded
through JNI), and lets ShimmerPC talk through it instead of its COM
port. ByteCommunicationNativeBle is a ByteCommunication, like
ByteCommunicationJSSC, and ShimmerPC.setNativeBleDevice() chooses it.
The device object, its protocol and its state stay the same over
Bluetooth Classic and BLE.

- shimmerble/, the driver.ble.nativeble binding and the native-ble.yml
  workflow come from the DEV-1134 branch, where the DEV-1132 prototype
  continued. ShimmerBLENative is left out; the transport replaces it.
- A link lost over BLE makes reads and writes fail, as a lost COM port
  does, so ShimmerPC's existing connection-lost handling applies.
- buildNative builds the library into src/main/resources/native/. The
  binaries are not committed.
- Tests: API_00051 to API_00054, run against a fake radio, so they need
  no Bluetooth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b065160)
shimmerble.dll (Windows x64) and libshimmerble.dylib (macOS arm64) go
into ShimmerDriverPC/src/main/resources/native/, so every build of the
driver carries them. That includes Consensys's release build, which
compiles the driver from source for both installers. Both binaries are
the Native BLE library workflow's builds of this shimmerble/ source,
from one run (37553575065).

The READMEs say how to refresh them when shimmerble/ changes: bump the
version, run the workflow, and commit its binaries with the change. A
local buildNative is not to be committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6fa277b)
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.

1 participant