esp32 ble scan

achan73
Posts: 2
Joined: Tue May 16, 2017 11:24 pm

esp32 ble scan

Postby achan73 » Wed May 17, 2017 12:01 am

Anyone know of a way to do ble scan continuously without limited by the (duration).
like using linux hcitool lescan.

f.h-f.s.
Posts: 216
Joined: Thu Dec 08, 2016 2:53 pm

Re: esp32 ble scan

Postby f.h-f.s. » Wed May 17, 2017 5:30 pm

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?

madscientist_42
Posts: 95
Joined: Tue Feb 21, 2017 10:17 pm

Re: esp32 ble scan

Postby madscientist_42 » Wed May 17, 2017 6:57 pm

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

achan73
Posts: 2
Joined: Tue May 16, 2017 11:24 pm

Re: esp32 ble scan

Postby achan73 » Fri May 19, 2017 5:53 pm

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

Siva_Iot
Posts: 4
Joined: Fri Jul 21, 2017 9:39 am

Re: esp32 ble scan

Postby Siva_Iot » Tue Jul 25, 2017 4:46 am

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.

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

Re: esp32 ble scan

Postby kolban » Tue Jul 25, 2017 1:17 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Siva_Iot
Posts: 4
Joined: Fri Jul 21, 2017 9:39 am

Re: esp32 ble scan

Postby Siva_Iot » Tue Aug 08, 2017 11:52 am

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.

Siva_Iot
Posts: 4
Joined: Fri Jul 21, 2017 9:39 am

ble advertising id

Postby Siva_Iot » Wed Aug 09, 2017 4:59 am

how to change ble address . i want to configure advertising id.

Siva_Iot
Posts: 4
Joined: Fri Jul 21, 2017 9:39 am

Re: esp32 ble scan

Postby Siva_Iot » Thu Oct 12, 2017 4:15 am

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

Who is online

Users browsing this forum: No registered users and 102 guests