Setting Ethernet shield IP and Mac address vis SD Card

I am using the Ethernet shield with SD card. i want to to be able to change the IP and Mac address by modifying a file on the SD card and not having to change the main sketch. can anyone suggest a way to set the Ethernet IP address and Mac address using the SD card.

Thank You David

In setup(), open and read the file. Pass those values to Ethernet.begin(); The file format is up to you. You can store the values as binary but that would be hard to edit. I'd recommend using file.parseInt() to get each of the 4 fields of the IP address and 6 fields of the MAC address.

Remember that if your fixed IP address is a.b.c.d and your Default Gateway or DNS Server addresses are not a.b.c.1 you have to specify them.

Thank You John, I have not used paerselnt before. how would i pass the data to each of the fields?

IPAddress ip(192, 168, 0, 177);

Thank You David Smith


spycatcher, yes it is. i am out of the country and google seams to be blocked here or just really bad internet . I will look it up when i get back to the states. thank You for asking.