Repository navigation
Open
Description
Context FastLED #3832 requires an RP2350W BLE audit. The selected Arduino-Pico 4.5.3 core ships BluetoothHCI, btstack, and CYW43 Bluetooth locking hooks. However, src/fl/net/ble.h defines FL_BLE_AVAILABLE only for ESP32 NimBLE, src/fl/net/ble.cpp.hpp returns stubs on RP2350W, and only the ESP32 BLE unity build supplies a transport. The core examples prove scanner/client-oriented BLE, while BluetoothHCI.cpp directly uses att_server_init, so a FastLED GATT server is implementable but not currently integrated. ## Proposal Add an RP2350W btstack-backed fl::net::ble GATT transport that implements the existing UUID and Remote callback contract. Add a platform dispatch/build fragment rather than changing the public API. Keep callback/main-loop handoff race-free with fl::atomic or an appropriate critical section, own all persistent FastLED state through fl::Singleton, and gate FL_BLE_AVAILABLE on the actual RP2350W Arduino-Pico headers and CYW43 support. ## Acceptance criteria - Add a focused RED compile/unit repro showing RP2350W currently selects the BLE stub, then make it green with the real RP transport. - Preserve ESP32 NimBLE behavior and unsupported-platform stubs. - Cover create/destroy, advertising, RX write to JSON-RPC request callback, TX notification, disconnect, and bounded queue-full behavior with tests. - No mutable static FastLED state outside fl::Singleton and no bare volatile cross-context state. - bash lint --cpp --strict plus target builds for rp2350w and esp32c6 pass. - Once COM17 is healthy/selectable, bash autoresearch rp2350w --ble --upload-port COM17 --timeout 120s records the actual GATT discovery/ping result. No one-off sketch or direct serial/flasher path. ## Open questions The core public BluetoothHCI examples emphasize scan/client use, so the first implementation must verify its direct btstack GATT-server lifecycle on the attached Pico 2 W and document the supported MTU/notification behavior. ## Related issues Parent #3832.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Sep 7, 2026
The hardware clause on this issue is now unblocked.
The bench fixture is confirmed a Raspberry Pi Pico 2 W — live evidence, not the historical record:
Until now the variant was unestablished, so the W-only acceptance criteria here could not be attempted at all. They can be run now:
bash autoresearch rp2350w --rpc-smoke— PASS (71 RPC methods, dual-core concurrency 200/200)bash autoresearch rp2350w --net-peer— deploys both boards; six full cycles ofwifiConnect→ join the C6 SoftAP →startNetServer→ bidirectional HTTP →stopNet→ pingDeploying the W build onto a board running non-W firmware needs
--upload-port— fbuild refuses to guess which board to BOOTSEL and fails clean without flashing.One known blocker for long soaks: #4173 — the RP2350W hangs in
wifiConnecton the 7th consecutive peer cycle and watchdog-resets. It self-recovers, so it limits repetition rather than stranding the fixture.Generated with Claude Code
https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
zackees commentedon Sep 7, 2026
Device side works — the RP2350W btstack GATT server starts and advertises
The precondition on this issue's last criterion ("Once COM17 is healthy/selectable,
bash autoresearch rp2350w --ble ...") is now met: the fixture is confirmed a Pico 2 W (2E8A:F00F,status.platform"Raspberry Pi Pico 2 W (RP2350)") and its port is healthy and openable. Ran it:The deploy went to
/dev/ttyACM1and Step 1 connected there, sostartBlewas answered by the RP2350W, not the C6. It returned a live service UUID and advertising name — the btstack transport from #3863 comes up on real silicon.The failure is host-side, not the board
bleakcould not reach BlueZ:The adapter exists (
hci0, a BCM20702 on USB) butbluetoothdis not running andbluetoothctlis not installed. On NixOS that is declarative —hardware.bluetooth.enable = trueplus a rebuild — so it needs the bench owner, not an agent. Nothing about the RP2350W is implicated.Remaining for this issue is therefore only the host BLE central: GATT discovery, the RX write → JSON-RPC request path, and TX notification still need a working BlueZ to be observed end to end.
Two cosmetic issues that cost time here
ci/autoresearch/ble.py:69prints "Start BLE GATT server on ESP32" regardless of target. It sendsstartBleover whatever serial client is connected, so on--ble --upload-port <rp2350w>the label names the wrong chip. I read it as "the test ignored my port and used the C6" before checking the deploy line.AUTORESEARCH_BLE_DEVICE_NAMEis hardcoded"FastLED-C6"(examples/AutoResearch/AutoResearchBle.h:19), so an RP2350W advertises under a C6 name. Harmless functionally, but it makes a scan log actively misleading about which board answered.Both are worth a small follow-up; neither affects the transport.
Generated with Claude Code
https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
fix(autoresearch): make BLE bring-up name the board that actually ans…
zackees commentedon Sep 8, 2026
Device-side btstack GATT transport verified on hardware. Host BlueZ is inactive here so the Bleak half of
--blecannot run, butstartBle/bleStatus/stopBletravel over serial and exercise the RP2350W's GATT server independently of the host stack.RP2350W
2DCB876B587EA334on/dev/ttyACM0, full lifecycle with cleanup in afinally:What this establishes:
tx_char_existstransitionsFalse -> True -> Falseacross start/stop, so the TX characteristic is really registered and really torn down;ble_activetracks it.lastResetWasWatchdog: False, uptime continuous across the sequence at 3647s — no reboot).What it does not establish: nothing connected.
connected,connected_count,ring_head,ring_tailandtx_value_lenall stay at zero throughout, so no notification actually traversed the link. The GATT server exists and advertises; whether a central can connect, subscribe and receive notifications is untested.That connect/subscribe/notify half needs host BlueZ.
hci0is present in/sys/class/bluetooth/butsystemctl is-active bluetoothreportsinactive,bluetoothctlis not installed, and this account has no root or passwordless sudo to start the service — so it needs the NixOS declarative config change, not something I can arrange from here.Relevant to #3955 (BLE notification lifecycle): the ring buffer counters and
tx_value_lenare exposed inbleStatusand observably start at zero and stay there with no central attached, which is the correct idle state. Exercising the notification path itself is blocked behind the same host-BlueZ gap.zackees commentedon Sep 11, 2026
Live device-side proof: the btstack GATT transport does come up on RP2350W
I had recorded BLE as untestable on this bench because
bash autoresearch rp2350w --bledies host-side —org.freedesktop.DBus.Error.ServiceUnknown, BlueZ userspace absent sobleakhas noorg.bluez. That was wrong as a blanket statement: only the host-central role is blocked. The device half is reachable over serial RPC, and this issue's outstanding item is live proof of the transport.Driving
startBle/bleStatus/stopBledirectly through the fbuild-backedRpcClient(no BlueZ involved), on RP2350W2DCB876B587EA334, master:Reproduced twice, identical. Serial RPC smoke passes afterwards, so the stack starting and stopping does not disturb the control plane.
What this proves
createTransportreturns a real transport rather than the stub —startBlereturns the advertised identity instead of the stub's failuretx_char_existstransitionsfalse→true, which is the substantive bit: the TX characteristic is actually registered on the GATT database, not merely a flag being setWhat this does not prove
connected: falseandconnected_count: 0throughout, because nothing ever connects. Untested, and untestable here: central discovery/connect, subscription to the TX characteristic, notification delivery, and the notification lifecycle in #3955. Those need a host acting as a BLE central.The blocker for that is bench provisioning, not firmware: the adapter is present (
/sys/class/bluetooth/hci0) butsystemctl is-active bluetoothreportsinactiveandbluetooth.service could not be found. Installing BlueZ and enabling the service would unblock the remaining criteria; it needs root, so I have not done it unattended. Recorded against #3714.So this issue's transport question is answered affirmatively on live hardware; what remains is the connected-peer half.