Go Down

Topic: Working DNS client for Arduino 21? (Read 2734 times) previous topic - next topic

martin_bg

I there any working DNS client library for Arduino 21 out there? I could not find any..


cf20852

#2
Jan 05, 2011, 11:36 pm Last Edit: Jan 05, 2011, 11:40 pm by cf20852 Reason: 1
Georg Kaindl's website referenced in the previous reply says his libraries won't work on versions later than 0018 due to the refactoring of the Ethernet library, and that he plans to fix it eventually.  I tried compiling one of the examples (SynchronousDNS.pde) in his DNS library under 0021 and 0022, and it wouldn't compile.  On the first attempt, it complains that you need to #include <SPI.h>, and after you do that, it complains about a lot of undefined things.  So I'd really like to know how to get it to work under 0022.  Looks to me like one either waits for Georg's update, or wades in and refactors his code.

mrtaylor

#3
Jan 06, 2011, 01:44 am Last Edit: Jan 06, 2011, 02:02 am by mrtaylor Reason: 1
Sorry forgot to tell you to use a different ethernet library

http://code.google.com/p/kegger/downloads/list

I don't what OS your using but for Ubuntu just unzip it into ~/sketchbook/library directory.  

Try the examples in the Ethernet.zip file.  I just installed a clean copy of 0022 and kegger ethernet library and it compiled just fine.

martin_bg

Thanks guys

I was able in the mean time to find a workaround patch code and DNS/DHCP is now working on my Arduino 21

The link you have is useful for the thread history and other similar searches

cf20852

And in the meantime I refactored EthernetDNS to work with the 0019+ Ethernet library.  Had to add a write_data() fn to w5100.cpp in the Ethernet utilities among other things--it was in w5100.c pre-0019 but not in w5100.cpp (or I may just be going blind).  SynchronousDNS.pde now compiles under 0021, but I haven't tested it yet.  If it works, I may keep it, otherwise I may just go with the other Ethernet library as suggested (thanks! ;D ), 'cuz it would be nice to have the DHCP functionality as well without much additional effort.

cf20852

#6
Jan 07, 2011, 03:36 am Last Edit: Jan 08, 2011, 12:08 am by cf20852 Reason: 1
The library mrtaylor references in Reply #3 above works for me, stand-alone.  Thanks again!

My refactored version of Georg Kaindl's EthernetDNS code seems to work as well, :o, although I occasionally get an error code -6 that I need to investigate.  I think I'll try both the Kegger version and the Kaindl version for my project and pick one that is reliable, and if both are, I'll choose the one that uses the least memory.

zoomkat

Anybody have a simple working client code showing how the server ip address line below is replaced with something like myip.no-ip.com using the DNS ethernet library?

Code: [Select]

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 102 };
byte server[] = { 208, 104, 2, 86 };
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

cf20852

#8
Jan 08, 2011, 03:09 am Last Edit: Feb 03, 2011, 07:40 pm by ChipFinMD-USA Reason: 1
Got Georg Kaindl's EthernetDHCP working under 0021 too, at least to the extent that his SynchronousDHCP.pde example works for me.  My approach is a bit messy, and I think I need to clean it up a bit.  Not a software guy by trade  :P

Update February 3, 2011:  Got a message from Georg this morning stating that he has updated his libraries at http://gkaindl.com/software/arduino-ethernet so that they will work with Arduino versions 0019 and later as well as 0018 and earlier.  Thanks, Georg!

Go Up