Go Down

Topic: Get IP Address of Anyone Connected to my Arduino set up as server (Read 4 times) previous topic - next topic

Jeremy-arduino

#15
Mar 07, 2011, 07:55 pm Last Edit: Apr 22, 2011, 04:56 pm by Jeremy-arduino Reason: 1
OK, I feel like the village idiot... Yes, I was looking for and gave you the wrong files... Here are the correct ones...
http://www.towerboy.com/arduino/Client.h //Removed from my server now.
http://www.towerboy.com/arduino/Client.cpp //Removed from my server now.

I made the changes to them and I still get the same error as before:
Code: [Select]
sketch_mar07a.cpp: In function 'void loop()':
sketch_mar07a:47: error: 'class Client' has no member named 'IP_address'


Any ideas? I am using the arduino uno if that makes a difference...

Jeremy

Jeremy-arduino

maybe i messed something up, because now I can't compile anything with Ethernet.h in it... overwriting messed up files now...

Jeremy

robtillaart

After modifying files you might need to restart all instances of the IDE.

Which version of the IDE are you using?

Rob
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Jeremy-arduino

OK, here is what I have now... It took me a while to figure out that in your snippets of the .h and .cpp file I was supposed to find some of the text and add the pertinant stuff right after it... Got that done now. I am running Ver0022 and yes, every time I make a change to the files, I close and reopen all the Arduino IDE's. When I compile now, this is what I get:
Code: [Select]
C:\Users\Jeremy\Desktop\arduino-0022\libraries\Ethernet\Client.cpp: In member function 'void Client::IP_address(uint8_t*)':
C:\Users\Jeremy\Desktop\arduino-0022\libraries\Ethernet\Client.cpp:26: error: 'getSn_DIPR' was not declared in this scope

???

Jeremy

robtillaart


@ Jeremy :

See my previous post, but here again:
The ethernet lib changed in version 19. The patch proposed here was for version 18.

-----
1)    #include <SPI.h>  should be added for version 19 and up
2)   'getSn_DIPR' was not declared in this scope

The first was solved easily, do you know how to fix the second? Fixed!!
The second is to use the code below in Client.cpp

void Client::IP_address(uint8_t * addr)
{
   W5100.readSnDIPR(_sock, addr);    // replaces the getSn_DIPR(_sock, addr); V18 and below
}

Hopes this helps,
Rob
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up