Hi All,
In my application I am developing the ESP32 so that as a ble central it can connect to multiple peripherals.
Ideally the app would be able to scan for devices and connect to them as the app discovers them, without stopping the scan.
However I have come across an issue where the app wont connect while scanning.
The app is performing a BLE scan.
The app then tries to connect to a discovered peripheral, while still scanning. The ESP_GATTC_OPEN_EVT returns either "ESP_GATT_ERROR" or "ESP_GATT_BUSY".
If the app stops scanning, then tries to connect, the ESP_GATTC_OPEN_EVT returns with "ESP_GATT_OK"
Please let me know if any more information is needed.
BLE Central: Can't connect to peripheral while scanning.
-
- Posts: 79
- Joined: Tue Apr 26, 2016 5:10 am
Re: BLE Central: Can't connect to peripheral while scanning.
Note, I am NOT saying what you are trying to do is wrong ... I don't know.
A question however, if you execute a scan, find a target peer device you want to connect against, stop scanning, connect and then start scanning for the next one ... does that work?
A question however, if you execute a scan, find a target peer device you want to connect against, stop scanning, connect and then start scanning for the next one ... does that work?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 79
- Joined: Tue Apr 26, 2016 5:10 am
Re: BLE Central: Can't connect to peripheral while scanning.
Hi @Kolban,
Thanks for your response, this is what i am doing currently.
It does work, however it forces delays with interaction with the ESP32, which is not ideal.
However sometimes it can take a while for the Bluetooth connection to connect successfully.
In these cases the application has to wait around until this connection is successful before the scanning can be re-started.
It's not a deal breaker, but would be good if there was some way for this to happen to make interacting with Bluetooth on the ESP32 feel a bit snappier.
Thanks for your response, this is what i am doing currently.
It does work, however it forces delays with interaction with the ESP32, which is not ideal.
However sometimes it can take a while for the Bluetooth connection to connect successfully.
In these cases the application has to wait around until this connection is successful before the scanning can be re-started.
It's not a deal breaker, but would be good if there was some way for this to happen to make interacting with Bluetooth on the ESP32 feel a bit snappier.
-
- Posts: 79
- Joined: Tue Apr 26, 2016 5:10 am
Re: BLE Central: Can't connect to peripheral while scanning.
Just checking if anyone has any more idea about why this doesnt work properly?
@WiFive @ESP_Angus or anyone else from espressif, Is this a known issue?
@WiFive @ESP_Angus or anyone else from espressif, Is this a known issue?
Re: BLE Central: Can't connect to peripheral while scanning.
Hi,
I too am wondering if this is possible or in the works for esp-idf?
It’s not a deal-breaker, would just be good to know if this will ever be possible ?
Is anyone from Espressif able to let us know ?
Thanks.
I too am wondering if this is possible or in the works for esp-idf?
It’s not a deal-breaker, would just be good to know if this will ever be possible ?
Is anyone from Espressif able to let us know ?
Thanks.
Who is online
Users browsing this forum: No registered users and 33 guests