Ethernetshield automatic connect with every lan


dear all.
i noop .. sorry.. dut try best..:-) :(
only hope can me. forum otherwise for... :smiley-confuse:

i try make universal part of sketch ethernet shield.
now need set shield work with:
code: [select]
ethernet.begin(mac,ip,dnsserver,gateway,subnet);
only when use board in other lan need internet need set every time ip , gateway etc,

is there no solution start shield dhcp option.
so board connect lan , internet, dhcp.
something like:
code: [select]
ethernet.begin(mac,dhcp);???

i thet there no static ip..
no problem, when shield internet automatic

hope have sketch example me.

thanks!!

code: [select]
if(!ethernet.begin(mac))
{
   serial.println("no dhcp. setting static");
   ethernet.begin(mac,ip,dnserver,gateway,netmask);
}
else
{
   serial.print("dhcp ip ");
   serial.println(ethernet.localip());
}


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > Ethernetshield automatic connect with every lan


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts