fix: display Bluetooth MAC addresses in conventional MSB-first order
bdAddr bytes are stored LSB-first (HCI wire order) throughout the stack, but the bluetooth app and btbonds tool formatted them LSB-first too, so every MAC displayed byte-reversed. Print addr[5] down to addr[0] instead. Display-only change; wire-order parsing and syscalls untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
const char* addr_to_string(char* str, uint8_t* bdAddr) {
|
||||
snprintf(str, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
bdAddr[0], bdAddr[1], bdAddr[2], bdAddr[3], bdAddr[4], bdAddr[5]
|
||||
bdAddr[5], bdAddr[4], bdAddr[3], bdAddr[2], bdAddr[1], bdAddr[0]
|
||||
);
|
||||
|
||||
return (const char*)str;
|
||||
|
||||
Reference in New Issue
Block a user