Add configurable Companion Bluetooth addresses
This commit is contained in:
1 parent
b25005f52f
commit
4b400ea56b
26 files changed
+2723
-1966
No files matched your search
@@ -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
|
||||
|
||||
@@ -1180,6 +1180,39 @@ the frame and reply format.
|
||||
|
||||
---
|
||||
|
||||
#### View or change the Bluetooth address (BLE Companion)
|
||||
|
||||
**Usage:**
|
||||
|
||||
- `get bluetooth.mac`
|
||||
- `set bluetooth.mac <address|random|random-every-boot|default>`
|
||||
|
||||
`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`
|
||||
|
||||
@@ -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 <name|default>` |
|
||||
| Bluetooth address | `get bluetooth.mac`; `set bluetooth.mac <address|random|random-every-boot|default>` |
|
||||
|
||||
The framed form works over the normal binary USB, BLE, or TCP transport and
|
||||
does not need the USB terminal-start token. Unsupported settings return the
|
||||
@@ -324,6 +325,15 @@ The Bluetooth name can be configured over USB, BLE, or TCP. Use
|
||||
value is rejected. (`clear` is also accepted as an alias for `default`.) A
|
||||
custom name is limited to 31 valid UTF-8 bytes and takes effect after reboot.
|
||||
|
||||
Bluetooth Companion builds also accept `bluetooth.mac` (`ble.mac` is an
|
||||
alias). A literal address must be a BLE random-static address; `random`
|
||||
generates and saves one, `random-every-boot` rotates it at each startup, and
|
||||
`default` or `clear` restores the factory address. The change takes effect
|
||||
after reboot. The client must forget and re-pair the old identity. Per-boot
|
||||
random mode clears local peer bonds each startup and therefore requires a new
|
||||
pairing after every reboot. This is an application setting; an nRF52 OTAFIX
|
||||
bootloader continues to advertise its separate DFU identity.
|
||||
|
||||
### Bluetooth LoRa mOTA source
|
||||
|
||||
Protocol v14 lets a phone control an install-capable Companion's own LoRa OTA
|
||||
|
||||
@@ -383,6 +383,15 @@ Custom names replace the complete Bluetooth label rather than inheriting the
|
||||
prefix, accept up to 31 valid UTF-8 bytes, and take effect after reboot. This
|
||||
does not change the node's mesh advertisement name.
|
||||
|
||||
Every Bluetooth Companion also supports `get bluetooth.mac` and
|
||||
`set bluetooth.mac <address|random|random-every-boot|default>`. A literal
|
||||
address is a BLE random-static identity, `random` creates one persistent
|
||||
identity, `random-every-boot` rotates it on startup, and `default` (or `clear`)
|
||||
restores the chipset address. Reboot and re-pair after changing modes. The
|
||||
per-boot mode intentionally clears local bonds and needs a new pairing after
|
||||
every reboot. On nRF52 this affects the MeshCore application only, not the
|
||||
OTAFIX bootloader's separate BLE DFU identity.
|
||||
|
||||
ESP32 ports 5000, 5001, 5002, and WebConfig have no independent login layer.
|
||||
Expose them only on a trusted LAN or temporary setup network. See
|
||||
[WiFi setup](./WiFi.md) for credential setup and reconnect behavior.
|
||||
|
||||
@@ -85,6 +85,18 @@ advertisement identity. A custom name may contain spaces and is limited to 31
|
||||
valid UTF-8 bytes. `default` restores `MeshCore-<node name>`. The saved change
|
||||
takes effect after reboot. `get ble.name` and `set ble.name` are short aliases.
|
||||
|
||||
```
|
||||
get bluetooth.mac
|
||||
set bluetooth.mac {address|random|random-every-boot|default}
|
||||
```
|
||||
Shows or changes the Bluetooth identity on Companion builds with BLE. A
|
||||
literal address must be BLE random-static, such as `C2:11:22:33:44:55`.
|
||||
`random` generates and saves one address; `random-every-boot` generates a new
|
||||
one on each startup (`random everyboot` is also accepted); `default` or `clear`
|
||||
restores the factory address. Reboot,
|
||||
forget the old phone entry, and pair again. Per-boot random mode requires
|
||||
pairing after every reboot. `get ble.mac` and `set ble.mac` are short aliases.
|
||||
|
||||
```
|
||||
set lat {latitude}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user