Because I am having the same problem on the Raptor with MF 4.3 that PhilM was having with the Cobra, Socket.Accept() locks up and never returns, so no TCP connections can be made. You suggested a work-around to this problem here:
Did you try to use “ExecutionConstraint.Install”? This is better way for your problem.
Or you can create a wrapper class, put Accept() in a new thread and you can stop any time.
About the reset pin ENC, I think this is for another issue. if I remember correctly, after working for long time, ENC stop responding. And it depended on router/switch, just few of them have this issue. Reset the pin was used for this case. But after we improved the ENC28 driver in 4.2, this way is no longer to use.
In 4.3 we use same driver with 4.2 that included these improvement. But we may take a look in that again.
In case you still want to reset the ENC, just pull the reset pin low-high. Don’t reset whole ENC object. If you reset whole enc28, you need to open and initialize everything again. And depends on code, just reset this pin in case error happens. No meaning when you reset then create enc28 object.
For easier and faster for us (and you), can you please post a very simple code for us to reproduce your problem?
We can write a simple code that use Accept() but we know you won’t happy if we say: “Can not reproduce” . That is why we usually need exactly user’s code.
Yes, I tried “ExecutionConstraint.Install”, it did not work. Please see my post:
“Connect() and Accept() can sometimes hang forever” https://www.ghielectronics.com/community/forum/topic?id=16565&page=2
I tried to create a wrapper class, put Accept() in a new thread, it did not work. Please see my post: https://www.ghielectronics.com/community/forum/topic?id=16565&page=2
I posted the code I was trying. In this thread I posted the code I was using to try to reset the ENC28.
I don’t really want to reset the ENC28, what I really want is for Socket.Accept() to not freeze and never return.