Page 1 of 1

ESP32 BLE central disconnects every 30 seconds

Posted: Sun Sep 06, 2020 7:02 am
by AnthonyThet
Hi, I am now working on the ble_wifi gateway project in which esp32 serves as an https server (station mode) and ble central (gattc) at the same time.
The wifi side has no issue but the ble side got one issue. The ble central can connect to the particular peripheral device but it automatically disconnects after 30seconds so I restart the scanning again and it can still connect again but still disconnect after 30seconds again.
The log report says
I (7966) GATTC_DEMO: update connection params status = 0, min_int = 16, max_int = 60,conn_int = 60,latency = 0, timeout = 400
W (32936) BT_APPL: bta_gattc_conn_cback() - cif=1 connected=0 conn_id=1 reason=0x0013


I use the nrf52DK as a peripheral device and refer the "bluedroid/ble/gatt_client" example.
Please help....

Re: ESP32 BLE central disconnects every 30 seconds

Posted: Mon Sep 07, 2020 12:34 pm
by chegewara
AnthonyThet wrote: W (32936) BT_APPL: bta_gattc_conn_cback() - cif=1 connected=0 conn_id=1 reason=0x0013

Code: Select all

0x13 Remote User Terminated Connection
This 30 seconds may be related to secure connection. It is time you have to send pin code or to confirm that pin codes are matching. If peer device requires secure connection and you dont send pin or confirm pin codes are matching then you get disconnected.

Re: ESP32 BLE central disconnects every 30 seconds

Posted: Sun Oct 04, 2020 2:42 am
by AnthonyThet
Hi chegewara,
thanks so much for your reply and apologize for my late response.
In my case, I don't need a secure connection. I just need "Just Works" method. Is there a way to remove this secure features??
Thanks.

Re: ESP32 BLE central disconnects every 30 seconds

Posted: Sat Oct 10, 2020 8:11 pm
by chegewara
If you can control both devices you can disable it in code, but if you can control only 1 its very unlikely todo it.