diff --git a/docs/cli_command_availability.md b/docs/cli_command_availability.md index 48c5986e..6a12d386 100644 --- a/docs/cli_command_availability.md +++ b/docs/cli_command_availability.md @@ -70,6 +70,7 @@ over the normal binary USB, BLE, or TCP connection: | [`get/set radio.fem.rxgain`](cli_commands.md#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards) | Companion on a board with controllable LoRa FEM LNA | | [`get/set wifi.powersave`](cli_commands.md#browser-configuration-portal-esp32-repeater-and-room-server) | ESP32 WiFi Companion; active transport constraints still apply | | [`get/set bluetooth.name`](cli_commands.md#view-or-change-the-independent-bluetooth-name-companion) | Companion firmware | +| [`get/set bluetooth.mac`](cli_commands.md#view-or-change-the-bluetooth-address-ble-companion) | Every Companion build with Bluetooth | | [`uf2reset`](cli_commands.md#enter-the-uf2-bootloader-nrf52-only) | Every nRF52 Companion text terminal and local command `0x42`; local only | Deprecated binary aliases remain receive-only for older clients; new clients diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 172595f3..b99f434b 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -1180,6 +1180,39 @@ the frame and reply format. --- +#### View or change the Bluetooth address (BLE Companion) + +**Usage:** + +- `get bluetooth.mac` +- `set bluetooth.mac
` + +`get ble.mac` and `set ble.mac ...` are accepted aliases. The setting is +available on every Companion build that includes Bluetooth. + +| Value | Result after reboot | +|---|---| +| `C2:11:22:33:44:55` | Save and use that custom address. | +| `random` | Generate one random address now, save it, and reuse it on later boots. | +| `random-every-boot` | Generate a new address once at each boot. `random everyboot` is also accepted. | +| `default` or `clear` | Remove the override and use the chipset's factory Bluetooth address. | + +A custom value must be a valid BLE random-static address in +`XX:XX:XX:XX:XX:XX` form. Its first byte must be from `C0` through `FF`, and +you are responsible for keeping addresses unique. Hyphens are also accepted +on input; status output uses uppercase colons. + +Every change requires a reboot and invalidates the phone's previous view of +the device. Forget the old device entry and pair again. `random-every-boot` +also clears the Companion's saved peer bonds during each startup, so pairing +and PIN entry are expected again after every reboot. + +This changes only the running MeshCore Companion application. On nRF52, the +OTAFIX bootloader still uses its own address, which is visible only while the +board is in BLE DFU/recovery mode. USB and LoRa updates are unaffected. + +--- + #### View or change this node's latitude **Usage:** - `get lat` diff --git a/docs/companion_protocol.md b/docs/companion_protocol.md index ae34ea50..318d283b 100644 --- a/docs/companion_protocol.md +++ b/docs/companion_protocol.md @@ -289,6 +289,7 @@ The equivalent framed CLI commands are: | FEM receive gain | `get radio.fem.rxgain`; `set radio.fem.rxgain on|off` | | WiFi power save | `get wifi.powersave`; `set wifi.powersave none|min|max` | | Bluetooth name | `get bluetooth.name`; `set bluetooth.name