Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/ci/_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,18 @@ RMK_FEATURESETS=(
"rynk,_ble,split,storage,async_matrix"
"rynk,storage"
"rynk"
"rynk,_ble,storage"
"dongle,_ble,storage"
"dongle,rynk,split,_ble,storage"
"dongle,vial,_ble,storage"
)

# Behavioral coverage only; RMK_FEATURESETS remains the compile/clippy matrix.
RMK_TEST_FEATURESETS=(
""
"vial,host_lock,_no_usb,steno,passkey_entry"
"rynk,_ble,split,async_matrix,storage"
"dongle,_ble,storage"
)

# Examples auto-discovery skiplist. Reasons:
Expand All @@ -78,6 +83,14 @@ EXAMPLE_SKIPLIST=(
"examples/use_rust/sf32lb52x_ble"
)

# Multi-target examples (several boards in one directory) sit one level
# deeper than the discovery glob; list their crates explicitly.
EXTRA_EXAMPLE_MANIFESTS=(
"examples/use_rust/nrf_dongle/dongle/Cargo.toml"
"examples/use_rust/nrf_dongle/central/Cargo.toml"
"examples/use_rust/nrf_dongle/peripheral/Cargo.toml"
)

# Echoes Cargo.toml paths for every buildable example, one per line.
# A buildable example is a direct child of examples/use_{rust,config}/ that
# has both a src/ dir and a Cargo.toml (filters out placeholders like fix/),
Expand All @@ -96,6 +109,10 @@ list_example_manifests() {
done
(( skip == 0 )) && printf '%s\n' "${dir}Cargo.toml"
done
local extra
for extra in "${EXTRA_EXAMPLE_MANIFESTS[@]}"; do
[[ -f "$extra" ]] && printf '%s\n' "$extra"
done
}

# Echoes the default build target triple declared in the manifest's sibling
Expand Down
Empty file.
618 changes: 618 additions & 0 deletions docs/docs/main/docs/development/dongle_mode_design_zh.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/docs/main/docs/development/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ There are a bunch of things to do with RMK in the near future. I plan to ship 1.
- [x] Stabilizing BLE feature gate/API
- [x] Support more MCUs, such as cyw(used in rp2040w/rp2350w)
- [ ] Deep-sleep mode
- [x] Better support for dongle
- [x] Better support for split dongle (dongle as the split central)
- [ ] Nordic Uart HCI support
- [ ] Send report via Uart/Usart
- [ ] Switch between dongle mode and BLE mode
- [ ] 🔵 Tri-mode dongle: switch between USB, BLE and dongle mode (see [Dongle Mode Design](./dongle_mode_design.md))

#### User experience

Expand Down
30 changes: 30 additions & 0 deletions examples/use_rust/nrf_dongle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Tri-mode dongle, end to end

The complete setup from the tri-mode dongle design
(`docs/docs/main/docs/development/dongle_mode_design.md`): a split BLE keyboard
whose central is an ordinary `rynk` BLE keyboard, relayed to the host by a USB
dongle. Three firmwares, one per board:

| Crate | Board | Role |
| --- | --- | --- |
| [`dongle/`](dongle/) | nRF54LM20A | USB dongle: relays bonded keyboards (HID + Rynk CDC) |
| [`central/`](central/) | nRF52833 | Split central: the keyboard itself (`rynk` + `split`) |
| [`peripheral/`](peripheral/) | nRF54L15 | Split peripheral: the other half |

Each crate builds independently (`cargo build --release` inside it) and flashes
via J-Link (`./run.sh <elf>`).

## Bring-up order

1. Flash all three. Both keyboard halves use their DK buttons as a 2x2 matrix;
the central's Button 4 is the dongle key (`User8`).
2. The split halves find each other on their own (central scans, peripheral
advertises).
3. Press the dongle key on the central to switch to the dongle slot, then
power-cycle (reset) the dongle: its 30s pairing window picks up the seeking
central and pairs. From then on everything reconnects automatically.
4. Typing from either half arrives on the host through the dongle; a Rynk host
tool on the dongle's CDC port reaches the central's keymap transparently.

Holding the dongle key for 5s clears the central's dongle bond (or, while the
dongle link is up, authorizes pairing a second keyboard).
9 changes: 9 additions & 0 deletions examples/use_rust/nrf_dongle/central/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
# runner = "probe-rs run --chip nrf52833_xxAA"
runner = "./run.sh"

[build]
target = "thumbv7em-none-eabihf"

[env]
DEFMT_LOG = "debug"
Loading
Loading