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

WiFi scan not working when EMS-ESP is an Access Point #1922

Closed
proddy opened this issue Aug 4, 2024 · 10 comments
Closed

WiFi scan not working when EMS-ESP is an Access Point #1922

proddy opened this issue Aug 4, 2024 · 10 comments
Labels
bug Something isn't working
Milestone

Comments

@proddy
Copy link
Contributor

proddy commented Aug 4, 2024

with dev-29:

Two use cases

  1. On ethernet (E32V2 gateway), Ethernet only and SSID is blank. Scan WiFi comes up empty. The option should be disabled if we're not using WiFi and have an Ethernet connection.
  2. EMS-ESP starts its own Access Point. SSID is blank. Scan WiFi comes up blank. URL is http://192.168.4.1/settings/network/scan

@tp1de FYI

@proddy proddy added the bug Something isn't working label Aug 4, 2024
@proddy proddy added this to the v3.7.0 milestone Aug 4, 2024
@MichaelDvP
Copy link
Contributor

I don't think there is a bug.

  1. To change from ethernet to Wifi it's usefull to scan networks and connect to wifi. After restart wifi is connected and ethernet is disabled. Works as expected.
  2. Works as expected.

Tested both with E32V2, actual 3.7.0-dev29-16M from this GH.

@proddy
Copy link
Contributor Author

proddy commented Aug 4, 2024

Ok, I'll need to test again.

I erased an ESP32, flashed it, went to the Access Point on 192.168.4.1 and WiFi scan didn't work. But I'll try again.

@proddy proddy changed the title WiFi scan not working when SSID is empty WiFi scan not working when EMS-ESP is an Access Point Aug 5, 2024
@proddy
Copy link
Contributor Author

proddy commented Aug 5, 2024

I was checking this. As the ESP32 has only one radio, when doing a WiFi scan in AP mode it will disconnect from that channel, which is what I'm seeing too.

Other IOT devices (like Shelly) I think do the WiFi first before starting the WiFi.softAP(). We could do something similar but it won't be easy.

Reference: https://forum.arduino.cc/t/can-esp32-execute-a-scan-while-a-client-is-connected-to-its-ap/1259238/4

@MichaelDvP
Copy link
Contributor

I thought it was a windows issue. With windows pc connected to AP the connection to AP gets lost while scanning. This disconnect also happend after a while if not scanning, windows like to phone home and the AP does not provide internet, so windows switch the connection to another AP as soon as possible.
With android devices it's no issue, connection to AP stay and the scan is executed.

@proddy
Copy link
Contributor Author

proddy commented Aug 5, 2024

I was testing on Windows as well. I try with Android and iPhone...

** edit - on iPhone, in AP/Captive Portal Wifi Scan still comes up as blank **

@tp1de
Copy link
Contributor

tp1de commented Aug 5, 2024

@proddy Does WiFi work for you if you manually enter SSID and password?

@proddy
Copy link
Contributor Author

proddy commented Aug 5, 2024

@proddy Does WiFi work for you if you manually enter SSID and password?

yes, that works.

@thorstenfleischmann
Copy link

I think I have the same issue. Just installed ems-esp and scan in initial ap mode does not find any networks. Quite sure there should be at least one. Will try manually later.

@proddy
Copy link
Contributor Author

proddy commented Aug 9, 2024

I think I found a fix. We need to add a WiFi.softAPenableIpV6(); in APSettingsService::startAP() before the WiFi.softAP() call. Tested and works. I'll include in a bigger PR that's coming

@proddy
Copy link
Contributor Author

proddy commented Aug 16, 2024

in dev-31

@proddy proddy closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants