I am currently developing an app for ESP32 using NimBLE, that will pair and bond with an Android and iOS application. I am using "just works" pairing method.
I am setting the address of the ES32 to BLE_OWN_ADDR_RANDOM so that it will work with the iOS app. However, I see that the address types of both phone and ES32 are set to zero (public):
Code: Select all
I (133324) BT_PERIPHERAL: connection established; status=0
I (133325) BT_PERIPHERAL: Connection established
I (133326) BT_PERIPHERAL: handle=0 our_ota_addr_type=1 our_ota_addr=6c:f5:1c:c8:40:5a
I (133337) BT_PERIPHERAL: our_id_addr_type=0 our_id_addr=b8:f0:09:8f:7b:9e
I (133348) BT_PERIPHERAL: peer_ota_addr_type=0 peer_ota_addr=78:e3:de:26:e3:91
I (133359) BT_PERIPHERAL: peer_id_addr_type=0 peer_id_addr=78:e3:de:26:e3:91
I (133360) BT_PERIPHERAL: conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0
Code: Select all
I (26610) BT_PERIPHERAL: BLE_GAP_EVENT_REPEAT_PAIRING
I (49114) BT_PERIPHERAL: encryption change event; status=0
I (49115) BT_PERIPHERAL: handle=0 our_ota_addr_type=1 our_ota_addr=6c:f5:1c:c8:40:5a
I (49126) BT_PERIPHERAL: our_id_addr_type=1 our_id_addr=6c:f5:1c:c8:40:5a
I (49127) BT_PERIPHERAL: peer_ota_addr_type=1 peer_ota_addr=5a:5a:40:4c:0f:2b
I (49138) BT_PERIPHERAL: peer_id_addr_type=1 peer_id_addr=5a:5a:40:4c:0f:2b
I (49149) BT_PERIPHERAL: conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=0 bonded=1
I (49163) BT_PERIPHERAL: event->type = 10
I (62253) BT_PERIPHERAL: subscribe event; conn_handle=0 attr_handle=11 reason=2 prevn=0 curn=0 previ=1 curi=0
I (62255) BT_PERIPHERAL: disconnect; reason=531
I (62266) BT_PERIPHERAL: handle=0 our_ota_addr_type=1 our_ota_addr=6c:f5:1c:c8:40:5a
I (62277) BT_PERIPHERAL: our_id_addr_type=0 our_id_addr=b8:f0:09:8f:7b:9e
I (62278) BT_PERIPHERAL: peer_ota_addr_type=0 peer_ota_addr=78:e3:de:26:e3:91
I (62288) BT_PERIPHERAL: peer_id_addr_type=0 peer_id_addr=78:e3:de:26:e3:91
I (62300) BT_PERIPHERAL: conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=0 bonded=1
Any suggestion would be really helpful.
Florin