Closed 0neblock closed 4 years ago
Hello, I tried to use the example gatt_client and changed the address parameter of esp_ble_gattc_open() to "never been seen hardware address." But it didn't crash. So how do you use this feature? Did you do something else before confirming that the connection was actually connected(the ESP_GATTC_CONNECT_EVT event occured )? Such as read or write ?
Hi,
I will try to describe more my use case. I am connecting to other BLE devices with NRF chips inside. These NRF chips have the ability to get placed into bootloader mode, which will start advertising a service UUID at the original BT Hardware address + 1, after a certain value is written to a GATT characteristic in the normal application.
The problem was occurring specifically when I was connected to the original device, then putting that device in bootloader mode by writing a value, then I would disconnect, and wait for the ESP_GATTC_DISCONNECT_EVT, and then immediately attempt to connect to the same BT address + 1.
I am currently using a workaround to set the device in bootloader mode, then start scanning again, then only after I see that new BT Address + 1 will I try to connect to it, and this seems to be working fine.
Thanks for reporting. Has your issue been resolved? If it gets resolved, would you please help close the issue? Thanks.
@0neblock Thanks for reporting, will close due to short of feedback, feel free to reopen if the issue still happens. Thanks.
Problem Description
Calling esp_ble_gattc_open() on a hardware address that has never been seen seems to trigger an Interrupt WDT within the BT Library.
Calling esp_ble_gattc_open() on a device that has been scanned, the connection completes successfully and I am able to transfer GATT information and correctly close the connection, but if i try with a module address that has not been seen during scanning, I get the below interrupt wdt timeout.
I have confirmed that BLEScanning has stopped before the esp_ble_gattc_open function is called.
I am calling esp_ble_gattc_open like the below, and i am getting ESP_OK as response.
esp_ble_gattc_open(gattc_profile_list[0].gattc_if, <hardware_addr>, BLE_ADDR_TYPE_RANDOM, true);
I know I am using the function correctly because all i have to do if change the hardware_addr to one that is known and it connects fine.
Environment
Debug Log
sdkconfig
https://gist.github.com/0neblock/a6c403e99f9807444b59376d1f243a16