Network Resetting Issue
#1
Posted 17 August 2011 - 12:18 PM
#2
Posted 17 August 2011 - 08:44 PM
Hi,
I've been playing with N+ at home plugged into my ADSL router/modem (Billion 7800G) and it works just fine. However, today I took the board into work and had a strange issue when connected to our network.
Plugging the N+ into our network - which I believe is some flavour of a cisco gigabit switch - causes the network adapter on the N+ to appear to continually reset. By this I mean the three n/w leds turn on, one blinks a few times then all three turn off for a couple of seconds. This repeats.
Originally I was using HttpWebRequest to retrieve some data from a webserver on my PC. This code wass hanging on the GetResponse call. After simplifying the code, I've ended up with a main that only calls Thread.sleep in a loop. The network still appears to reset endlessly.
I'm using a static IP and firmware 4.2.
Curiously, about 1 in 100 resets, the board functions fine and I can ping it and make socket connections back to the server running on my PC. But for the other 99 times, the board is not pingable.
I've brought the board home again tonight, changed the static IP to one on my network and the board works fine. So I'm wondering is it something to do with the networking hardware at work?
Thanks
Can you post the code you are using?
#3
Posted 18 August 2011 - 05:02 AM
Can you post the code you are using?
Sure. It's basically:
main() { while(true) { Thread.sleep(5000); } }
I thought it was something to do with my code so simplified and simplified until I ended up with that. If you erase the app using mfdeploy so that there's no running program it still does the reset thing.
After reading this, http://forums.netdui...in-the-network/ it looks like I'm seeing the same issue - the link going up and down repeatedly.
#4
Posted 18 August 2011 - 08:44 PM
Sure. It's basically:
main() { while(true) { Thread.sleep(5000); } }
I thought it was something to do with my code so simplified and simplified until I ended up with that. If you erase the app using mfdeploy so that there's no running program it still does the reset thing.
After reading this, http://forums.netdui...in-the-network/ it looks like I'm seeing the same issue - the link going up and down repeatedly.
I'm no expert, I'm just starting to learn too, but I think it's because you only have one thread and you are blocking it for 5 seconds at a time.
Try this: main() { while(true) { int i = 0; } }
#5
Posted 18 August 2011 - 08:56 PM
#6
Posted 19 August 2011 - 01:22 AM
Hi oofki,
The Thread.Sleep function simply puts the main thread to sleep...you can have background threads running (including networking) without any issue.
Chris
Thanks Chris, like I said this was my simple as possible test case. Any ideas as to why the network would be resetting like this?
#7
Posted 19 August 2011 - 01:48 AM
If other devices work on this router, I'm guessing that it's a glitch in the lwIP open source networking stack.Thanks Chris, like I said this was my simple as possible test case. Any ideas as to why the network would be resetting like this?
Could you please post a bug report ("work item/issue") on this over at netmf.codeplex.com? The .NET MF 4.2 release is almost ready to ship...so this is the last chance to get critical bug reports in. [Otherwise, it could be a year before the issue is addressed in an official release.]
Also...do you have a copy of Wireshark? It would be really helpful to see a copy of the network traffic...see what is arriving at the Netduino Plus and what is going out...
Chris
#8
Posted 23 August 2011 - 01:16 AM
Hi lesmondo,
If other devices work on this router, I'm guessing that it's a glitch in the lwIP open source networking stack.
Could you please post a bug report ("work item/issue") on this over at netmf.codeplex.com? The .NET MF 4.2 release is almost ready to ship...so this is the last chance to get critical bug reports in. [Otherwise, it could be a year before the issue is addressed in an official release.]
Also...do you have a copy of Wireshark? It would be really helpful to see a copy of the network traffic...see what is arriving at the Netduino Plus and what is going out...
Chris
Hi Chris,
I'll raise a bug report. Unfortunately since our network is switched I don't think I'll be able to capture the N+ packets - my PC doesn't see them.
Les
#9
Posted 24 August 2011 - 10:36 AM
Hi Chris,
I'll raise a bug report. Unfortunately since our network is switched I don't think I'll be able to capture the N+ packets - my PC doesn't see them.
Les
Although your corporation might frown on it (some will)...
At my day job (an extremely large, security conscious corporation) we run on a gigabit switch network, some of us developers who need to use Wire Shark occasionally will also have a dumb, gigabit hub in our office… plugging in network, Netduino and your PC should allow you to “see” what’s going on between your N+ and the (anti-social ) company switch.
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#10
Posted 25 August 2011 - 05:55 AM
Although your corporation might frown on it (some will)...
At my day job (an extremely large, security conscious corporation) we run on a gigabit switch network, some of us developers who need to use Wire Shark occasionally will also have a dumb, gigabit hub in our office… plugging in network, Netduino and your PC should allow you to “see” what’s going on between your N+ and the (anti-social ) company switch.
Shhh..... they might hear you That's what I'm hunting around for now. I'm also thinking that if it is the cisco switch/N+ combo that's the problem, maybe putting a cheap hub between the two might fix it.
#11
Posted 25 August 2011 - 05:57 PM
Shhh..... they might hear you That's what I'm hunting around for now. I'm also thinking that if it is the cisco switch/N+ combo that's the problem, maybe putting a cheap hub between the two might fix it.
Yeah! I hate that Heisenberg thing.
If my message helped you... how 'bout giving me a
www.MessingWithReality.com
#12
Posted 31 August 2011 - 02:33 AM
#13
Posted 31 August 2011 - 08:02 AM
#14
Posted 02 September 2011 - 03:54 AM
If it's a packet, then it's almost definitely a .NET MF firmware (or lwIP network stack) issue.
Les, are you able to anonymise the capture data (without jeopardising it) so that a bug report can be submitted on CodePlex including the capture?
#15
Posted 16 September 2011 - 02:14 AM
Les, are you able to anonymise the capture data (without jeopardising it) so that a bug report can be submitted on CodePlex including the capture?
Update: I bought a cheap 10/100 switch from ebay and that's fixed the problem
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users