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

ESP32 BLE Prov app never find any wifi netowrk #68

Open
0x0fe opened this issue Jun 10, 2023 · 10 comments
Open

ESP32 BLE Prov app never find any wifi netowrk #68

0x0fe opened this issue Jun 10, 2023 · 10 comments

Comments

@0x0fe
Copy link

0x0fe commented Jun 10, 2023

So, just installed the app from apple store, loaded the corresponding firmware, i can see the BLE device, connect to it, and reach the "select wifi network" step. Here if i try to scan for wifi networks it will scan and scan, but never find anything, ocasionally it stopped scanning and displayed a blank list.
If i clic "join other network" and i type my SSID and password it works, however this is annoying and not really possible to use in many case where we dont know this information, it is also far less convenient than just clicking the SSID in a list.
So, soemthing must be broken somewhere.

@vikas-chandra-mnnit
Copy link
Contributor

vikas-chandra-mnnit commented Jun 13, 2023

Hi @0x0fe, I understand you are facing an issue with the Wi-Fi scan feature available in the app. I tried to reproduce the issue with the latest provisioning app on App Store but it is working fine for me. To help us find the root cause can you please provide us with the below details:

  1. IDF version
  2. IDF example being used for testing
  3. Any specific configuration set by you.
  4. iOS version.
  5. BLE Device logs.
  6. Total available Wi-Fi network count.

@0x0fe
Copy link
Author

0x0fe commented Jun 14, 2023

Hi @vikas-chandra-mnnit
1: 4.4.4
2. tested from PIO so i did not directly used the IDF example but rather the arduino example
3. none
4. iOS 16.1
5. can provide that later
6. one

@vikas-chandra-mnnit
Copy link
Contributor

vikas-chandra-mnnit commented Jun 14, 2023

Hi @0x0fe, regarding the 2nd point, can you please specify which Adruino example you are using in your case?

@0x0fe
Copy link
Author

0x0fe commented Jun 14, 2023

actually this make me realize i used the example from IDF at first, because i could set the mode (AP or BLE) which is not the case in Arduino.
Later i moved to AP mode and used the Arduino example (which fails to connect properly).

@vikas-chandra-mnnit
Copy link
Contributor

@0x0fe
Copy link
Author

0x0fe commented Jun 14, 2023

Sorry for the confusion on my side, in fact i tried BLE Prov, the SoftAP prov and later smartConfig, then a lot has been going on with other issues and i forgot.

So there is the firmware i used to teste BLE prov and which exhibited the issue of this ticket.
https://github.com/cvonk/ESP32_factory-ble-prov/blob/master/src/factory_ble_prov.c

@shahpiyushv
Copy link
Collaborator

@0x0fe, the sample code you mentioned is not official Espressif code. The ble_prov_start_provisioning() in that file itself looks fine, but in other files, I also see some code taken from legacy BLE provisioning. I would recommend that you try out these official examples:

Arduino: https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFiProv/examples/WiFiProv

Esp idf: https://github.com/espressif/esp-idf/tree/master/examples/provisioning/wifi_prov_mgr

These are known to work fine with our apps. Once you validate that these are working fine, further queries can be followed up under esp-idf issues, since it could be related to firmware.

@0x0fe
Copy link
Author

0x0fe commented Aug 2, 2023

@shahpiyushv
So, back to this issue, i can confirm that we now use the exact same code as here https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFiProv/examples/WiFiProv and the problem is still here.
On iphone, sometimes it works, sometimes it doesnt, when it doesnt the scan shows no networks at all, and restarting the scan does nothing more. When it works the networks are found and the process is ok.
On android it is even worst, it mostly never works.
The testing has been conducted in close proximity to the router, with very strong wifi signal, so there is no problem of reaching the network, and tests have been conducted in two totally different network setups (by me at the hardware design phase, and by the applicative team when working on the APP), with identical results.

@0x0fe
Copy link
Author

0x0fe commented Aug 2, 2023

@shahpiyushv
We noticed a pattern too, the first attempt always works. But any subsequent attempt will fail.
To be able to scan with success the BLE device has to be unpaired from the mobile settings, the board has to be reset, and the APP quitted and restarted.

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

3 participants