Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino Plus not showing up in the Network


  • Please log in to reply
15 replies to this topic

#1 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 29 September 2010 - 06:10 AM

In the room where I play with the Netduino, I only have one Ethernet wire. So, I plug that wire into a second router's Internet port. I plugged my MacBook, Arduino Ethernet Shield, and Netduino Plus into the LAN port. I'm able to use the MacBook to login into this second router and see the attached device list. It shows the MacBook and Arduino Ethernet Shield, but not the NetduinoPlus. If I plug the NetduinoPlus into the first router, it does show up in the first router's attached devices list. Can someone tell me what I need to do so the second router behaves like the first? They're both Netgears, the one connected to cablemodem is a WNDR3300, the second one is a WPN824v2.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 September 2010 - 06:12 AM

Did you set the IP address on your Netduino Plus so that it would be part of this other router's network? Are you using DHCP or static IP? Chris

#3 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 29 September 2010 - 06:34 AM

Did you set the IP address on your Netduino Plus so that it would be part of this other router's network? Are you using DHCP or static IP?

Chris

This is the Socket call that works on the main router but not on the second router.
newSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
newSocket.Bind(new IPEndPoint(IPAddress.Any, 80));
newSocket.Listen(10);
Neither routers use static IP.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 September 2010 - 06:39 AM

Can you ping the Netduino Plus while it's plugged into the router? Have you tried static IP--to see if it works then? Chris

#5 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 29 September 2010 - 06:51 AM

Can you ping the Netduino Plus while it's plugged into the router? Have you tried static IP--to see if it works then?

Chris

I can't ping because I do not know its dynamic ip. I changed the code to this, but I'm having with that deployment issue again, so I don't know if it works or not yet.

newSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
newSocket.Bind(new IPEndPoint(new IPAddress( new byte[] {10,0,0,7}) , 80));
newSocket.Listen(10);
Chris, I really appreciate the late night support, but I think we both should get some sleep. I'll try more tomorrow.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 September 2010 - 06:58 AM

You can get the IP address of the Netduino Plus using: Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress Good night, hari.

#7 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 29 September 2010 - 07:19 AM

You can get the IP address of the Netduino Plus using:
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress

Good night, hari.

This is very odd... Using your suggestion, I was able to see the Netduino IP.
When connected to either router, the NetduinoPlus reports the same IPAddress (192.168.7.9)
I assigned for the first router's LAN ip range to be (192.168.7.1 to 254).
I do not do anything special on second router so my MacBook on second router is at 10.0.0.3, the second router is at 10.0.0.1, but the NetduinoPlus is at 192.168.7.9. That explains why I don't see it in attached device on second router, but why does it not have a 10.0.0.x IP?

Oh incidentally, 192.168.7.9 is also the IP shown for second router in the attached devices list of first router.

Good night Chris.

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 September 2010 - 07:26 AM

It looks like your Netduino Plus isn't getting a DHCP-allocated address on the second network. What happens if you do the following? Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp(); Chris

#9 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 29 September 2010 - 01:28 PM

It looks like your Netduino Plus isn't getting a DHCP-allocated address on the second network.

What happens if you do the following?
Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableDhcp();

Chris

EnableDhcp() fixed it! The Netduino Plus now shows up in attached devices list of the second router!
Thanks Chris!!! You're the best!

PS: My app worked once, but now it appears to be unresponsive in Socket.Accept(). I'll dig into this tonight. Thx again.

#10 John Dybowski

John Dybowski

    New Member

  • Members
  • Pip
  • 5 posts

Posted 06 August 2011 - 03:18 AM

Are there any known issues running the Netduino Plus on a 10MB Ethernet? On my 10MB test setup, running continuous ping, it misses one out of two or one out of three. Looks like it keeps dropping the link and bringing it up again? I see no problems at 100MB. I need to support both 10MB and 100MB networks. JD

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 August 2011 - 08:25 AM

Hi JD,

Are there any known issues running the Netduino Plus on a 10MB Ethernet? On my 10MB test setup, running continuous ping, it misses one out of two or one out of three. Looks like it keeps dropping the link and bringing it up again? I see no problems at 100MB. I need to support both 10MB and 100MB networks.

Very odd. We ran a demo on a 10MB network recently without any issues. I'm almost always on a 100Mbit link myself, but the Netduino Plus should do both 10Mbit and 100Mbit without a hitch.

You are running full-duplex 10Mbit, not half-duplex...correct?

Welcome to the Netduino community,

Chris

#12 John Dybowski

John Dybowski

    New Member

  • Members
  • Pip
  • 5 posts

Posted 06 August 2011 - 12:44 PM

Hi Chris, I've got a lot of years in embedded design but I'm just getting my feet wet with the Netduino so it's possible I'm missing something obvious; it's happened before. I've developed wired and wireless network applications generally ground-up - magnetics through PHY through MAC through stack - which is very time consuming and potentially error prone. I do have design experience with the ARM and PHY used in the Netduino Plus. I'm looking for a platform that can help me accelerate the process and minimize low-level headaches and I see great promise in the Netduino. Anyway, I'm running the Netduino into a 10MB half-duplex hub. I've tried Linksys and Netgear with the same results. I like to use a hub for development because the shared media lets me easily connect an external network analyzer to observe traffic to and from the target. When I plug the Netduino into the hub, without any other connections to the hub, the link appears to go up and down at regular intervals (about 1Hz, maybe a little longer). You can see this on the LED on the hub and the LED on the Netduino. The deployment tool indicates this, which sort of makes sense: Connecting to NetduinoPlus_NetduinoPlus...Connected DM9161_AutoNegotiate Valid PHY Found: 31 PHY: Vendor Number Model = 0xA PHY: Model Revision Number = 0x0 DM9161_DSCSR = 0xF3F6 DM9161_BMCR = 0x3100 DM9161_DSCR = 0x414 Error: AutoNegotiate TimeOut This sequence will repeat indefinitely. I have diagnosed auto-negotiation problems in the past but unfortunately I don't have any equipment here capable of capturing the low-level bit sequence so I can't tell what's happening. With a direct connection to a 100MB Ethernet, or with no network connection at all, I get this: Connecting to NetduinoPlus_NetduinoPlus...Connected Is this correct? Seems like there should be more. I'm extremely happy with how quickly network applications can be created with this system but the issue I'm facing is a bit of a show stopper. I wonder if you have any ideas. John

#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 August 2011 - 09:43 PM

Hi John, Are you using DHCP or static IP? If DHCP, can you try static IP really quick and see if it makes any difference? Also, we'll be posting the .NET MF 4.2 release candidate within a few days. If you have a chance to test it against that, I'd appreciate it! There are a lot of networking bug fixes in the new release. Chris

#14 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 07 August 2011 - 12:13 AM

Also, we'll be posting the .NET MF 4.2 release candidate within a few days. If you have a chance to test it against that, I'd appreciate it! There are a lot of networking bug fixes in the new release.

Chris, It is impressive that the .NET MF 4.2 Release Candidate is available as of August 3rd... and you expect to have a firmware update only a few days from now.

Nevertheless, can you hurry? :(

Look at me - an obnoxious newb. Pushing the overlords to go faster. Ha! I love the internet! I am power! Faster, faster!

No. Seriously, I'm dying to see if my severe problems with networking-DHCP-static-IP-not-helping just magically go away with 4.2 RC. I haven't successfully connected since my Light me up! post. :angry:

The intro blurb at the above link confirms your optimism:

... several bug fixes and improvements, among which the most important (for NetduinoPlus) are:
- Broadcast and static DNS addresses support with DHCP for lwIP TCP/IP stack
- Improvements to the time service for lwIP and RTIP TCP/IP stacks

So, in summary, we love you guys! Keep us the good work! Just work faster. :) :) :)

#15 John Dybowski

John Dybowski

    New Member

  • Members
  • Pip
  • 5 posts

Posted 07 August 2011 - 03:27 AM

Hi John,

Are you using DHCP or static IP? If DHCP, can you try static IP really quick and see if it makes any difference?

Also, we'll be posting the .NET MF 4.2 release candidate within a few days. If you have a chance to test it against that, I'd appreciate it! There are a lot of networking bug fixes in the new release.

Chris


I tried it both ways with the same results. The problem occurs before the IP address comes into the picture, even before the Ethernet link comes up.

I'll test with MF 4.2 once it's available and see what happens.

JD

#16 John Dybowski

John Dybowski

    New Member

  • Members
  • Pip
  • 5 posts

Posted 10 August 2011 - 01:52 PM

Hi John,

Are you using DHCP or static IP? If DHCP, can you try static IP really quick and see if it makes any difference?

Also, we'll be posting the .NET MF 4.2 release candidate within a few days. If you have a chance to test it against that, I'd appreciate it! There are a lot of networking bug fixes in the new release.

Chris


I tried it both ways with the same results. The problem occurs before the IP address comes into the picture, even before the Ethernet link comes up.

I'll test with MF 4.2 once it's available and see what happens.

JD


Hi Chris,

10MB auto-negotiation issue.

OK. I ran a test with MF 4.2. I didn't use the Netduino Plus board but instead used a different, but compatible, board for testing. The USB and Phy are configured the same on this board as on the Netduino. I initially used MF 4.1 to make sure I could get it running and it ran, exhibiting the same problem. As expected, it's not a hardware issue. Then I moved to 4.2 and I still have the 10MB connect problem. I looked at the EMAC source and didn't see anything obvious in the auto-negotiation code. Could it be something as simple as the timeout? I see that the timeout for Netduino is shorter than when the netduino #define is not set.

Netduino contiues to report this sequence:

DM9161_AutoNegotiate
Valid PHY Found: 31
PHY: Vendor Number Model = 0xA
PHY: Model Revision Number = 0x0
DM9161_DSCSR = 0xF3F6
DM9161_BMCR = 0x3100
DM9161_DSCR = 0x414
Error: AutoNegotiate TimeOut

DM9161_AutoNegotiate
Valid PHY Found: 31
PHY: Vendor Number Model = 0xA
PHY: Model Revision Number = 0x0
DM9161_DSCSR = 0xF3F6
DM9161_BMCR = 0x3100
DM9161_DSCR = 0x414
Error: AutoNegotiate TimeOut

...

This will run forever.
DSCSR reports 'parallel detects signal link ready' but the auto-negotiation completed bit is not set. Thus, the timeout.

This is the capabilities dump:

HalSystemInfo.halVersion: 4.2.0.0
HalSystemInfo.halVendorInfo: Netduino Plus (v4.2.0.0 RC1) by Secret Labs LLC
HalSystemInfo.oemCode: 34
HalSystemInfo.modelCode: 177
HalSystemInfo.skuCode: 4097
HalSystemInfo.moduleSerialNumber: 00000000000000000000000000000000
HalSystemInfo.systemSerialNumber: 0000000000000000
ClrInfo.clrVersion: 4.2.0.0
ClrInfo.clrVendorInfo: Netduino Plus (v4.2.0.0 RC1) by Secret Labs LLC
ClrInfo.targetFrameworkVersion: 4.2.0.0
SolutionReleaseInfo.solutionVersion: 4.2.0.0
SolutionReleaseInfo.solutionVendorInfo: Netduino Plus (v4.2.0.0 RC1) by Secret Labs LLC
SoftwareVersion.BuildDate: Aug 7 2011
SoftwareVersion.CompilerVersion: 400902
FloatingPoint: True
SourceLevelDebugging: True
ThreadCreateEx: True
LCD.Width: 0
LCD.Height: 0
LCD.BitsPerPixel: 0
AppDomains: False
ExceptionFilters: True
IncrementalDeployment: True
SoftReboot: True
Profiling: False
ProfilingAllocations: False
ProfilingCalls: False
IsUnknown: False


It comes up reliably on a 100MB Ethernet.

JD




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.