mirror of
https://github.com/D-Modem/hardware.git
synced 2026-11-28 17:48:05 -08:00
firmware: Bluetooth for pico-serial W (BLE NUS, SPP, pairing)
PS_BOARD=w builds for the W board: the RM2 wired as on Pico W, with
BTstack polled from the main loop.
- Classic SPP server ("pico-serial", RFCOMM 1) with credit-based flow
control; LE Nordic UART Service plus the pico-serial control service
(line coding, outputs, inputs, mode, break, flow, credits, info).
- Port ownership (SPEC-W 4.6) in a new portable links layer
(src/core/link.c): USB with its port open, else the first wireless
link, else USB. The wired boards behave as before.
- Over SPP, DCD follows the phone's CONNECT / NO CARRIER.
- Pairing only in a 2-minute window (at power-up with no bonds, PAIR
button, or a new USB request); hold PAIR 10 s to forget. Up to 4 bonds
in flash, below the settings sector. Just Works with LE Secure
Connections / SSP; data and control need an encrypted link.
- BT LED shows advertising, the pairing window or a connection; RD/SD go
to the RM2's GPIOs.
- Host tests for the links layer; CI builds the W image.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
This commit is contained in:
21 files changed
+1264
-24
No files matched your search
@@ -32,6 +32,13 @@ jobs:
|
||||
cmake -S firmware -B firmware/build-hood -G Ninja -DPS_BOARD=hood
|
||||
ninja -C firmware/build-hood
|
||||
|
||||
- name: Build (W board, Bluetooth)
|
||||
run: |
|
||||
cmake -S firmware -B firmware/build-w -G Ninja -DPS_BOARD=w \
|
||||
-DPICO_SDK_PATH=$PWD/firmware/build-hood/_deps/pico_sdk-src \
|
||||
-DPICO_TINYUSB_PATH=$PWD/firmware/build-hood/_deps/tinyusb-src
|
||||
ninja -C firmware/build-w
|
||||
|
||||
- name: Build (Pico bench rig)
|
||||
run: |
|
||||
cmake -S firmware -B firmware/build-pico -G Ninja -DPS_BOARD=pico \
|
||||
@@ -51,4 +58,5 @@ jobs:
|
||||
name: pico-serial-firmware
|
||||
path: |
|
||||
firmware/build-hood/pico-serial-hood.uf2
|
||||
firmware/build-w/pico-serial-w.uf2
|
||||
firmware/build-pico/pico-serial-pico.uf2
|
||||
Reference in new issue
Block a user