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

ESP8266NetBIOS library only works in wifi STA mode, and not in wifi AP #8139

Closed
pabloandresm opened this issue Jun 17, 2021 · 2 comments · Fixed by #8622
Closed

ESP8266NetBIOS library only works in wifi STA mode, and not in wifi AP #8139

pabloandresm opened this issue Jun 17, 2021 · 2 comments · Fixed by #8622

Comments

@pabloandresm
Copy link
Contributor

pabloandresm commented Jun 17, 2021

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

@earlephilhower
Copy link
Collaborator

@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 git logs?

@pabloandresm
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants