Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: 1 [2]   Go Down
Author Topic: DNS, DHCP and Bonjour/Zeroconf with Arduino  (Read 5548 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
boolean DHCPconnection=true;

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

void loop()

if(DHCPconnection) {
  EthernetDHCP.maintain()
}

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.
Logged

Seattle, WA
Offline Offline
Full Member
***
Karma: 0
Posts: 194
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
« Last Edit: October 23, 2010, 10:14:54 am by Bremen_GSO » Logged

Seattle, WA
Offline Offline
Full Member
***
Karma: 0
Posts: 194
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: 1 [2]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: