GPIO while Bluetooth BLE scanning

vadimlica
Posts: 1
Joined: Sun May 27, 2018 1:26 am

GPIO while Bluetooth BLE scanning

Postby vadimlica » Sun May 27, 2018 1:36 am

We try to have few Digital Inputs (buttons), scan for beacons over BLE and deliver signaling through LoRa to the gateway.
ESP32 is perfect, and were able to make it working using Arduino IDE, but we have reported from the developer about big issue.
He said that while ESP32 is scanning for beacons, is not capable to proceed GPIO detection.
In another words, looks like we lose buttons status in reason of BLE. It is a big issue for us, and I would like to know if this is true or not.

Offered solution was to use external MCU who will hold triggered button longer than 3 seconds.

Please help me to understand if ESp32 can or not detect triggered DI while BLE is scanning.

Any kind of answer, suggestion or advise will be really appreciated.

Thank you in advance.

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

Re: GPIO while Bluetooth BLE scanning

Postby chegewara » Sun May 27, 2018 4:18 pm

To be honest i have not test it, but try this solution.
https://esp32.com/viewtopic.php?f=19&t= ... ing#p23416
Also recently to address issue with ble scan blocking this has been implemented:
https://github.com/nkolban/esp32-snippets/issues/496

decebal
Posts: 1
Joined: Mon May 28, 2018 1:23 am

Re: GPIO while Bluetooth BLE scanning

Postby decebal » Mon May 28, 2018 1:34 am

No, it is not true. The only one known limitation on ESP32 is the wireless interface.
It can't be used simultaneousely for Bluetooth and at the same time for WiFI.

From what I understand you continually polling the pin value to detect
a transition change. However this in not the best solution for a number of reasons
i.e. . a waste of cycles assuming the signal level does not change, delayed react by the latency,
or even miss a signal if the duration of the change is short. Think your programmer try to provide
easy solution or having superficial knowlege.

The solution to all these problems is the notion of an interrupt.
You have to define an interrupt callback function that will be called when a pin changes its signal value.
ESP32 has 71 peripheral interrupt sources in total, more than enpogh to handle 14 GPIO as you requested.

I would like also to mention that ESP32 is having two CPU cores, support of multitasking and can handle processes in background.
Also amount of available RAM is sufficient as well.

Check attached PDF files here
Attachments
esp32_technical_reference_manual_en_0.pdf
ESP32 tech reference
(1.54 MiB) Downloaded 457 times
esp32_datasheet_en_0.pdf
ESP32 datasheet
(610.47 KiB) Downloaded 484 times
ESP32.pdf
ESP32 good to know
(14.25 MiB) Downloaded 438 times

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

Re: GPIO while Bluetooth BLE scanning

Postby chegewara » Mon May 28, 2018 4:36 am

The only one known limitation on ESP32 is the wireless interface.
It can't be used simultaneousely for Bluetooth and at the same time for WiFI.
You can use wifi and ble at the same time. Ive done it many times.

Who is online

Users browsing this forum: No registered users and 110 guests