Skip to content

Commit

Permalink
Merge pull request #166 from FrankNT/master
Browse files Browse the repository at this point in the history
Fix: STA Static IP not working
  • Loading branch information
martin-ger authored Jul 5, 2024
2 parents 01136e7 + 1790fa6 commit 81ea6c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/esp32_nat_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ void wifi_init(const uint8_t* mac, const char* ssid, const char* ent_username, c
ipInfo_sta.ip.addr = esp_ip4addr_aton(static_ip);
ipInfo_sta.gw.addr = esp_ip4addr_aton(gateway_addr);
ipInfo_sta.netmask.addr = esp_ip4addr_aton(subnet_mask);
esp_netif_dhcpc_stop(ESP_IF_WIFI_STA); // Don't run a DHCP client
esp_netif_set_ip_info(ESP_IF_WIFI_STA, &ipInfo_sta);
esp_netif_dhcpc_stop(wifiSTA); // Don't run a DHCP client
esp_netif_set_ip_info(wifiSTA, &ipInfo_sta);
apply_portmap_tab();
}

Expand Down

0 comments on commit 81ea6c5

Please sign in to comment.