Unfortunately i have to discover that network is still unreliable. :wall:
Socket.Accept() either returns error code 10054 or 10056 which might be acceptable but in 50% of the cases the board crashes and start to output low level MCU Exceptions.
I am going back to the previous SDK who didn’t showed this issue. Will use that for the time being and keep my fingers crossed. I will not spoil any minute more on G120/GHI netmf 4.2 It already gave me to much sleepless nights. Time to take radical steps.
@ Dat I am afraid i don’t understand your question. Interface of what? If you mean network interface its the RS9110 Wi-Fi
Update:
Returning back to SDK R2 also shows the error as first discovered in SDK R3 by me. Unfortunately it wasn’t noticed before.
The attachment shows 2 network traffic traces. In one trace the G120 crashes and in the other trace the socket.accept returned error 10056 4 times but finally the requested files were delivered to the client browser.
If can make this happen regularly, can you please try with Ethernet instead of WiFi? Do you still see the same behavior? We want to solve this ASAP but we need more info if you can help.
@ Dat - Hope to send you some details in the course of the week. What i already can share is that the problem until now only shows up when using the Opera webbrowser version 12 running on windows7 32 bit. The webbrowser is requesting an image file and then it goes wrong. It looks like that the socket or underlying TCP/IP network code on the G120 does not handle the request properly.
@ Dat - Yes, other browsers do work. The following piece of JavaScript add html code to the DOM and as a result the webbrowser requests for the 2 image files.
$('#allmeasurings').append('<div class="map_name"><div class="mapFrame"><div class="mapData"><canvas class="smallpMap" id="pol' + i + '" onmouseover="OnMouseOverPolaroid(' + i + ');" onclick="OnClickPolaroid(' + i + ');" style="background-color: grey;"></canvas></div><div id="homepMapIcon' + i + '" class="homepMapIcon"><img src="images/trade/HomeIcon.png" alt="" /></div><div class="deletepMapIcon"><img src="images/trade/CloseButton.png" style="width:100%; height:100%;" alt="" onclick="onclickDeletepMan(' + i + ');" /></div></div><label id="tm' + i + '">meting ' + (i + 1) + '</label></div>');
The requested image “HomeIcon.png” is 3208 bytes in size and “CloseButton.png” is 4328 bytes in size. The files are stored on an SD memory card.
When the webbrowser starts to execute the process of getting the images some negotiating network traffic can been seen in a network protocol analyzer. Sometimes this result in G120 crash and sometimes this results in delivering the requested files. When the G120 does not crash the first 4 socket.Accept’s generates a socketexception with code 10056 but the next 2 socket.Accept’s are legal and results in the delivering of the requested files.
Only the first time the browser request this files it goes wrong. Once loaded new requests does not fail.
@ andre.m - Yes, the browser picks them from his cache. I checked if maybe for additional requests a http request was made like IsModifiedSince… but that’s not the case, so yes the 2nd attempt it comes from the browser cache.
When the system does not crash this is what i can see from debug output… 4 x an exception and then 2 normal socket.accepts
10:45:26.160 10/30/2013 10:45:26,2,Exception Message: Exception was thrown: System.Net.Sockets.SocketException StackTrace: Microsoft.SPOT.Net.SocketNative::acceptSystem.Net.Sockets.Socket::AcceptSenticsLib.MyHttpServer::RunBedApplication.Program::Main, Exeption in Accept SocketErrorCode: 10056
10:45:26.557 10/30/2013 10:45:26,2,Exception Message: Exception was thrown: System.Net.Sockets.SocketException StackTrace: Microsoft.SPOT.Net.SocketNative::acceptSystem.Net.Sockets.Socket::AcceptSenticsLib.MyHttpServer::RunBedApplication.Program::Main, Exeption in Accept SocketErrorCode: 10056
10:45:26.947 10/30/2013 10:45:26,2,Exception Message: Exception was thrown: System.Net.Sockets.SocketException StackTrace: Microsoft.SPOT.Net.SocketNative::acceptSystem.Net.Sockets.Socket::AcceptSenticsLib.MyHttpServer::RunBedApplication.Program::Main, Exeption in Accept SocketErrorCode: 10056
10:45:27.341 10/30/2013 10:45:27,2,Exception Message: Exception was thrown: System.Net.Sockets.SocketException StackTrace: Microsoft.SPOT.Net.SocketNative::acceptSystem.Net.Sockets.Socket::AcceptSenticsLib.MyHttpServer::RunBedApplication.Program::Main, Exeption in Accept SocketErrorCode: 10056
10:45:27.448 ACCEPT received
10:45:27.498 incdecREQ:1
10:45:27.508 Do Socket.Poll
10:45:27.519 Socket.Poll Select Read TRUE
10:45:27.533 ACCEPT received
10:45:27.598 incdecREQ:2
10:45:27.608 Do Socket.Poll
10:45:27.640 Socket.Poll Select Read TRUE
10:45:27.694 /images/trade/HomeIcon.png
10:45:27.760 /images/trade/CloseButton.png
When the system crash it looks like it happens in the first socket.accept. I must say that when this particular request is done, already 100’s of previous request are made and handled without problems.
@ andre.m - True, i have done traces as you can see in one if the first posts. The problem is that i can’t do much on the G120 device site. Debugging on G120 needs to be done in the Socket / TCP/IP stack code.