Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b77ea50

Browse files
authored
+ WiFi.Config() on WiFi.cpp
Added WiFi.Config(IPV4,NETMASK,GATEWAY) function to configure static IP and disable DHCP
1 parent 4c1dae1 commit b77ea50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎libraries/WiFi/src/WiFi.cpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ int arduino::WiFiClass::begin(const char* ssid, const char* passphrase) {
3030
return _currentNetworkStatus;
3131
}
3232

33+
//Config Wifi to set Static IP && Disable DHCP
34+
void arduino::WiFiClass::config(const char* localip, const char* netmask, const char* gateway){
35+
wifi_if->set_network(localip, netmask, gateway);
36+
wifi_if->set_dhcp(false);
37+
}
38+
3339
int arduino::WiFiClass::beginAP(const char* ssid, const char* passphrase, uint8_t channel) {
3440

3541
#if defined(COMPONENT_4343W_FS)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /