Ver código fonte

add hostname

Anton Van Gorp 10 meses atrás
pai
commit
051f1ef7fa
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      src/powerbox.cpp

+ 2 - 0
src/powerbox.cpp

@@ -384,7 +384,9 @@ void setupWifi()
   WiFi.softAPConfig(wifiConfig.getSoftAPIPAddress(), wifiConfig.getSoftAPGateway(), wifiConfig.getSoftAPSubnet());
   WiFi.softAP(wifiConfig.getSoftAPSsid().c_str(), wifiConfig.getSoftAPPassword().c_str());
 
+
   // Connect to WiFi
+  WiFi.hostname("avg_powerbox");
   WiFi.begin(wifiConfig.getWifiNetworkSsid().c_str(), wifiConfig.getWifiNetworkPassword().c_str());
 
   if (WiFi.waitForConnectResult() != WL_CONNECTED)