-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
ESP8266NetBIOS library only works in wifi STA mode, and not in wifi AP #8139
Comments
@pabloandresm you've found a problem and potential solution. Why not try your hand at a pull request so your work would be preserved in the |
I'll do that right now. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Title says it all. The problem is the same as the NetBIOS library for esp32 (espressif/arduino-esp32#5300)
If you look at the code, file ESP8266NetBIOS.cpp, line 215, in the netbios answer, you can see:
nbnsa.NBNSA_NODEADDRESS = WiFi.localIP(); // ulozime nasi IP adresu
Which works only if WiFi is in STA mode, but not AP mode.
The fix would be something like this:
if (WiFi.getMode()==WIFI_STA)
nbnsa.NBNSA_NODEADDRESS = WiFi.localIP(); // ulozime nasi IP adresu
else
nbnsa.NBNSA_NODEADDRESS = WiFi.softAPIP(); // ulozime nasi IP adresu
The text was updated successfully, but these errors were encountered: