Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
523 B

  1. /*
  2. NETBIOS MODULE
  3. Copyright (C) 2017-2019 by Xose Pérez <xose dot perez at gmail dot com>
  4. */
  5. #include "netbios.h"
  6. #if NETBIOS_SUPPORT
  7. #include <ESP8266NetBIOS.h>
  8. void netbiosSetup() {
  9. static WiFiEventHandler _netbios_wifi_onSTA = WiFi.onStationModeGotIP([](WiFiEventStationModeGotIP ipInfo) {
  10. auto hostname = getSetting("hostname", getIdentifier());
  11. NBNS.begin(hostname.c_str());
  12. DEBUG_MSG_P(PSTR("[NETBIOS] Configured for %s\n"), hostname.c_str());
  13. });
  14. }
  15. #endif // NETBIOS_SUPPORT