@ andre.m - Yes the reply time is high.
The configuration is simple: cobra->switch->PC (icmp reply time high)
PC->switch->switch->other PC (icmp reply time <1ms so I’m sure that the problem is not the switch between cobra and PC)
Firmware version 4.3.7.10
Gateway setted (192.168.2.6) but not used in this case because a simple lan connection
The code above is the only code that run on the board (a simple test program)
Yes, that’s important!
If you don’t have VisualStudio debugger running, disconnect the USB cable from the board.
A connected USB cable without any debugger connected slows down the board.
This is a bug in NETMF, which should be fixed in 4.4.x
@ Cybernox -
Hi, I can’t confirm your observation, but your constructor does not work for me.
The following code works for the ENC28 module on Cobra II WiFi Socket 6.
Ping Response time 3 ms for the first ping, then 1 ms (Debugger attached)
// Example for Ethernet ENC28 Module on FEZ Cobra II WiFi on Gageteer Socket 6
//References:
// GHI.Networking
// GHI.Pins
// GHIElectronics.Gadgeteer.FEZCobraIIEco
// Microsoft.Spot.Hardware
// Microsoft.SPOT.Net
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net.NetworkInformation;
using GHI.Networking;
using GHI.Pins;
namespace Cobra_II_NETMF_ENC28
{
public class Program
{
static EthernetENC28J60 _enc;
static bool _hasAddress;
private static bool _available;
public static void Main()
{
NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;
// this constructor does not work (seems to be for Cobra II Net Mainboard)
//_enc = new EthernetENC28J60(SPI.SPI_module.SPI2, G120.P1_10, G120.P2_11, G120.P1_9);
// these two constructors work
//_enc = new EthernetENC28J60(SPI.SPI_module.SPI2, (Cpu.Pin)(32 + 17)
//, (Cpu.Pin)(64 + 21), (Cpu.Pin)(32 + 14), 8000);
_enc = new GHI.Networking.EthernetENC28J60(Microsoft.SPOT.Hardware.SPI.SPI_module.SPI2
, GHI.Pins.FEZCobraII.Socket6.Pin6, GHI.Pins.FEZCobraII.Socket6.Pin3
, GHI.Pins.FEZCobraII.Socket6.Pin4);
_enc.Open();
_enc.EnableStaticIP("192.168.1.52", "255.255.255.0", "192.168.1.1");
_enc.EnableStaticDns(new[] { "192.168.1.1" });
while (!_hasAddress || !_available)
{
Debug.Print("Initializing");
Thread.Sleep(100);
}
while (true)
{
Thread.Sleep(1000);
}
}
static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
{
Debug.Print("Network available: " + e.IsAvailable.ToString());
_available = e.IsAvailable;
}
static void NetworkChange_NetworkAddressChanged(object sender, EventArgs e)
{
Debug.Print("The network address has changed.");
_hasAddress = _enc.IPAddress != "0.0.0.0";
Debug.Print("My IP is: " + _enc.IPAddress);
}
}
}