Bluetooth scan issue

dhs2017
Posts: 40
Joined: Thu Mar 30, 2017 8:56 am

Bluetooth scan issue

Postby dhs2017 » Wed Jul 05, 2017 3:56 pm

Hi,

I used the gatt client example in the esp-idf and have the following issue:

I have two device, one is android smartphone and another one is BLE SoC.

The ESP32 can scan the android smartphone device name, but it CANNOT scan the BLE Soc device name, no result at all.

The smartphone can scan the BLE SoC name, connect, read service and char.

Anyone has idea about this issue?

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

Re: Bluetooth scan issue

Postby kolban » Wed Jul 05, 2017 4:48 pm

If I am understanding the story, you have a Device (X) which is performing the role of a BLE peripheral. As such it is advertising its existence. It will do this by transmitting BLE advertising messages. You wish the ESP32 to detect the presence of X during an ESP32 hosted scan procedure. However, in your tests, this is not working. You are able to detect the advertising scan from device X through a scanner running on an Android phone.

There are a number of parameters in play here. Primarily:

* The information advertised by X when it is performing its advertising
* The parameters of the scan request as set in the ESP32 scanning request

One or both of those may need tweaking. What I would suggest is the following:

1) Capture and paste to pastebin the advertising data published by X. There are a variety of tools that can be used to log broadcast advertising messages.
2) Capture and paste to pastebin the logic used in your ESP32 application which sets up the scanning parameters and makes the actual request to perform the scan.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

dhs2017
Posts: 40
Joined: Thu Mar 30, 2017 8:56 am

Re: Bluetooth scan issue

Postby dhs2017 » Fri Jul 07, 2017 4:48 pm

your understanding is correct.

I found that the poor bluetooth scan performance is because I also turn on the wifi.

When I turn on the wifi, the ESP32 only has less than 1/10 chance can scan the BLE SoC device name, but the situation improved after I turn off the wifi.

Does it mean that the ESP32 cannot run wifi and bluetooth task in the same time?

PS I am using the latest esp-idf

dhs2017
Posts: 40
Joined: Thu Mar 30, 2017 8:56 am

Re: Bluetooth scan issue

Postby dhs2017 » Mon Jul 10, 2017 7:01 am

I found that it's bcoz the poor performance of the ESP32 module on the development board.

I changed to another brand development broad, the problem gone.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Bluetooth scan issue

Postby WiFive » Mon Jul 10, 2017 7:08 am

Can you tell us name of bad board and good board?

Who is online

Users browsing this forum: Bing [Bot] and 248 guests