Tuesday, March 3, 2009

SocketException ErrorCode 10035 – Network Switch Problem

Some days ago a customer had a problem with the Tahoe-II board. A simple demo application was accessing a http server using sockets and download the html source. Using the Microsoft or Tahoe-II emulator everything works fine, but deploying and running it from a real device I got following error message from time to time:

#### Exception System.Net.Sockets.SocketException - E_FAIL (1) ####
#### Microsoft.SPOT.Net.SocketNative::poll [IP: 0000] ####
#### System.Net.Sockets.Socket::Poll [IP: 0011] ####
#### System.Net.Sockets.Socket::Connect [IP: 0029] ####
#### NetworkTester.Program::Main [IP: 00f7] ####
#### SocketException ErrorCode = 10035 
Exception (first chance) of type "System.Net.Sockets.SocketException" in Microsoft.SPOT.Net.dll
#### SocketException ErrorCode = 10035
#### SocketException ErrorCode = 10035
#### SocketException ErrorCode = 10035
SocketException: Exception was thrown: System.Net.Sockets.SocketException Error-code: 10035 
The thread 0x1 exited with code 0 (0x0).

While playing around I got the device running on a different switch. The first used switch was a Netgear switch with 100/1000 MBit auto selection. As the Tahoe-II board is using a 10 MBit network card I put this on a 100 MBit switch and everything works fine. I’m not sure if this is the real problem, but since using the slower network switch the customer is happy.

2 comments:

Flyte said...

I've had this problem with my TahoeII as well.

I think it says E_FAIL(5) sometimes as well.

I'm using a Buffalo AirStation g54 broadband router with built in 10/100 switch.

Flyte said...

I just got this one whilst enabling DHCP..

01/01/2004 00:00:03 - Enabling DHCP...
#### Exception System.Exception - E_FAIL (1) ####
#### Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::UpdateConfiguration [IP: 0000] ####
#### Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::EnableDhcp [IP: 000f] ####
#### BlankProject.MainViewWindow::.ctor [IP: 013b] ####
#### BlankProject.App::.ctor [IP: 000d] ####
#### BlankProject.App::Main [IP: 0004] ####
A first chance exception of type 'System.Exception' occurred in Microsoft.SPOT.Net.dll
An unhandled exception of type 'System.Exception' occurred in Microsoft.SPOT.Net.dll