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.
I bought a netduino plus 2 yesterday after tinkering with a netduino and wanting to try my hand at using the built on LAN port. Unfortunately I've spent the last 24 hours without a successful deployment as when I deploy from VS2010, I get the "target is not in an initialized state; rebooting" message in VS, and then once my device reboots, VS seems to lose attachment from the process(debugging has stopped) and my device is also not running the program.
Has anyone found a resolution to this? I can successfully deploy to the Netduino, and have tried flashing the firmware to 4.2.2.
Here is my program(and I've tried adding Thread.Sleep() many additional places and tried a few other variations using netduinioplus dlls and namespaces)[namespace and program name omitted for brevity]
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
public static void Main()
{
// write your code here
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
bool State = false;
while (true)
{
led.Write(State);
State = !State;
Thread.Sleep(2000);
}
Hi Jessie,
What operating system are you using? Also...Visual Studio 2010 or 2012? In a virtual machine?
If you press the pushbutton on your Netduino while it's rebooting, can Visual Studio connect?
Chris
I actually have the exact same problem. I can deploy code and run it on the netduino. But when I try to run debugger, it hangs.
Is there a setting that I need to set?
I am running win 7 with vs 2010. I followed the install order on the downloads section.
Any suggestions?
Hi mhzpower,
When you deploy code, how are you doing that? Pressing the "play" button in Visual Studio?
When you do...does the app start running but Visual Studio gives up?
Chris
I am suddenly having a similar issue with a second Netduino Plus 2. I updated the board to 4.2.2.2. When I deploy it works fine. When I press Play and it tries to deploy and Visual Studio Shuts down and the ND+2 either reboots or hangs. I am running VS2010 on Win7 with 4.2 NETMF.
Same here. I am running VMWare virtual machine Win7 with 4.2 NETMF and a ND2+ on 4.2.2.2. and VS 2010. For some reason Windows wants to install and use MFUSB drivers not the WINUSB drivers.
When the ND locks up and I unplug it, my VM shuts down. (nice feature!)
If I force WINUSB drivers, I can't see the ND on the USB bus and VS usually hangs up on deploy.
I have un-installed and re-installed both NETMF as well as Drivers without any effect.
My ND/MD+ will sometimes hang on deploy, but unplugging and plugging back in usually solves the problem.
Any additional ideas on troubleshooting would be great.
When I deploy an app I will right click on the solution in the explorer and select build...once it builds, I will right click and select deploy.
I can get the apps to deploy.
However if I press F5 "debug" it will build then the ND2+ will reset like other have seen. It will be running the new app. But VS2010 will not actually enter debug mode.
Same here. I am running VMWare virtual machine Win7 with 4.2 NETMF and a ND2+ on 4.2.2.2. and VS 2010. For some reason Windows wants to install and use MFUSB drivers not the WINUSB drivers.
When the ND locks up and I unplug it, my VM shuts down. (nice feature!)
If I force WINUSB drivers, I can't see the ND on the USB bus and VS usually hangs up on deploy.
I have un-installed and re-installed both NETMF as well as Drivers without any effect.
The gen2 Netduinos use the MFUSB drivers, rather than the WinUSB drivers. There have been reports of issues with the WinUSB drivers and USB 3.0 ports...so while that bug is getting squashed we haven't switched the gen2 hardware to WinUSB. [For gen1 hardware, .NET MF 4.2 necessitated the move to WinUSB--because of the USB hardware architecture.]
My ND/MD+ will sometimes hang on deploy, but unplugging and plugging back in usually solves the problem.
Any additional ideas on troubleshooting would be great.
If Visual Studio has trouble deploying, press the Netduino's onboard board to reset the board. If that doesn't work, disconnect and reconnect and Visual Studio should find it (as you experienced previously). [And if you can find a simple repro where the pushbutton doesn't reset the board...please let us know, as there are things we can do to make the software-based reset even more resilient.]
Chris
I am suddenly having a similar issue with a second Netduino Plus 2. I updated the board to 4.2.2.2. When I deploy it works fine. When I press Play and it tries to deploy and Visual Studio Shuts down and the ND+2 either reboots or hangs. I am running VS2010 on Win7 with 4.2 NETMF.
If you restart Visual Studio, are you able to deploy and debug?
If you can get Visual Studio to consistently crash (rather than every once in a while), we'd love to image the board and see if we can reproduce that here.
Also...VS2012 and the .NET MF 4.3 SDK have a bunch of improvements in this area. More informative debug connection data and resiliency was one of the NETMF team's goals for the new release.
Chris
However if I press F5 "debug" it will build then the ND2+ will reset like other have seen. It will be running the new app. But VS2010 will not actually enter debug mode.
Can you try something really quickly? Erase your current app via MFDeploy. Then press F5 and see if Visual Studio can deploy and attach the debugger.
If that fails, close Visual Studio and try to connect to the debugger (read-only) via MFDeploy "connect to device." Then ping the device a few times, and see if your Debug.Print statements appear in the MFDeploy window.
Chris
I completely uninstalled everything and installed C# and .NET SDK and ND SDK in the right order.
This is my app...blink only:
OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
while (true)
{
led.Write(true);
Thread.Sleep(200);
led.Write(false);
Thread.Sleep(200);
}
First time plugging the ND in, I can deploy the app. But the ND does not start running the app.
I can deploy a second time successfully, but the app does not start running. (blue light on steady)
To start the app I have to push the button (reset?) or unplug and plug the ND.
After that I can not deploy.
In the device manager, when I cannot deploy, the Netduino device says "This device cannot start. (Code 10)" When I re-plug the ND in, I get a properly working device.
I am showing device driver date 10/04/2012, ver 4.2.0.0.
Hi mhzpower,
What version and edition of Windows are you running? This is on a PC correct, and not on a virtual machine?
The Device Manager error is really curious. It seems like your USB controller is unhappy with the device after re-enumeration (without disconnect/reconnect).
Have you tried this on any other computers?
Chris
While waiting for your post, I kept trying to get it to work and tried both MFUSB and WINUSB drivers you posted on another thread. It didn't work.
I found by default the MFUSB drivers are installed.
So I decided to try it on another computer. It automatically installed the MFUSB drivers. On this computer I could deploy and debug with no problems and the Netduino device never stopped working.
Therefore I think you're right. Something (usb controller??) is not happy with the drivers. Also when I tried the WINUSB driver like AxelG above I get the same results.
Would you think that this has something to do with USB 3.0 usb controllers?
Hi AxelG,The gen2 Netduinos use the MFUSB drivers, rather than the WinUSB drivers. There have been reports of issues with the WinUSB drivers and USB 3.0 ports...so while that bug is getting squashed we haven't switched the gen2 hardware to WinUSB. [For gen1 hardware, .NET MF 4.2 necessitated the move to WinUSB--because of the USB hardware architecture.]If Visual Studio has trouble deploying, press the Netduino's onboard board to reset the board. If that doesn't work, disconnect and reconnect and Visual Studio should find it (as you experienced previously). [And if you can find a simple repro where the pushbutton doesn't reset the board...please let us know, as there are things we can do to make the software-based reset even more resilient.]
Chris
Thanks for the response Chris, and after re-installing I did notice the gen2 uses the older drivers. I did notice less frequent hangs when I don't have gen1 and gen2 NDs plugged in at the same time. However, when it does hang: hitting the reset button does the same as unplugging, my entire VM shuts down or get BSOD.
However, when it does hang: hitting the reset button does the same as unplugging, my entire VM shuts down or get BSOD.
Yeah, that's the reason that Microsoft moved NETMF to the WinUSB drivers. In certain configurations, and certain circumstances when things went wrong, detaching or rebooting the USB connection would cause a BSOD.
With gen1 boards, we're a little bit stuck since we can't re-enumerate USB on the fly (from a hardware perspective). But as we move the gen2 boards to WinUSB...we'll be able to look at various VMs to see if there are things we can do with NETMF to enhance the experience.
Chris
Thanks, I saw your reply in the other thread. I decided to spin up a separate VM for gen2 development work. I'll suck it up until WinUSB drivers are available for gen 2 (No pressure....)
Honestly, thanks for all you do in support of this platform. It's really appreciated.