Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not scan any devices #1

Open
czdeee opened this issue Nov 24, 2017 · 14 comments
Open

can not scan any devices #1

czdeee opened this issue Nov 24, 2017 · 14 comments

Comments

@czdeee
Copy link

czdeee commented Nov 24, 2017

here is my esp32 log

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:11904
entry 0x40078a3c
happy-bubbles/ble/bedroom/raw/
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
Connecting to WiFi..
Connected to the WiFi network
Connecting to MQTT...
connected
Success sending message to topic
Finished setup
New loop
E (14186) BT: btc_search_callback BLE observe complete. Num Resp 0

Total devices found: 0
Scan done!
New loop
E (24198) BT: btc_search_callback BLE observe complete. Num Resp 0

@czdeee
Copy link
Author

czdeee commented Nov 24, 2017

Total devices found: 2
Scan done!
New loop
---------------- Found new device ------------------Advertised Device: Name: , Address: 0d:3a:fb:f3:86:ca, manufacturer data: 4c0009060345c0a801bc
Address :0d:3a:fb:f3:86:ca
RSSI : -42
ManufacturerData : L
Success sending message to topic: happy-bubbles/ble/bedroom2/raw/0d3afbf386ca
Message: {"hostname":"living-room","mac":"0d3afbf386ca","rssi":-42,"is_scan_response":"0","type":"3","data":""}
---------------- Found new device ------------------Advertised Device: Name: , Address: 40:cb:c0:d6:60:6c, manufacturer data: 4c0010020100
Address :40:cb:c0:d6:60:6c
RSSI : -41
ManufacturerData : L
Success sending message to topic: happy-bubbles/ble/bedroom2/raw/40cbc0d6606c
Message: {"hostname":"living-room","mac":"40cbc0d6606c","rssi":-41,"is_scan_response":"0","type":"3","data":""}

its ok.but can not scan my iPhone and my android Phone

@RiRomain
Copy link
Owner

Hi,

Thanks for trying it out, that's just an early version and certain thing are not working yet.

Concerning the android phone, it should be detected (only if compatible BLE), concerning iPhone, I don't know if they respected the standard.

There is also some problem with the current MQTT client (notably with mosquitto broker) that I'll try to fix as a next step.

The Bluetooth module/library seems to not initialize itself correctly sometimes and also need some fixing.

@czdeee
Copy link
Author

czdeee commented Nov 24, 2017

ok,thanks for your reply.
it can scan my appletv4K.
my android Phone support Bluetooth4.1,seems include BLE.

@czdeee
Copy link
Author

czdeee commented Nov 24, 2017

everytime i turn on my iPhone Bluetooth
it can scan my iPhone,but everytime the mac address is change

@RiRomain
Copy link
Owner

It's call MAC randomization and you can say thanks to Apple for that... I'm not sure there is a way to change that. It's just your iPhone using another Mac address each time.

@czdeee
Copy link
Author

czdeee commented Nov 24, 2017

yeah,it that mean i must be turn on my iPhone bluetooth to make sure the happy bubble correctly trace it.
but the esp32 always cant scan my android phone,may be my devices problem

@czdeee
Copy link
Author

czdeee commented Nov 24, 2017

i find some problem.
if mqtt connected,ping the esp32 will be lost or ping count very large
when i shutdown my mqtt server,the esp32 wifi back to normal

@oakbrad
Copy link

oakbrad commented Nov 27, 2017

I am having the same problem as well, not seeing any beacons. I have several kinds here, I can see them in a beacon scanner app on my phone.

It starts up and connects to MQTT fine.

The serial monitor just loops:

Total devices found: 0
Scan done!
New loop
E (483743) BT: btc_search_callback  BLE observe complete. Num Resp 0


Total devices found: 0
Scan done!
New loop

I don't know if this has anything to do with my issue, but I did have to manually download the BLE library from arduino-esp32 when I set up the board manager. The library is there like it shold be and everything compiles fine.

Any help appreciated, the 'official' happy bubbles are out of stock :)

@oakbrad
Copy link

oakbrad commented Nov 27, 2017

LOL never mind. I of course unplug-replug it back in just one more time and it now it's scanning fine. I did that several times though before posting.

You said the BLE doesn't initialize sometimes, seems like maybe that was my problem?

Thanks for this project, super helpful.

@RiRomain
Copy link
Owner

Yep, exactly this problem, need to find another Bluetooth library for the esp32 that is more reliable or tweak the current one.

@oakbrad
Copy link

oakbrad commented Nov 27, 2017

Got it. Mine is seeing bluetooth devices when it starts up, then it seems to go on a loop with nothing found after that.

I'm also seeing my iBeacons picked up, but not with their UUID Major/Minor, ie

---------------- Found new device  ------------------Advertised Device: Name: iBeacon-8089, Address: e0:e5:cf:af:8d:7d, manufacturer data: 4c000215fda50693a4e24fb1afcfc6eb0764782527142222cd 
Address          :e0:e5:cf:af:8d:7d
RSSI             : -88
Device name      : iBeacon-8089
ManufacturerData : L
Success sending message to topic: happy-bubbles/ble/front/raw/e0e5cfaf8d7d

@antibill51
Copy link

Hi, very good job !
Any news about the Bluetooth module/library bug?
Thanks

@RiRomain
Copy link
Owner

According to some, the problem comes from the fact that the ESP32 share his antenna between the WiFi and Bluetooth module.
However I haven't be able to confirm that and didn't have time to track the issue further.

@oakbrad
Copy link

oakbrad commented Mar 15, 2018

@RiRomain You may want to take a look at the library being used by the OpenMQTTGateway project, they recently added ESP32 BLE support and it is working pretty well for me https://github.com/1technophile/OpenMQTTGateway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants