mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10012 from donatieng/ublox_odin_w2_static_random_addr
Generate BLE Static Random Address on U-blox Odin-W2 platformpull/10026/head
commit
774294d1e2
|
@ -337,10 +337,22 @@ void ble::vendor::odin_w2::HCIDriver::handle_reset_sequence(uint8_t *pMsg)
|
|||
randCnt++;
|
||||
HciLeRandCmd();
|
||||
} 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;
|
||||
|
||||
case HCI_OPCODE_LE_SET_RAND_ADDR:
|
||||
/* send next command in sequence */
|
||||
signal_reset_sequence_done();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue