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 Firmware v4.2.0 RC5 (Netduino + Netduino Plus)


  • Please log in to reply
138 replies to this topic

#21 PeterB

PeterB

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationSydney, Australia

Posted 12 May 2012 - 01:20 PM

After the upgrade to 4.2rc5 I had problems with my serial reads on COM1. Data was being corrupted and exceptions were being thrown from Encoding.UTF8, which I found was due to data ASCII>126. The character stream should not have been giving characters in the upper section of the ascii table so I was confused. Looking at the data it became obvious that it was corrupted. I reset the Arduino that sends the serial data, but still corrupt data stream. I decided to swap to COM2 and all was okay again. Is DIO 0 & 1 (aka COM 1) used differently in 4.2rc5? Also what do I need to do to go back to 4.1.06 on the N+ and in 2010VC?

#22 Firegun

Firegun

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 May 2012 - 01:31 PM

Chris,

Unfortunately the same bug network bug I found previously still exists in RC5. The same steps in the first post still recreate the problem.

http://forums.netdui...ted-on-boot-up/


Cabadam,

Don´t you have same issue then I? (or I have same as yours..) If you just put the 4.2RC5 firmware, and no app deploy, are you able to ping your Netduino Plus (we should be able to ping it at this moment, right??)? Turning it on with or without the cable connected don´t matter to me.

Hi Firegun,

Quick question: did you set the MAC address (through MFDeploy) to match the sticker on the back of your Netduino Plus?

If so, do you have a copy of Wireshark? That's probably the best place to start to diagnose the issue...

Chris


I´ve spended some time with wireshark and what I could see is that the Netduino don´t respond to ARP requests, nor will it respond to ping then. Deploying an app "solves" the problem till next time it is turned off.

#23 Firegun

Firegun

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 May 2012 - 01:36 PM

...
Also what do I need to do to go back to 4.1.06 on the N+ and in 2010VC?


On the Netduino you need to do the same you´ve done to put the new firware on it, just upload the desired version, the step are the same. On the VS2010 you just need to select the .Net Micro Framework 4.1 as your target framework (right click on the project, Properties -> Application -> Target Framework), it will as to reopen your project after you change that, and it´s all back to 4.1.

Hope it helps!

#24 PeterB

PeterB

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationSydney, Australia

Posted 12 May 2012 - 02:19 PM

On the Netduino you need to do the same you´ve done to put the new firware on it, just upload the desired version, the step are the same. On the VS2010 you just need to select the .Net Micro Framework 4.1 as your target framework (right click on the project, Properties -> Application -> Target Framework), it will as to reopen your project after you change that, and it´s all back to 4.1.

Hope it helps!

Thanks Firegun. I'm back on 4.1.06 but it looks like I've toasted DIO 0 & 1 :(
I'd just got into bed and was tablet surfing when I read your reply, got up, rugged up and now back to where I was last night (minus COM1).

Only have the 1 N+, local suppliers don't have NGO yet and out of stock of N+.

I was going to use both COM ports as I just have the Arduino monitoring the Solar Hot Water system working and I was about to engage in another Arduino to monitor the wireless Weather Station (Practical Arduino style).

#25 Cabadam

Cabadam

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 12 May 2012 - 02:21 PM

Hi Cabadam,

Dang, I was hoping that the networking bugfixed in NETMF 4.2 QFE1 would fix that for you.

Can you post a bug report for this on netmf.codeplex.com? And title it "Ethernet never works if not connected on bott up with SAM7X"? We can work with Microsoft to address the issue from there...

Chris


Hmm, OK, few interesting notes. Turned out I was still on .NET 4.2 RTM, not QFE1. I had clicked the link for it, but saw a post date of 2011 and no particularly obvious edits and assumed it was the same as RC4. Closer inspections shows it is NOT (I see the there is a "Works with RC5" reference, and the link itself has changed to be a QFE1 file). I uninstalled the old .NET Micro SDK and Netduino SDK and installed both of the ones currently linked in that post.

That did solve the problem as-stated in the post. The device does now respond to pings after the ethernet cable is plugged back in.

However, it apparently has caused new ones. The first thing my app does is try to connect to a local HTTP server to retrieve the current local time.

On the first startup, this typically(**) works fine. However, hit the reboot button... and more often than not the socket Connect() call just hangs up. Note that no pulling of the cable was involved - just a reboot of the ND+. That seems to hang indefinitely from what I have seen. Only way to fix it is to pull the cable (that then causes the Connect call to throw an exception - which my code handles and reboots itself), or to explicitly reboot/power cycle the ND+. During this time when it is stuck, the ND+ is responding to pings, so it is still somewhat responsive.

At first, I thought it might be some weird interaction with the WiFi bridge, but I removed that and plugged in straight to my router and the behavior did not change.

I just tried a test run of rebooting the ND+ 10 times and seeing if it connected or not (rebooting by pushing the reset button). 3 times it started up and connected successfully. 7 times it hung on Connect(). Ouch...

** I have actually seen this behavior on a power-cycle (pull out the USB connection, reconnect it) as well, so it may not be specific to a reboot.

Since the behavior of this has changed - I wanted to confirm if you still want me to open a ticket over at codeplex, or if you had any other ideas to try first.

Thanks!

#26 Cabadam

Cabadam

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 12 May 2012 - 02:26 PM

Cabadam,

Don´t you have same issue then I? (or I have same as yours..) If you just put the 4.2RC5 firmware, and no app deploy, are you able to ping your Netduino Plus (we should be able to ping it at this moment, right??)? Turning it on with or without the cable connected don´t matter to me.


Sorry, I just now read your post. It does seem very similar in terms of a reboot causing lots of problems - especially now that I correctly updated the .NET Micro SDK and Netduino SDK versions (oops...).

Although - your later posts seem to be referencing that you cannot ping. For me, pinging is the one thing that seems to fairly consistently work...

#27 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 May 2012 - 07:14 PM

Hi Cabadam,

Since the behavior of this has changed - I wanted to confirm if you still want me to open a ticket over at codeplex, or if you had any other ideas to try first.

The memory buffer settings for Ethernet changed in recent updates of .NET MF, so it's possible this is causing the issue you're seeing.

Can you create a small repro which demonstrates the issue? And perhaps we can test it here to see if we experience the same?

Thank you,

Chris

#28 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 12 May 2012 - 08:12 PM

One other item that may be worth mentioning. When starting SAM-BA (I have version 2.11) is that it takes a long time to load. In my case maybe 3 to 4 minutes. So if it looks stuck, take a break. :P

#29 Firegun

Firegun

    Member

  • Members
  • PipPip
  • 24 posts

Posted 13 May 2012 - 03:52 AM

I´ve made more tests, and my current situation is: I erase the N+, put the 4.2RC5, configure the network (fixed IP, MAC address set too), and it don´t answer to network (pings). If I restart it (from onboard button or from MFDeploy), with the network cable plugged, it starts the network and it works till power disconnection (even if I disconnect the network cable several times). A restart with the cable disconnected don´t make network to start. Is there anyway to get more debug information? Idk what to do, beside going back to 4.1, again ;/

#30 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 May 2012 - 12:39 PM

Is there anyway to get more debug information? Idk what to do, beside going back to 4.1, again ;/

Wireshark. This will show whether or not NETMF is trying to connect to the network (and if it notices the network connection).

Past that, we need to repro this and probably dig down with a custom SAM7X devboard (with JTAG). On the newest boards (Netduino Go and Shield Base) we have onboard JTAG, but things are a bit trickier on Netduino and Netduino Plus.

Chris

#31 Cabadam

Cabadam

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 13 May 2012 - 04:15 PM

Hi Cabadam,

The memory buffer settings for Ethernet changed in recent updates of .NET MF, so it's possible this is causing the issue you're seeing.

Can you create a small repro which demonstrates the issue? And perhaps we can test it here to see if we experience the same?

Thank you,

Chris


Chris, I've attached a small sample project which I have replicated the problem on.

Basically, it attempts to connect to google on port 80. It also sets a timer for 10 seconds (plenty of time to connect). If that timer fires and the connection has not already completed successfully, it is considered a failure.

I was not running it in the debugger (because I was constantly rebooting the device to replicate this), so I came up with alternative ways to see the result.
If you have one of the serial LCDs sitting around, connect it to COM1. It will write out the IP address once it retrieves it, and then either success or failure.
Otherwise, the onboard LED will flash twice for a successful connection. If it flashes once, that was a failed connection.

To replicate this, I just waited for it to say success or failure, and then hit the ND+ button to reboot it. Just repeat that over and over.

Note: During this entire process, pings are successful (as is the DNS lookup for Google!). It is just the outgoing TCP connections which are failing.

Attached Files



#32 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 13 May 2012 - 08:27 PM

One other item that may be worth mentioning.

When starting SAM-BA (I have version 2.11) is that it takes a long time to load. In my case maybe 3 to 4 minutes. So if it looks stuck, take a break. :P


Carb

Are you using a 64bit OS? If so try giving the instructions i posted here a bash, stopped samba being so aggravating to open for me...

YMMV

Nak.

#33 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 13 May 2012 - 09:15 PM

Carb

Are you using a 64bit OS? If so try giving the instructions i posted here a bash, stopped samba being so aggravating to open for me...

YMMV

Nak.

Thanks Nak,

Windows 7 64bit.

I got the update, but the first time I tried I uninstalled the program, re-downloaded the sam-ba, then tried again. Luckily I went to get a beer and it had come up while I was gone.

Chuck

#34 Jeka

Jeka

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 14 May 2012 - 12:36 AM

Hello Chris! Can you tell me SAM7X devboard name?

#35 Firegun

Firegun

    Member

  • Members
  • PipPip
  • 24 posts

Posted 14 May 2012 - 12:43 AM

Hello Chris! Can you tell me SAM7X devboard name?


Would it be the at91sam7x512-ek ?

#36 Fjolle

Fjolle

    New Member

  • Members
  • Pip
  • 7 posts

Posted 14 May 2012 - 10:20 AM

Hey guys. Did the watchdog class ever get implemented? I can't seem to get it working. :(

#37 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 May 2012 - 03:13 PM

Hello Chris! Can you tell me SAM7X devboard name?

We use AT91SAM7X-EK and swap out the 256KB chip for a 512KB chip manually.

Chris

#38 PhilG

PhilG

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts
  • LocationMaine

Posted 14 May 2012 - 09:11 PM

I deleted my .NETMF and Netduino SDKs and downloaded and installed the latest 4.2. I took an unused (4.1.0.6) Plus board, erased it using the pad, loaded the boot with SAMBA, loaded the 4.2RC5 firmware and config with MFDeploy without problem. Afterwards, Ping, no response. Started over again with boot, firmware, config, still no response. Unplugged the USB cable, blue screen, reboot, launch MFDeploy Ping OK, restored the MAC. Ping, no reply. Tried deploying my code from VS no go. The board will occasionally respond to MFDeploy and reports correct MAC but I have not been able to deploy from VS at all. Tried various USB ports, reset button pushes, reconnects, nothing.

#39 Firegun

Firegun

    Member

  • Members
  • PipPip
  • 24 posts

Posted 14 May 2012 - 09:21 PM

I deleted my .NETMF and Netduino SDKs and downloaded and installed the latest 4.2. I took an unused (4.1.0.6) Plus board, erased it using the pad, loaded the boot with SAMBA, loaded the 4.2RC5 firmware and config with MFDeploy without problem. Afterwards, Ping, no response. Started over again with boot, firmware, config, still no response. Unplugged the USB cable, blue screen, reboot, launch MFDeploy Ping OK, restored the MAC. Ping, no reply. Tried deploying my code from VS no go. The board will occasionally respond to MFDeploy and reports correct MAC but I have not been able to deploy from VS at all. Tried various USB ports, reset button pushes, reconnects, nothing.


Have you tried to restart (from the onboard button) the N+ and ping it again? You using static IP? I´ve have noted that mine board seems works OK with DHCP, or the restart. But on other two boards, from friends of mine the network apparently worked fine on preliminary tests.

#40 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 May 2012 - 10:24 PM

Hi PhilG, If you reflash it with .NET MF 4.1, does it work alright for you? Did 4.2 RC4 work for you? There may be some new USB code in NETMF 4.2 QFE1 which doesn't agree well with your computer setup... Chris




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.