-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Currently using
void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet)
generates a compiler error, as IPAddress from the ESP8266 core doesn't have a _address member:
https://github.com/esp8266/Arduino/blob/master/cores/esp8266/IPAddress.h
These lines:
Lines 86 to 94 in dbed40a
| #if ARDUINO > 106 || TEENSYDUINO > 121 | |
| W5100.setIPAddress(ip._address.bytes); | |
| W5100.setGatewayIp(gateway._address.bytes); | |
| W5100.setSubnetMask(subnet._address.bytes); | |
| #else | |
| W5100.setIPAddress(ip._address); | |
| W5100.setGatewayIp(gateway._address); | |
| W5100.setSubnetMask(subnet._address); | |
| #endif |
Should be:
W5100.setIPAddress(ip.raw_address());
W5100.setGatewayIp(gateway.raw_address());
W5100.setSubnetMask(subnet.raw_address());
It isn't necessary to check the version, as raw_address() is available since Arduino 1.0.5:
https://github.com/arduino/Arduino/blob/22997bbfd5c841a60e9a5909868c62cd459c798d/hardware/arduino/cores/arduino/IPAddress.h
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels