Go Down

Topic: Change ip of arduino and restart ethernet. (Read 159 times) previous topic - next topic

mactsk

Hi, i have a sketch that automates some switches via http page.
I store the IP address in the EEPROM, and with a function i take the new ip address and save it to the EEPROM.
The problem is that i need to manually reset the arduino to get the new ip address since it seems that a ethernet.stop() is not present.

I know (?) that manually triggering the reset pin with an IO pin is not a proper way of reset.
How can i force the ethernet shield to take the new IP?

Thanks!

SurferTim

Call Ethernet.begin again. It works with the w5100.

Perehama

This question and answer addresses most of my question. I too have a function to re-assign the IP address along with some condition statements to choose DHCP or static IP. For this reason, I have moved Ethernet.begin out of void setup() into a function which I call once during setup, and can call again later. I am still working out other parts of the program so I am unsure if this will work.

Can anyone confirm if calling Ethernet.begin again will work with Norbert Truchsess's UIPEthernet version 1.09 using an ENC28J60?

I can pull the reset pin on the ENC28J60 in addition to calling Ethernet.begin if that is needed.

Go Up