Page 1 of 1
esp32 ble scan
Posted: Wed May 17, 2017 12:01 am
by achan73
Anyone know of a way to do ble scan continuously without limited by the (duration).
like using linux hcitool lescan.
Re: esp32 ble scan
Posted: Wed May 17, 2017 5:30 pm
by f.h-f.s.
scan time max is 256? if you put a start scan in the scan complete case of the event handler how much would you actually lose?
Re: esp32 ble scan
Posted: Wed May 17, 2017 6:57 pm
by madscientist_42
f.h-f.s. wrote:scan time max is 256? if you put a start scan in the scan complete case of the event handler how much would you actually lose?
In reality, not over much. Timings for BLE announcement are largely terms of milliseconds and typically things you're scanning for will transmit on all three channels based on my observations from things on my initial experiments with the stack. I took the GATT client code and stripped all the GATT specific stuff out and cleaned up some things that were GATT specific and have a continuous scanner.
I suggest re-cocking the timeout in the complete event as mentioned. In reality while you might "drop" one event, you're going to see it on the next announcement unless you're very mobile and moving quickly (35+ MPH quickly...)
Re: esp32 ble scan
Posted: Fri May 19, 2017 5:53 pm
by achan73
Thanks for your response.
Can you share your codes how you achieve beyond the max duration time of 256 seconds? Can you ble scan loop last indefinitely?
achan73
Re: esp32 ble scan
Posted: Tue Jul 25, 2017 4:46 am
by Siva_Iot
anyone know how to select one channel out of 3 . my beacon transmit only through one channel,,so i hav to listen nly that channel, please tell how to stop scanning through another two channel.
Re: esp32 ble scan
Posted: Tue Jul 25, 2017 1:17 pm
by kolban
I'm way over my head here ... but a thought strikes me ... it was my understanding that three channels in the BLE radio spectrum were dedicated to advertising and that the BLE protocol says that all three are used by every advertiser ... meaning that an advertiser will advertise on all three channels one transmission at a time. The thinking being that if one channel was suffering from interference, the other might be better.
If that is the case, then the "specialization" of your beacon might be an implementation artifact of that device rather than by design ... and there may not be a legal way to ask for a scan to constrain itself to just one of the three advertising channels as that might not be a concept in the BLE protocol itself.
Re: esp32 ble scan
Posted: Tue Aug 08, 2017 11:52 am
by Siva_Iot
Yaeh i know that sir. As you said, if we mask other scanning window, we may have loss due to signal interference or noise. But in our case, our beacons sending continuously for every 1 sec, still so many loss of packets were happening in between channel switching interval. As we are advertising through one channel, we will have better throughput only if our receiver listen to it continuously without switching channel. Is there any options available to disable the channels for our requirement? please let us know how to change that in code, sir.
ble advertising id
Posted: Wed Aug 09, 2017 4:59 am
by Siva_Iot
how to change ble address . i want to configure advertising id.
Re: esp32 ble scan
Posted: Thu Oct 12, 2017 4:15 am
by Siva_Iot
sir, this is my forum post i have already ping you, i also attach link where i got the code, please tell me where should i add whitelist
(
https://github.com/ibm-watson-iot/devic ... ateway.ino). please support me