Hi all,
When I enable DHCP, my programs block (I wait more then 5 minutes)…
I try with :
No result.
Any idea ??
What is bad on my code ?
Thx,
Hervé
User_12
3
Could you please post a simple code that generates this issue?
My simplified code with same result :
namespace FEZ_Rhino_Application1
{
public class Program
{
public static void Main()
{
WIZnet_W5100.Enable(SPI.SPI_module.SPI1,
(Cpu.Pin)FEZ_Pin.Digital.IO38,
(Cpu.Pin)FEZ_Pin.Digital.IO67, true);
try
{
Dhcp.EnableDhcp(new byte[] { 0x00, 0x26, 0x1C, 0x7B, 0x29, 0xE8 }, "Aqua");
}
catch (Exception e)
{
Debug.Print(e.Message);
}
}
And in Visual Studio Output, I have :
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.SocketNative.sendto'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
Step into: Stepping over non-user code 'GHIElectronics.NETMF.Net.W5100.RegisterRead'
.........
I have erase my program and apply again last firmware version.
And now I have an exception : NullReferenceException
It’s more explicit for you ?
User_12
6
Use static IP instead of DHCP and check if you can ping that IP or not
Don’t work with Static IP.
Where problem ???
Ok I ping it.
First test i have choose duplicate address.
Finally I download and test GHI Electronics – Where Hardware Meets Software
→ Fail with client Timeout
Deploy one more time my program, and … it run successfully ( I’m crazy ??? :o)
Thx for your time
Hervé