Skip to content

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

Closed
@pabloandresm

Description

@pabloandresm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions