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... disenchantment is the word


  • Please log in to reply
11 replies to this topic

#1 Doug Rathbone

Doug Rathbone

    Member

  • Members
  • PipPip
  • 11 posts

Posted 29 November 2011 - 11:06 PM

Hi everyone, i've had a bit of a rough ride with my netduino plus so far: i am using a fresh netduino plus device running 4.1 - i am building a device that talks to a web service and makes a single POST request when someone presses a button - DHCP appeared to not work no matter what i did to make it function. i never received an ip address. - using static ip address and tested gateway/dns details, Dns.GetHostEntry(Uri) always failed even after using ip and ethernet cables pulled straight from functioning computers. - i then thought that maybe it was a bug in 4.1 so upgraded to 4.2 rc 3 and sdk 4.2 and the above (DHCP/DNS) still doesn't work. - after binning all this code and moving to static ip connections just to try and get it off the ground, now Socket connections dont work - stepping through the code i get to the socket connection and then the debugging session dissappears into a black hole never to return. I have tried so many different things, learnt a lot along the way (i'm now a tiny bootloader and netduino flashing guru), but still seem so lost. I understand that it might be something wrong on my end (i've read posts about some dhcp servers/switches not working). The problem with this is that i am working on a semi-commercial project where i won't be in the position to try different switches until the device works. My first netduino project has left me feeling the product doesn't appear to be ready for prime time?? any help/moral support will be greatly appreciated.

#2 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 30 November 2011 - 10:59 AM

Hi Doug I can understand some disenchantment, but I reckon that is par for the course in any embedded development. To get to the bottom of your problems you should probably be a bit more specific with your faults. Give as much detail as you can, and find a way to reproduce the fault repeatedly. Nothing is harder to fix than an intermittent fault without much detail. I suggest you run wireshark and see what the network is doing. I suggest you run somebody else's standard simple socket test code, to remove the chance that the problem is in your actual application. I have heard that netduino struggles on busy networks could this be the problem? Can you go to your own personal router and subnet for testing purposes? Give these things a try. My netduino has been running a hacky multithreaded webserver for a couple of months and works with DHCP and on static IP, and routs out to the internet. That said the development time was greater than I was expecting, and I had quite a few frustrations but with the SD card and not with the network. Keep trying, one day, .net micro will be ready for prime time, maybe soon.
STEFF Shield High Powered Led Driver shield.

#3 ColinR

ColinR

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationCape Town, South Africa

Posted 30 November 2011 - 12:58 PM

I have heard that netduino struggles on busy networks could this be the problem?


This is the cause of a number of the intermittent issues.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 November 2011 - 04:36 PM

Hi Doug, Sorry that you're having troubles on your first project. No fun at all! The 4.2 firmware is still very much beta when it comes to networking, so let's stay away from that for the moment. Please reflash the TinyBooter and TinyCLR firmware for 4.1.0.6 or 4.1.1 beta and let's diagnose from there. Also, just to get started...let's go with static IP. Once everything is working, we can move to DHCP. But with DHCP, it can be hard to know if your Netduino is actually online or not (since there's no display showing you that it owns an IP address, etc.) So keep with static IP for the moment. Finally, the MCU on the Netduino is a powerful one for microcontrollers but not nearly as powerful as your PC. It is entirely possible to DDoS a Netduino with tons of broadcast traffic. If you run into trouble, try to put your Netduino on a network switch that doesn't forward a lot of broadcast data to your Netduino. Once we get you up and running, we can try to add each of these items individually... I'm confident that you'll be successful as long as we can isolate the ghost that's enchanting your board :) Chris

#5 lesmondo

lesmondo

    Member

  • Members
  • PipPip
  • 24 posts

Posted 01 December 2011 - 06:59 AM

Hey Doug, I'm building a project that'll sit on our corporate network and can relate to your problems. Basically, networking was (and still is) toast unless the NPlus is plugged into a separate unmanaged switch. Wireshark in our test lab showed the problem to be related to some cisco discovery packets causing the board to reset. I ended up getting a small 4 port TP-Link switch from ebay. Since moving to my cheapo switch, it works fine. Except for DHCP - that has never worked for me on various networks. Hope this helps. Les

#6 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 03 December 2011 - 02:03 AM

You may be on to something with the switch. I am running MF4.2 RC1 and have never had any problems using DHCP or static addresses. However, my Netduino is plugged into a Western Digital Livewire powerline adapter with 4 ethernet ports that act as a switch. One of these ports is hooked to the Router. I have also used an ethernet WiFi adapter directly attached to the Netduino without any problems. Baxter

#7 Doug Rathbone

Doug Rathbone

    Member

  • Members
  • PipPip
  • 11 posts

Posted 14 December 2011 - 05:44 AM

This kills me...

If it doesn't function on a network why put a NIC on it? If you wanted to do device to device comms point-to-point TCP would seem like a very heavy way to do it.

I have a seperate switch already.

i have a switch with my workstation and the netduino plus plugged in - the rest of the network is on another segment and simply uplinked into my desk switch.

I have tried many different simple approaches. I am now simply trying to make a socket connection to an IP on a port with a static IP address. DHCP doesn't work, DNS doesn't work.

i'm getting the following:

#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (3) ####
    #### Message: 
    #### Microsoft.SPOT.Net.SocketNative::connect [IP: 0000] ####
    #### System.Net.Sockets.Socket::Connect [IP: 001d] ####
    #### MoodMonitor.HumanInterface.WebService.HttpRequest::GetResponse [IP: 00e0] ####
    #### BMF.MoodMonitor.HumanInterface.Services.MoodMonitorService::TransmitMoodUpdate [IP: 004f] ####
    #### BMF.MoodMonitor.HumanInterface.Services.MoodMonitorService::SendMoodUpdate [IP: 000c] ####
    #### MoodMonitor.HumanInterface.Program::button1_OnInterrupt [IP: 0021] ####
    #### SocketException ErrorCode = 10053
    #### SocketException ErrorCode = 10053
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll
    #### SocketException ErrorCode = 10053
    #### SocketException ErrorCode = 10053

Again, i'm seriously starting to think that for anything network related this product simply isn't ready.

Would love a hand, but i get the feeling

#8 Doug Rathbone

Doug Rathbone

    Member

  • Members
  • PipPip
  • 11 posts

Posted 14 December 2011 - 06:09 AM

Actually i might be onto something...

when i connect using MFDEPLOY i get the following:

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 happens with DHCP on AND off with static address...

i have tried different ports on the switch, plugged into another switch. a switch that is off the network and on the network

thoughts?

#9 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 14 December 2011 - 07:59 AM

Hi Doug Rathbone, Appairently it can't auto detect it's settings (10/100Mbps, half/full duplex, etc.). Do you connect your Netduino with a switch or directly into the router? Could you please try a different switch? If you're switch is managed, can you modify the outlet settings and set it to 100Mbps full duplex?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#10 Doug Rathbone

Doug Rathbone

    Member

  • Members
  • PipPip
  • 11 posts

Posted 15 December 2011 - 10:08 PM

Hi Doug Rathbone,

Appairently it can't auto detect it's settings (10/100Mbps, half/full duplex, etc.). Do you connect your Netduino with a switch or directly into the router? Could you please try a different switch? If you're switch is managed, can you modify the outlet settings and set it to 100Mbps full duplex?


Thanks so much for your help... after shifting a custom made HttpRequest to the built in HttpWebRequest, and using my newly purchased switch all seems fine.

THANK YOU FOR PUTTING UP WITH MY FRUSTRATION... lol

Do you think the NIC support will get better?

#11 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 16 December 2011 - 11:56 AM

THANK YOU FOR PUTTING UP WITH MY FRUSTRATION... lol

I'm glad I could help. I know the feeling of a purchase feeling a dissapointment and the Netduino Plus should never be one in my humble opinion ;)

Do you think the NIC support will get better?

The firmware still gets a lot of improvements, so I surely hope so!
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#12 Arbiter

Arbiter

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationBrisbane, Australia

Posted 18 January 2012 - 09:05 AM

I'm finding networking a bit erratic too. I did find that when DHCP failed, using MFdeploy to switch to static and then back to DHCP seemed to knock it loose, so to speak. TCPIP is heavyweight but how else can you route, switch and generally internetwork your way across wifi, ethernet, fibre, microwave relays and satellites round the whole planet using commodity gear?
One day, all this too shall parse.




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.