Fixes MAC address in the BLE advertisement packet
The bug was introduced in https://github.com/rbaron/b-parasite/pull/26.
This commit is contained in:
parent
1abff035cb
commit
77f398757a
1 changed files with 4 additions and 2 deletions
|
|
@ -118,8 +118,10 @@ static void init_advertisement_data() {
|
||||||
service_data[0] |= 1;
|
service_data[0] |= 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Bytes 10-15 (inclusive) contain the whole MAC address.
|
// Bytes 10-15 (inclusive) contain the whole MAC address in big-endian.
|
||||||
memcpy(service_data + 10, gap_addr_.addr, 6);
|
for (int i = 0; i < 6; i++) {
|
||||||
|
service_data[10 + i] = gap_addr_.addr[5 - i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void prst_ble_init() {
|
void prst_ble_init() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue