Main Site Documentation

CHIPWORKX DHCP enabling ISSUE


#1

Hi,

I’m also trying to use the following code on my Chipworkx :

 
var interfaces = NetworkInterface.GetAllNetworkInterfaces();
 if (!interfaces[0].IsDhcpEnabled)
 interfaces[0].EnableDhcp();
 else
 interfaces[0].RenewDhcpLease();
 

But the RenewDhcpLease throw me an Exception after a while (that seems to be a time out…
DHCP has been set with MFDEPLOY, and when I ask the NetworkInterface boot configuration, it show me :

DHCP : YES
IP : 0.0.0.0
MASK : 0.0.0.0
GATEWAY : 0.0.0.0
no DNS

Which are effectively the params I entered in MFDeploy.

Does it mean that something goes wrong with the way I’m trying to use it ?

Is dynamic DNS disabled ? I also tried with my DNS Address also but it does not seem to be related to…

It seems like if no DHCP would be found, however one exists, and all my other machines are in DHCP mode…I also checked that free addresses were available on the DHCP. It is OK.

Thanks for your feedback


#2

What is the mac address you are using? You should make sure that the MAC address you are using is valid.
We provide a dedicated MAC address with ChipworkX Module. it is on the white sticker placed on the module.


#3

Hi Joe,

It is effectively the one on the sticker, which is :

00-21-03-80-15-B3

Is that a correct one ?


#4

I assume that you tried it with static networking settings before using DHCP and you confirmed that it is connected. I mean you could ping the IP address from another station on the same network. Right?


#5

Yes,

There’s no problem in static mode. I also have an embedded web site on the module, and everything is fine with it ! I can change the static IP from the web page and apply without any problem, which means that the networkinterface correctly respond to changes on its IP configuration…

The only problem is to obtain a lease from my dhcp server (which is my internet box in fact)…

The exception return is also not thrown has a specific exception, but only has the generic “Exception” type…If it could help…Perhaps a packet format specificity in the NEt library ?.. ???


#6

Details on the System.Exception :

exc.Message
“Exception was thrown: System.Exception” string
exc.StackTrace
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::UpdateConfiguration
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::RenewDhcpLease

m_HResult 4278190080

The problem is the same if I try to configure DHCP from MFDeploy. Just after I Apply, my previous IP does not ping anymore, but not other is given in exchange… :frowning:


#7

You a different MAC address generated by this website:
http://www.macvendorlookup.com/

Can you test it on another network with different DHCP server?


#8

Hi Joe,

I tried with a diffferent MAC from your given site. No changes !

One information more. Also the interfaces[0].EnableDHCP() causes the same problem, not only the RenewLease().

As you can see in the stack trace. It seems to be a problem during “Updateonfiguration” method in the NETMF framework. Do you know what this method deals with ? Is there another way to do the same with GHI framework instead of the MIcrosoft one ?

I’ll try with my home box dhcp this week-end and tell you back…


#9

Maybe configuration region is corrupted? Can you try to completely erase and re-flash the whole device?


#10

Hi Gus,

As for some other problems I have, don’t you think it would be better to wait for the new arriving version ?

I can walk on static IP for the moment, and take care of other things I have to develop…


#11

You are only updating the firmware on your device, not re-installing the SDK. It should only take few seconds to finish.


#12

Hi Everyone,

I finally tried with a soft DHCP Server download from internet, that I already used for several installations (cf. http://www.dhcpserver.de/dhcpsrv.htm), and the Module did respond correctly to the lease, without any problem. So MY problem now is…What’s happening with my box ?..??.. :’(

I will probably never know…If someone find any idea…you’re welcome !

Thanks for your help,

Louis


#13

What is your box? it may have compatibility problems.


#14

Hi All,

My box is an ORANGE LIVEBOX PROII (from SAGEM).

Finding the problem would take a while so that I’ll try later to do so…For the moment, I note this in my TODO list.

If you have such a sniffer that would help capturing packets and/or emulate DHCP Server in C# code, it will help…

Thanks,


#15

Network sniffer: http://www.wireshark.org