Commit 5a6a85d
Clarify NimBLEAddress(uint8_t[6], type) byte order in docstring
The constructor calls std::reverse_copy on its input, expecting bytes
in MSB-first order (Bluedroid's esp_bd_addr_t layout). The previous
docstring said "compatibility with bluedroid esp library using native
ESP representation," which is correct but ambiguous if the reader
doesn't already know the conventions of both stacks.
Callers reaching for this constructor with LSB-first bytes (e.g. as
they'd come out of NimBLE's own ble_addr_t.val) silently end up with
a reversed address — the radio uses val[] directly for HCI commands,
so GAP connects target a fictional peer and time out as
BLE_HS_ETIMEOUT with no diagnostic.
Documentation-only change; behaviour is unchanged. Points readers to
NimBLEAddress(ble_addr_t) for LSB-first wire bytes and to
NimBLEAddress(const uint64_t&, uint8_t) for hex literals.
Refs #4231 parent 368dff9 commit 5a6a85d
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
| |||
0 commit comments