G120 and Sockets, reliability problem - Need help!

@ PhilM -

We fixed it, if you want a firmware for testing purpose, you can email to GHI.

Hello Dat
Is it a new firmware from this week, or is it the one from last week ?
We are in contact with GHI using emails and we received a new firmware last thursday from last week.
That firmware is more stable for socket communication using the ENC28J60.
But the bug is still present.
Let me know if it is a new firmware thanks.

@ PhilM -

Okie, I will check

I am having some issues wit socket.acceptā€¦where can i get firmware update?

Unfortunatly, Iā€™m still experiencing the same bug with the new beta firmware.
(Socket.Accept() stops accepting new connections)

Iā€™m making a VS2010 solution to easily reproduce the problem.

@ Dat would it be possible for you to post a snippet of the code that you used that was stable?
Thanks!

Phil, does your code do other things? I originally solved my accpt(0 issues but remove other tasks and reference in my projectā€¦i donā€™t know why but it fixed the problem.

I removed all supporting code then , re-enable other parts of my code till the issue started happening agian.

Thanks for the hint.
However, the issue still happens with the code snippet Iā€™ve posted in the first page, which I think is simple enough?
Iā€™m still waiting to see a stable example that donā€™t eventually stops working after X amount of time (usually minutes to hours).

I will try to remove all the extra references too (if thereā€™s any)

Iā€™m currently making a test bench to test the issue.
A little winform app will send requests via socket, and then receive a response. You can set the interval period between request, and see the total length of the test before it fails.

Again, itā€™s also worth noting that if I dispose the ENC28 interface, and then recreate it, socket.Accep() starts working again, until it fails like before.

However I cannot keep closing and creating the ENC interface, as eventually thereā€™s other bugs happeningā€¦

Lots of time is being wasted on this issue :frowning: Itā€™s a shame since we are doing so much more other stuff working and is very stable. But network is a very important part!

Ok here are 3 screenshot from the stress test program Iā€™ve just finished.
It tells the number of responses received, last time until it stops responding, and the packet size.
This was tested on a G120HDR with a ENC28J60 module, and a customboard which has the same schematic as a CobraII.
We used the test firmware released on 2013-07-24 that we received by email.

As you can see in the attached pictures, the higher the packet size, the quicker the ENC28J60 stops responding.
It took a while for the test at 1740bytes (~17 hours) to finally stop responding.
The one at 5290bytes took only ~5 minutes.

I would like GHI to test my stresstest program to be able to resolve this stability issue.

What would be the easiest way to share the VS2010 solutions (1 for the winform application, 1 for the G120) ?

@ PhilM - I am happy to join and do a test if you like although with RS9110 WiFi

Thanks for the help, although the problem does not occur with the RS9110 Wifi.
I will test it again over wifi, just to check if this is still true.
Let me know if you could test it with an ENC28J60 module though :slight_smile:

@ PhilM - No problem for me to test it out with G120HDR and ENC28

Excellent, Iā€™ve just put the test code on codeshare.
https://www.ghielectronics.com/community/codeshare/entry/780

Please let me know how it goes or if you have any problem running it.

@ PhilM - Perfectā€¦ I will run some test tomorrow and get back to you

CobraII+ENC28J60, packets of 5290 bytes: 5.3 hours. Will run again overnight.

@ PhilM -

I am trying to reproduce it without any change in your code, but until now it is running, (at packet size 5290 and more than 30 mins).
Let me see the bug first, then we can tell you what we can do.

And, I like your project on code share :)))

Just to say I just did the same test with the RS9110 wifi module and no issues after 22ish hours with packet size of 5290bytes.

Why it stops accepting connections on enc28j60 Iā€™m not sureā€¦

This is really strange, the socket.accept() bug happens both with our custom board (based on cobraII) and on g120hdr+enc28j60 moduleā€¦
I will try to make a separate network again (which Iā€™ve tried before) to see if it affects anything.
Can you try the same test and increase numtestlines to 200 or even more?

@ PhilM

it is running on FEZ Cobra II and more than 40mins
I just saw sometime it goes slow few minutes then it goes back fast again.
And sometime an exception 10056 (is connected already) is thrown.
But app is still running then.

Let me stop it and switch to G120 HDR

Good

Now it crashed! :)))