ESP32 BLE central disconnects every 30 seconds

AnthonyThet
Posts: 11
Joined: Sun Sep 06, 2020 6:46 am

ESP32 BLE central disconnects every 30 seconds

Postby AnthonyThet » Sun Sep 06, 2020 7:02 am

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....

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 BLE central disconnects every 30 seconds

Postby chegewara » Mon Sep 07, 2020 12:34 pm

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.

AnthonyThet
Posts: 11
Joined: Sun Sep 06, 2020 6:46 am

Re: ESP32 BLE central disconnects every 30 seconds

Postby AnthonyThet » Sun Oct 04, 2020 2:42 am

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.

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 BLE central disconnects every 30 seconds

Postby chegewara » Sat Oct 10, 2020 8:11 pm

If you can control both devices you can disable it in code, but if you can control only 1 its very unlikely todo it.

Who is online

Users browsing this forum: No registered users and 122 guests