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

openDTU won't connect to Unifi AP AC Pro #2543

Open
4 tasks done
plieven opened this issue Feb 12, 2025 · 7 comments
Open
4 tasks done

openDTU won't connect to Unifi AP AC Pro #2543

plieven opened this issue Feb 12, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@plieven
Copy link

plieven commented Feb 12, 2025

What happened?

I am unable to connect the openDTU to a network that is based on Unifi AP AC Pro. The network just stays in status inactive. Unfortunately, I am not able to have a look at the debug console as the openDTU device is several hunded kilometers away. But with same credentials it worked flawlessly at my office.

What I tried so far:

  • downgraded from 25.2.3 to 24.6.29 (as this was mentioned to solve stability issues in another thread ESP32 does not reconnect to Wifi #2400)
  • disabled all advanced Features including BSS Transition, Band Steering, Minimum RSSI, PMF, Fast Roaming...
  • removed the SSID from all APs but one
  • enabled only 2.4GHz
  • enabled Enhanced IoT compatiblity
  • switched security to Open
  • setting a static IP

What I've not tried so far is any code modifications. I found a suggestion to basically use the following code:
WiFi.persistent(false); WiFi.mode(WIFI_STA); WiFi.setSleep(false); WiFi.begin(ssid, password);

which conflicts with the WIFI_AP_STA approach to keep an AP as fallback and might lock me out of the device. But this might also be a cause of the issue.

Other ESP32 devices e.g. a Shelly Plus Plug S works flawlessly in the network so I suspect its a software issue.

Any suggestions?

To Reproduce Bug

Try to connect openDTU 25.2.3 on a Unifi AP AC Pro network.

Expected Behavior

The openDTU should connected to a Unfi Network.

Install Method

Pre-Compiled binary from GitHub releases

What git-hash/version of OpenDTU?

25.2.3

What firmware variant (PIO Environment) are you using?

generic

Relevant log/trace output

Anything else?

No response

Please confirm the following

  • I believe this issue is a bug that affects all users of OpenDTU, not something specific to my installation.
  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.
  • I have double checked that my inverter does not contain a W in the model name (like HMS-xxxW) as they are not supported.
@plieven plieven added the bug Something isn't working label Feb 12, 2025
@ms1958
Copy link

ms1958 commented Feb 13, 2025

@plieven : My Unifi AP AC Pro work with my OpenDTU (V24.6.29)
connect with WPA2

@plieven
Copy link
Author

plieven commented Feb 13, 2025 via email

@plieven
Copy link
Author

plieven commented Feb 13, 2025

Does anyone know if the ESP32 Wifi Stack can handle multiple SSIDs on the same BSSID properly?

@ms1958
Copy link

ms1958 commented Feb 13, 2025

@plieven wifi settings:
Image
AP-Firmware is 6.6.77.15402 , unifi Network Software 9.0.114

@plieven
Copy link
Author

plieven commented Feb 13, 2025

@ms1958 thanks that is exactly what I also tried. AP-Firmware is also the same.

@plieven
Copy link
Author

plieven commented Feb 13, 2025

@tbnobody regarding the Wifi code I have a few concerns:

a) the common approach for a fall back AP i have seen is that you try to connect to a wifi (if one is configured). If this does not succeed you fire up a fallback AP. If noone connects to this AP within a given time you restart scanning and try to connect. The same logic could apply if one is disconnected from the wifi.

What was the reasoning to have both in parallel? I'm concerned that this might cause issues. The fallback AP starts at channel 1 and as soon as the network is connected the AP will change to the channel of the network.

b) I have seen that there is a WiFi.disconnect(true, false) in the reconnect path. Won't this also disconnect clients from the fallback AP?

c) If you clear the Wifi Config from the ESP at startup with WiFi.disconnect(true, true) why don't you set WiFi.persistent(false); to no write to the NVRAM at all?

@meckiemac
Copy link

meckiemac commented Feb 16, 2025

Does anyone know if the ESP32 Wifi Stack can handle multiple SSIDs on the same BSSID properly?

yes. I have the same setup with few AC Pros running successfully. What could be worth checking is the 2.4GHz channel bandwidth. ESPs may have an issue above 40MHz, to be save stay at 20MHz.
What's your output of the Unifi Network radio manager?

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

3 participants