Files
pyxis/lib/ble_interface/platforms
torlando-tech cbac8ed5ca fix(ble): enable NimBLE scan response so service UUID + name fit; add T:BLE hook
Two related changes:

1. NimBLE advertising overflow

   At boot pyxis was logging "NimBLEAdvertisementData: Data length
   exceeded" twice. The 128-bit Reticulum service UUID is 18 bytes
   once you include the AD type+length headers; the device name
   "TD-XXXXXX" is another 9-11 bytes; flags eat 3 bytes. That's
   already over the 31-byte legacy adv-packet limit, so NimBLE was
   silently truncating the advertisement and dropping the service
   UUID. Android Columba's BleScanner filters by ServiceUuid at the
   Android BLE driver layer (ScanFilter.Builder().setServiceUuid),
   so without the UUID in the primary adv data, pyxis was invisible
   to Columba.

   Fix: call enableScanResponse(true) BEFORE addServiceUUID +
   setName. NimBLE then routes the long device name into the
   secondary 31-byte scan-response payload that active scanners
   request, leaving the primary adv data with just flags + the
   service UUID — under budget and visible to the filter.

   Verified: with the fix, Android system Bluetooth reads pyxis's
   name as "TD-46cbcf" and Columba's BleGattServer logs
   "Central connected: FC:69:15:9C:B2:C9" (pyxis as central). The
   connection holds for ~40s before HCI_CONN_TIMEOUT — separate
   issue not addressed here, just the unblock so the link can be
   established at all.

2. T:BLE on|off harness hook

   Mirrors T:CALL_PROFILE / T:ANNLXST / T:LXSTDEST: persists the
   ble_en NVS key and starts/stops the interface live so the LXMF
   harness can flip BLE on/off the same way it drives any other
   subsystem. Idempotent for "already on" / "already off". Useful
   for upcoming pyxis ↔ Android Columba BLE smoke tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 20:21:08 -04:00
..