DHCP Problem with VB.NET

Hi.
i have the spider-kit for a few day and testing it .
I’m using the J11D-Modul with
.EnableStaticIP(“192.168.2.210”, “255.255.255.0”, “192.168.2.1”)

and it works very well but wenn I change to
.EnableDhcp()
Do While .IPAddress = "0.0.0.0"
Debug.Print("Awaiting IP Address " )
Thread.Sleep(1000)
Loop
mvarIP = .IPAddress
Debug.Print("IP Address Granted: " + mvarIP)
End With

    GT.Networking.WebServer.StartLocalServer(mvarIP, 80)

nothing happens and I get no IP
I thing I need thomthing like
ethernet.UseDHCP()
but I can’t find thomething like that.

need for help…thanks

Daniel

thanks,
so I can stop trying…

Hi Daniel,
Just have a new post in my blog with some VB code… and works for me :wink:

http://msmvps.com/blogs/peplluis/archive/2012/12/11/vb-gadgeteer-webserver-sdk-4-2-qfe2-and-spider-premium-library-s.aspx

I hope this helps.
Best Regards,
PepLluis

Are you sure to have a DHCP properly configured (I mean that will give a IP corresponding to your mac address?)

@ PepLluis
Thanks, but it don’t works on my system…
I allways get the last static IP not a dhcp

what hardware do you use

@ Daniel,

My hardware is Spider with 4.2.7.0 and J11D

As Leforban say it depents of DHCP configuration,for example if you get the IP from a DHCP lease.
My doubt is understand when you say “always get the last static ip”… this ip is out of DHCP Range or is in the same segment?

A good chance is try with another router, or assign an static IP to check if all is working fine.

        ethernet.NetworkInterface.EnableStaticIP("192.168.1.35", "255.255.255.0", "192.168.1.1")

then in timer_tick you can show assigned IP adding “Debug.Print(ip.tostring)”

Regards,
PepLluis,

lets face it, most home class routers don’t do a great job of running DHCP; there’s many that have issues with certain NICs in PCs or similar. If you can, you can try another router.

I do not have a spider