Hang during debug with ethernet connected
#1
Posted 10 January 2011 - 10:37 PM
#2
Posted 11 January 2011 - 04:19 AM
#3
Posted 11 January 2011 - 02:19 PM
Hi Luke,
Are you catching exceptions in your program? Perhaps a network connection attempt is failing and an exception is thrown (and not caught...causing your program to stop)?
Do you have a sample which we could use to reproduce the issue? We'd love to dig into it... We're working on a series of networking-related bugfixes for .NET MF right now so this is very timely.
Chris
Chris,
Thanks for the reply. I am catching exceptions in my program when doing anything network related. It works fine without ethernet connected. The exceptions are caught and dumped to the debug output and it will run for hours (let it run for over 16 hours last night).
This morning I created this simple program:
using System; using System.Net; using System.Net.Sockets; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; namespace NetduinoPlusSimpleTest { public class Program { public static void Main() { OutputPort LED = new OutputPort(Pins.ONBOARD_LED, false); while (true) { Debug.Print(DateTime.Now.ToString()); LED.Write(!LED.Read()); Thread.Sleep(1000); } } } }
This hung with the system time at 2 minutes, 11 seconds when the ethernet was attached. I'll do some more testing to see if the time is always the same. It hasn't stopped yet without ethernet attached and I'm at 5 minutes. I'll let it run today just to be sure that it doesn't crash.
OK, update: I'd been using my ethernet cable from my desktop to test. I just moved it to another cable so that I could write in the forum while it's running and it hasn't stopped yet. My desktop is connected directly to my 2wire AT&T U-verse modem. The other connection is to a Netgear GS108 gigabit switch (which is then connected to the U-verse modem). They are both on the same layer 2 network.
I'll test some more tonight and let you know what I find.
#4
Posted 11 January 2011 - 03:17 PM
#5
Posted 11 January 2011 - 03:40 PM
#6
Posted 11 January 2011 - 04:51 PM
Very interesting. Are you using Static IP or DHCP? And just to confirm, this is plugged into your Netgear switch?
I'm using static IP. It's doing this on both switches. At first it seemed that switching to the Netgear fixed the issue, but that wasn't the case.
#7
Posted 12 January 2011 - 03:09 PM
#8
Posted 12 January 2011 - 07:33 PM
#9
Posted 12 January 2011 - 10:38 PM
#10
Posted 12 January 2011 - 11:23 PM
#11
Posted 13 January 2011 - 02:57 AM
I had a similar issue. I was trying to use some of the networking examples and VS2010 froze during a depolyment. Now it can not detect the NetduinoPlus. I switched over to the deployment tool. When I switch the MFDeploy.exe to "USB" it will list the NetduinoPlus_NetduinoPlus but it will not allow me to do anything with it. If I try to ping it I get "Pinging... Error: No response from device". I also tried the Erase button with the same error. BTW does this erase the program or the firmware? If I deleted the firmware, how can I get it back on?
Hi Ron,
If an app ever locks you out of your Netduino Plus:
1. Unplug your Netduino Plus from your computer and make sure it's powered down.
2. Start up MFDeploy.exe on your computer (Start > Programs > .NET Micro Framework SDK > Tools > MFDeploy.exe)
3. Select USB transport
4. Hold down the pushbutton on your Netduino Plus and plug it into your PC. Keep holding down the button.
5. In MFDeploy, make sure your Netduino Plus appears in the top section next to USB.
6. Press the PING button. You should see a message "Pinging...TinyBooter" or "Pinging...Netduino Plus by Secret Labs"
7. Press the ERASE button. This will erase your Netduino app, and not the .NET MF firmware.
8. Unplug your Netduino Plus. You're good to go.
If you erase the firmware (using the advanced features of MFDeploy), it's available at the top of the respective forum.
Chris
#12
Posted 13 January 2011 - 02:58 AM
As a quick aside - how do you know what firmware you have installed?
Great question. Using MFDeploy (see previous post), select the Target Menu and the "Device Capabilities" menu option. This will show you lots of detail, including the version of Netduino firmware.
You'll use this tool to update the firmware as well.
Chris
#13
Posted 13 January 2011 - 07:09 AM
-Ron
Hi Ron,
If an app ever locks you out of your Netduino Plus:
1. Unplug your Netduino Plus from your computer and make sure it's powered down.
2. Start up MFDeploy.exe on your computer (Start > Programs > .NET Micro Framework SDK > Tools > MFDeploy.exe)
3. Select USB transport
4. Hold down the pushbutton on your Netduino Plus and plug it into your PC. Keep holding down the button.
5. In MFDeploy, make sure your Netduino Plus appears in the top section next to USB.
6. Press the PING button. You should see a message "Pinging...TinyBooter" or "Pinging...Netduino Plus by Secret Labs"
7. Press the ERASE button. This will erase your Netduino app, and not the .NET MF firmware.
8. Unplug your Netduino Plus. You're good to go.
If you erase the firmware (using the advanced features of MFDeploy), it's available at the top of the respective forum.
Chris
#14
Posted 13 January 2011 - 08:18 AM
Well I guess I really did it... Now it comes up as an unknown device and is not listed in the dropdown in the deployment tool.
Ron,
Did you erase the Netduino Plus using the ERASE pad? Or switch the deployment transport to serial? Or use the UsbClient feature in your code?
Worst case, you can erase your Netduino Plus completely using the ERASE pad and then flash it from scratch (first the bootloader using Atmel SAM-BA on a Windows XP/Vista machine and then the Netduino Plus firmware using MFDeploy).
Either way, let's step through it and get you back up and running here...
Chris
#15
Posted 13 January 2011 - 08:06 PM
Thanks
Ron
Ron,
Did you erase the Netduino Plus using the ERASE pad? Or switch the deployment transport to serial? Or use the UsbClient feature in your code?
Worst case, you can erase your Netduino Plus completely using the ERASE pad and then flash it from scratch (first the bootloader using Atmel SAM-BA on a Windows XP/Vista machine and then the Netduino Plus firmware using MFDeploy).
Either way, let's step through it and get you back up and running here...
Chris
#16
Posted 13 January 2011 - 08:21 PM
I think I erased the firmware. How can I tell if I erased the boot loader?
Thanks
Ron
Please try this:
1. Unplug your Netduino from your computer. Make sure it's powered down. Unplug anything that's plugged into it.
2. Plug your Netduino into your PC using a MicroUSB cable. The white and blue LEDs will turn on.
If the blue LED turns off after ~2.5 seconds, your Netduino is fully programmed.
If the blue LED never turns off, open up MFDeploy on your computer (Start > Programs > .NET Micro Framework SDK > Tools > MFDeploy.exe). Select USB transport.
If your Netduino appears in the pull-down, the bootloader is programmed (and if you press PING, it should respond TinyBooter). If the Netduino does not appears, you've erased the firmware completely.
If you have erased your Netduino Plus completely, grab the 64KB TinyBooter bootloader and flash it using SAM-BA. Then, deploy the Netduino Plus firmware using MFDeploy. You should be back up and running in a few minutes.
I'd be more than happy to pull together the files you need if you'd like.
Chris
#17
Posted 13 January 2011 - 08:58 PM
I will download and install SAM-BA. I would appreciate help finding the files.
Thanks
Ron
Please try this:
1. Unplug your Netduino from your computer. Make sure it's powered down. Unplug anything that's plugged into it.
2. Plug your Netduino into your PC using a MicroUSB cable. The white and blue LEDs will turn on.
If the blue LED turns off after ~2.5 seconds, your Netduino is fully programmed.
If the blue LED never turns off, open up MFDeploy on your computer (Start > Programs > .NET Micro Framework SDK > Tools > MFDeploy.exe). Select USB transport.
If your Netduino appears in the pull-down, the bootloader is programmed (and if you press PING, it should respond TinyBooter). If the Netduino does not appears, you've erased the firmware completely.
If you have erased your Netduino Plus completely, grab the 64KB TinyBooter bootloader and flash it using SAM-BA. Then, deploy the Netduino Plus firmware using MFDeploy. You should be back up and running in a few minutes.
I'd be more than happy to pull together the files you need if you'd like.
Chris
#18
Posted 13 January 2011 - 09:53 PM
The blue light comes on and stays on and the device does not show up under the list of USB devices in MFDeploy.
I will download and install SAM-BA. I would appreciate help finding the files.
Here you go.
I'd recommend using the v4.1.0.5 (production) firmware. These zip files contain both the TinyBooter bootloader and the .NET MF firmware files.
Chris
#19
Posted 13 January 2011 - 10:50 PM
I have now erased the netduino plus via the erase pad by pin D0.
As expected my computer says new device found, but will not automatically find the driver.
Are there two versions of SAM-BA? I see a SAM-BA_CDC.exe and a SAM_BA.exe.
I tried updating the driver to the atm6124_cdc.inf that the Readme_CDC.txt refers to, but
windos just says no driver found or invalid driver. As a result I can not select the port
when running SAM-BA.
Thanks
Ron
Here you go.
I'd recommend using the v4.1.0.5 (production) firmware. These zip files contain both the TinyBooter bootloader and the .NET MF firmware files.
Chris
#20
Posted 14 January 2011 - 12:11 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users