Hi!
I am using an Arduino mega 2560 with an Ethernet shield. I am making a project, where you can set your IP address, gateway etc. through a socket. I did a couple of things with this communication and every time it was correct. Now its not. The data i send:
(This socket program is a python program)
my_StringFIXIP = "\x00\x00\x00\x25\x00\x00\x00\x24\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x0D\x00\x96\xA9\xAA\x24"
ws.send(my_StringFIXIP)
And I only need the last 4 bytes. This is gonna be the IP address. The last 4 bytes are (on the Arduino side):
16:25:43.041 -> 194
16:25:43.041 -> 150
16:25:43.085 -> 194
16:25:43.085 -> 169
So this is a complete mess.
But the first 20 bytes are ok.
This is how i want to give value of the IP:
IPAddress GivenIPAddress;
GivenIPAddress[0] = readedData[21];
GivenIPAddress[1] = readedData[22];
GivenIPAddress[2] = readedData[23];
GivenIPAddress[3] = readedData[24];
Can anyone help me with that?