BLE graceful disconnect

lis8215
Posts: 2
Joined: Sat Jul 01, 2017 6:14 am

BLE graceful disconnect

Postby lis8215 » Sat Jul 01, 2017 6:21 am

Hello all,

I am not able to gracefully clean connection to device when esp32 in Central mode, even when i call esp_ble_gattc_app_unregister(gattc_if) the connection stays active in background.

Can someone share a code for BLE graceful disconnect from Peripheral(s).

Thanks in advance.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: BLE graceful disconnect

Postby kolban » Mon Jul 03, 2017 4:52 am

Can you elaborate on how you know the connection is staying active? What tools or techniques are you using to determine the nature of the connection? What are you using as the BLE peripheral to which your ESP32 BLE central has connected?

My skills in BLE are low ... but I seem to have a notion that peripheral / central and client / server are somewhat fluid in BLE ... meaning that a central and peripheral can exist at one layer in that order while the client and server can exist in an alternate order at a different layer. For example (and I am very loose and likely wrong here) ... a BLE Central can form a GATT connection to a BLE Peripheral but then the peripheral can behave as a BLE client to while the corresponding BLE server can now be on the central.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 80 guests