hullie
March 7, 2011, 11:01am
1
Hi All,
I just can’t get DHCP to run, I get the following error:
An unhandled exception of type ‘System.Exception’ occurred in GHIElectronics.NETMF.W5100.dll
Additional information: Use Dhcp class,GHIElectronics.NETMF.W5100.Dhcp.dll
The debugging target runtime is loading the application assemblies and starting execution.
Ready.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files\Microsoft .NET Micro Framework\v4.1\Assemblies\le\mscorlib.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Native.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files\GHI Electronics\GHI NETMF v4.1 SDK\Assemblies\le\FEZDomino_GHIElectronics.NETMF.FEZ.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files\GHI Electronics\GHI NETMF v4.1 SDK\Assemblies\le\GHIElectronics.NETMF.W5100.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘D:\SVNWorkingFolder\sentul\Livepigeonflights\Micro.net\Network domino\Network domino\bin\Debug\le\FEZ Domino Application.exe’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files\GHI Electronics\GHI NETMF v4.1 SDK\Assemblies\le\GHIElectronics.NETMF.W5100.Dhcp.dll’
The thread ‘’ (0x2) has exited with code 0 (0x0).
#### Exception System.Exception - 0x00000000 (1) ####
#### Message: Use Dhcp class,GHIElectronics.NETMF.W5100.Dhcp.dll
#### GHIElectronics.NETMF.Net.NetworkInformation.NetworkInterface::EnableDhcp [IP: 0006] ####
#### MySocketServer::Main [IP: 004a] ####
A first chance exception of type ‘System.Exception’ occurred in GHIElectronics.NETMF.W5100.dll
An unhandled exception of type ‘System.Exception’ occurred in GHIElectronics.NETMF.W5100.dll
Additional information: Use Dhcp class,GHIElectronics.NETMF.W5100.Dhcp.dll
The program ‘[1] Micro Framework application: Managed’ has exited with code 0 (0x0).
Code is as follows:
using System;
using System.Text;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Net;
using GHIElectronics.NETMF.Net.Sockets;
using GHIElectronics.NETMF.Net.NetworkInformation;
using Socket = GHIElectronics.NETMF.Net.Sockets.Socket;
public static class MySocketServer
{
public static void Main()
{
byte[] mac = { 222, 173, 190, 239, 254, 237 };
WIZnet_W5100.Enable(SPI.SPI_module.SPI1,
(Cpu.Pin)FEZ_Pin.Digital.Di10,
(Cpu.Pin)FEZ_Pin.Digital.Di9, true);
NetworkInterface.EnableDhcp(mac, "domino");
Anyone got an idea?
Best regards,
Jeroen
hullie
March 8, 2011, 3:41am
3
Thank you! It’s working now ;D
Did you get to the bottom of it? There is nothing in beta docs about not using NetworkInterface. Just curious.
The unused DHCP methods in NetworkInterface are going to be removed, in the next release.
Thanks Joe! Good to know.
Just curious,
Does the new dhcp functionality retrieves/updates the dns server information as well as the ip address/mask/gateway ?
[quote]Does the new dhcp functionality retrieves/updates the dns server information as well as the ip address/mask/gateway ?
[/quote]
Yes it does that.