You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Arduino Ethernet library allows for users to only to specify the IP address for static IP configuration. There are versions of begin for static IP with only IP, with IP and DNS IP, with IP, DNS IP and gateway and the last version adds a parameter for mask. The methods with few parameters create default values for the missing parameters. Default value for mask is 255.255.255.0, default value for DNS IP and gateway IP is based on the IP address with last byte changed to 1.
The first WiFi library has versions of config like the Ethernet library has versions of begin for static IP, but the default values are not set in the library and neither in the firmware. The address stays 0.0.0.0 so the versions of config with less parameters don't work. WiFi101 and WiFiNINA copied this error. (my PR are waiting to fix it) The new WiFiS3 library has it right so I guess it confirms it as a feature of the API.
esp8266 and esp32 WiFi library don't have versions of config for default values of DNS IP, gateway IP and mask.
My libraries of course have this feature, because I think it is useful. The default values are good for most of the networks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The Arduino Ethernet library allows for users to only to specify the IP address for static IP configuration. There are versions of
begin
for static IP with only IP, with IP and DNS IP, with IP, DNS IP and gateway and the last version adds a parameter for mask. The methods with few parameters create default values for the missing parameters. Default value for mask is 255.255.255.0, default value for DNS IP and gateway IP is based on the IP address with last byte changed to 1.The first WiFi library has versions of
config
like the Ethernet library has versions ofbegin
for static IP, but the default values are not set in the library and neither in the firmware. The address stays 0.0.0.0 so the versions ofconfig
with less parameters don't work. WiFi101 and WiFiNINA copied this error. (my PR are waiting to fix it) The new WiFiS3 library has it right so I guess it confirms it as a feature of the API.esp8266 and esp32 WiFi library don't have versions of
config
for default values of DNS IP, gateway IP and mask.My libraries of course have this feature, because I think it is useful. The default values are good for most of the networks.
What is your opinion?
Beta Was this translation helpful? Give feedback.
All reactions