Skip to content

NetBIOS library only works in STA mode, and not in AP mode. #5300

Closed
@pabloandresm

Description

@pabloandresm

Title says it all. The problem is the same as the ESP8266NetBIOS library (esp8266/Arduino#8139).

If you look at the code, file NetBIOS.cpp, line 95, in the netbios answer, you can see:
nbnsa.addr = WiFi.localIP();

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.addr = WiFi.localIP();
else
nbnsa.addr = WiFi.softAPIP();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions