Skip to content

Commit 81ea6c5

Browse files
authored
Merge pull request martin-ger#166 from FrankNT/master
Fix: STA Static IP not working
2 parents 01136e7 + 1790fa6 commit 81ea6c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/esp32_nat_router.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ void wifi_init(const uint8_t* mac, const char* ssid, const char* ent_username, c
412412
ipInfo_sta.ip.addr = esp_ip4addr_aton(static_ip);
413413
ipInfo_sta.gw.addr = esp_ip4addr_aton(gateway_addr);
414414
ipInfo_sta.netmask.addr = esp_ip4addr_aton(subnet_mask);
415-
esp_netif_dhcpc_stop(ESP_IF_WIFI_STA); // Don't run a DHCP client
416-
esp_netif_set_ip_info(ESP_IF_WIFI_STA, &ipInfo_sta);
415+
esp_netif_dhcpc_stop(wifiSTA); // Don't run a DHCP client
416+
esp_netif_set_ip_info(wifiSTA, &ipInfo_sta);
417417
apply_portmap_tab();
418418
}
419419

0 commit comments

Comments
 (0)