Go Down

Topic: DNS, DHCP and Bonjour/Zeroconf with Arduino (Read 10671 times) previous topic - next topic


There is a warning about not using Ethernet.begin(), what about if EthernetDHCP.begin() is unable to obtain a lease?

seems that something like the following would allow a fall back ip address if there is no DHCP server to talk to.
Code: [Select]

boolean DHCPconnection=true;

void setup()
if (EthernetDHCP.begin(mac)==0){
 Ethernet.begin(mac, defaultip, defaultgateway, defaultsubnet)

void loop()

if(DHCPconnection) {

I don't know if the DHCP library sets things in the Ethernet library such that I can't do this?  I'm writing the code ahead of getting my ethernet shield, but I wanted to know if there might be any issues with the above code.


Great Bonjour library!   How do can add multiple text-records?  I seem to be only able to add a single one.   What's the delimiter?


I have a problem with the EthernetDNS.
(This post is only, because otherwise I am not allowed to post images)


Oct 23, 2010, 05:13 pm Last Edit: Oct 23, 2010, 05:14 pm by Bremen_GSO Reason: 1
I think, the libraries will exactly do what I want, but it doesn't work.
I copied the libraries in my libraries folder.
But after the import of EthernetDNS.h it isn't displayed red, like the other libraries.
And there are many errors.
I hope somebody can hep me, because I think the libraries are excellent.
(It doesn't work with the images)


What are the errors?  I'm using these libraries and they seem to work fine.  What version of the arduino app are you using?  Maybe 19 and above broke them?  I'm using 18 still.


I used arduino21 and that was the problem.
Now, with arduino18 it works very well.
Thank you!


The bonjour library is exactly what I was looking for, any chance of getting an update for arduino 21?

Go Up