You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BLE relay: accept Write Without Response and request a fast link (5 KB/s → 44–59 KB/s) #100
The BLE relay pipe in reference-designs/MagNET_OTA_WaveC6LED (components/magnet_ota/pipe_ble.c, at f8916c1) caps relay throughput at about 5 KB/s. Two small firmware changes, plus matching proxy settings, raised it to 44–59 KB/s, 9–12 times faster, on the same hardware.
We found this in RobotARme Mobile OTA, a fork of magnet_app that carries the relay transport transport_relay.c unchanged in shape. We benchmarked a XIAO ESP32C3 against an Android 14 phone (Sharp SH-53D), MTU 517, with a 528 KB firmware image.
Measurements
Link setup
Per frame
Throughput
Default: Android "balanced" (48.75 ms interval), 1M PHY, acknowledged writes
101.6 ms
4.9 KB/s
Android high priority (15 ms), 1M PHY, acknowledged writes
47.3 ms
10.5 KB/s
Device asks for 11.25 ms, acknowledged writes
—
13.5 KB/s
High priority + 2M PHY + Write Without Response
9.3 ms
44–59 KB/s
With acknowledged writes the proxy sends one frame per connection event and waits for the reply, so throughput depends on the connection interval, not the radio. Write Without Response lets several frames go out in each connection event. The link layer still acknowledges and retransmits every packet, so dropping the ATT response does not add frame loss: about 26,500 frames crossed clean links with no loss.
Proposed changes (firmware)
Accept Write Without Response on the relay RX characteristic. Today it is .flags = BLE_GATT_CHR_F_WRITE. Make it BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_WRITE_NO_RSP. The access callback needs no change, and proxies that use acknowledged writes keep working.
Request a short connection interval and 2M PHY on connect (ble_gap_update_params, ble_gap_set_prefered_le_phy), and log what is actually negotiated. Android's high-priority request overrides a 7.5 ms request from the device and keeps the link at 15 ms. The request still helps when the proxy leaves the interval alone (desktop and iOS).
Proposed changes (proxies)
These go in any MagNET relay proxy, whether phone or host:
Request high connection priority and 2M PHY after connecting.
Use Write Without Response when the characteristic advertises it.
Keep acknowledged writes as a user-selectable fallback for links that misbehave.
Related: #67 (cross-platform BLE) and #90 (OTA spec).
pipe_ble.c: the relay rx characteristic is now BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_WRITE_NO_RSP; the access callback is unchanged, so acknowledged-write proxies keep working.
On connect the board asks for a 7.5–15 ms interval (ble_gap_update_params) and the 2M PHY (ble_gap_set_prefered_le_phy), and logs the negotiated link on connect, connection update and PHY update.
tools/ble_relay_proxy.py writes without response when the characteristic advertises it; --ack-writes forces acknowledged writes. bleak can't set connection priority or PHY on macOS, so there the board's own request applies.
Builds clean with IDF 5.4.4. Not yet run on a WaveC6LED board: the throughput numbers are still yours from the fork. The app-side proxy settings are tracked in #102.
Activity
truedat101 commentedon Oct 24, 2026
Fixed in 65e6a40 on
dev(pushed).pipe_ble.c: the relay rx characteristic is nowBLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_WRITE_NO_RSP; the access callback is unchanged, so acknowledged-write proxies keep working.ble_gap_update_params) and the 2M PHY (ble_gap_set_prefered_le_phy), and logs the negotiated link on connect, connection update and PHY update.tools/ble_relay_proxy.pywrites without response when the characteristic advertises it;--ack-writesforces acknowledged writes. bleak can't set connection priority or PHY on macOS, so there the board's own request applies.Builds clean with IDF 5.4.4. Not yet run on a WaveC6LED board: the throughput numbers are still yours from the fork. The app-side proxy settings are tracked in #102.
refs #100 BLE relay: accept Write Without Response, ask for a fast link