feat: add BLE transport layer for MCUmgr over SMP#48
Conversation
Implements BLE as a transport layer for MCUmgr commands to be sent to Zephyr/MCUboot devices over the standard SMP-over-BLE GATT service (UUID 8D53DC1D / DA2E7828) Note, this is only supported for BlueZ D-Bus (Linux), Windows and MacOS it is not supported yet.
|
Nice. I tried it as well some time ago, but got timeout problems, but I think the lib I tried supported all 3 platforms: https://github.com/vouch-opensource/mcumgr-client/tree/frankbuss/ble But BLE in general is really flaky on Linux and Windows. Only on Mac it works kind of stable. Your approach of using a lower level BlueZ lib might be the right thing for Linux. |
|
@Frank-Buss I guess it won't hurt testing that library again. I'll push a change when I tested that succesfully. It is https://github.com/deviceplug/btleplug right? MAybe it is more stable now |
|
Yes, this is the library. Looks like changes 3 months ago, so actively maintained at least. My first test of it was 3 years ago, would be nice to have it working for all 3 platforms, thanks. |
testing is needed for Windows and macOS
|
@Frank-Buss I migrated to |
Migrate from MUSL to GNU due to non-static libraries of d-bus and bluez
Summary
Implements BLE as a transport layer for MCUmgr commands to be sent to Zephyr/MCUboot devices over the standard SMP-over-BLE GATT service (UUID 8D53DC1D / DA2E7828)
Changes
src/ble.rsresponsible for the BLE transport layer usingbtleplug--ble-address) or by advertisement name (--ble-name)transfer.rswithBle(BleSpecs)variant.--ble-address,--ble-name,--ble-timeoutand--ble-mtu. BLE takes precedenceover UDP and serial in transport selection.
Note: this is only supported for BlueZ D-Bus (Linux), Windows and MacOS it is not supported yet.
Usage
On my local instance I have a device called
vytal 75F1E9: