Skip to content

Commit

Permalink
Disable DHCP when setting IP Address manually
Browse files Browse the repository at this point in the history
  • Loading branch information
vjmuzik committed Oct 15, 2020
1 parent cc12d04 commit 8171a29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/NativeEthernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,13 @@ void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress g
// return;
}

fnet_dhcp_cln_release(fnet_dhcp_cln_get_by_netif(fnet_netif_get_default()));
fnet_netif_set_ip4_addr(fnet_netif_get_default(), ip, subnet);
fnet_netif_set_ip4_gateway(fnet_netif_get_default(), gateway);
fnet_netif_set_ip4_dns(fnet_netif_get_default(), dns);

while(!link_status){
}


}

void EthernetClass::init(uint8_t sspin)
Expand Down

0 comments on commit 8171a29

Please sign in to comment.