Skip to content

Commit c8c36a3

Browse files
committed
Fix Jira 738 BLE Verify that BT Address in OTP is the same as advertised by device and on sticker
1 parent 31d1838 commit c8c36a3

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

libraries/BLE/src/internal/BLEDeviceManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ bool BLEDeviceManager::begin(BLEDevice *device)
9595
{
9696
_local_ble = device;
9797
_local_ble->setAddress(_local_bda);
98-
98+
bt_le_set_mac_address(_local_bda);
9999
// Set device name
100100
setDeviceName();
101101
_state = BLE_PERIPH_STATE_READY;

system/libarc32_arduino101/drivers/bluetooth/bluetooth.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ int bt_br_set_connectable(bool enable);
345345
#endif
346346

347347
void bt_le_set_device_name(char *device_name, int len);
348+
void bt_le_set_mac_address(bt_addr_le_t bda);
348349

349350
#ifdef __cplusplus
350351
}

system/libarc32_arduino101/framework/src/services/ble/gap.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,3 +910,14 @@ void bt_le_set_device_name(char *device_name, int len)
910910
nble_gap_service_write_req(&gap_service_params);
911911
}
912912

913+
void bt_le_set_mac_address(bt_addr_le_t bda)
914+
{
915+
// Update the MAC addr
916+
struct nble_set_bda_params params;
917+
params.cb = NULL;
918+
params.user_data = NULL;
919+
params.bda = bda;
920+
921+
nble_set_bda_req(&params);
922+
}
923+
5.51 KB
Binary file not shown.

0 commit comments

Comments
 (0)