Closed Stormer2k0 closed 3 years ago
@pkerspe I used this syntax as in WiFiSTA.cpp that is the order the function is written:
dns1 and dns2 arn't nessesary as those have been given a default value in the constructor:
added in version v0.4.2 Example 3 shows how to use it.
IPAddress staticIp(192, 168, 178, 49);
IPAddress gatewayIp(192, 168, 178, 1);
IPAddress subnetMask(255, 255, 255, 0);
stepperMotorServer->setStaticIpAddress(staticIp, gatewayIp, subnetMask);
Or you can add the new config nodes to the json config file in the server config section:
...
{
"serverConfiguration": {
...
"staticIP": "192.168.178.49",
"gatewayIP": "192.168.178.1",
"subnetMask": "255.255.255.0"
},
...
please test and report if all works as requested
It would be rather useful to be able to configure a static IP the same way you configure the SSID name and password. You still can just add a static IP by just by adding this in the main:
And if not adding static IP to the library then maybe add an example for the people who don't know how to do this.