mirror of https://github.com/ARMmbed/mbed-os.git
Generate BLE Random Static Address on U-blox Odin-W2 platform
parent
92e076e3ad
commit
b984dbdfa3
|
@ -337,10 +337,22 @@ void ble::vendor::odin_w2::HCIDriver::handle_reset_sequence(uint8_t *pMsg)
|
||||||
randCnt++;
|
randCnt++;
|
||||||
HciLeRandCmd();
|
HciLeRandCmd();
|
||||||
} else {
|
} else {
|
||||||
signal_reset_sequence_done();
|
uint8_t addr[6] = { 0 };
|
||||||
|
memcpy(addr, pMsg, sizeof(addr));
|
||||||
|
DM_RAND_ADDR_SET(addr, DM_RAND_ADDR_STATIC);
|
||||||
|
// note: will invoke set rand address
|
||||||
|
cordio::BLE::deviceInstance().getGap().setAddress(
|
||||||
|
BLEProtocol::AddressType::RANDOM_STATIC,
|
||||||
|
addr
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case HCI_OPCODE_LE_SET_RAND_ADDR:
|
||||||
|
/* send next command in sequence */
|
||||||
|
signal_reset_sequence_done();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue