Trouble getting stable Netduino+ 2 connection - Netduino Plus 2 (and Netduino Plus 1) - Netduino Forums
   
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

Trouble getting stable Netduino+ 2 connection


  • Please log in to reply
9 replies to this topic

#1 GeorgeHahn

GeorgeHahn

    New Member

  • Members
  • Pip
  • 8 posts

Posted 31 March 2014 - 07:31 PM

I'm running 4.3.1.0 QFE1 and VS2013. My device was working flawlessly up until recently.

 

The device enumerates correctly and I can ping it via MFDeploy, here's the response:

Pinging... Found debugger!
NoConnection
Create TS.
 Loading start at 806b180, end 8086098

I cannot erase it from MFDeploy, it says:

Connecting to device...
Error: No response from device

I cannot push code to it from VS, output window says:

Looking for a device on transport 'USB'
Starting device deployment...
Iteration 0
Opening port \\?\USB#VID_22B1&PID_1000#000000000000#{09343630-a794-10ef-334f-82ea332c49f3}\Operations
Attaching debugger engine...
... debugger engine attached!
Querying device assemblies...
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.3\le\secretlabs.netmf.hardware.netduino.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Native.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.3\le\secretlabs.netmf.hardware.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.PWM.pe to deployment bundle
Adding pe file C:\Users\George\Documents\Visual Studio 2013\Projects\MQTTApp\MQTTApp\bin\Debug\le\MQTTApp.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\mscorlib.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.pe to deployment bundle
Attempting deployment...
Deployment to the device was not successful.

I can erase/upgrade with NetduinoUpdate and push new code once, but the device immediately returns to a bad state. About 25% of the time it will run the new code, other times it behaves as if it is blank.



#2 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 02 April 2014 - 10:57 PM

have you tried running some very simple 100% fail-safe code (like flashing the onboard LED) ?

Maybe it´s just a code problem. Anyway, would be interessting to know if this happens independent from the code.

 

Daniel



#3 GeorgeHahn

GeorgeHahn

    New Member

  • Members
  • Pip
  • 8 posts

Posted 02 April 2014 - 11:11 PM

That's what my current code does - just blinks a LED on and off every ~30ms. The code runs, it's just terrible to deploy new code.



#4 GeorgeHahn

GeorgeHahn

    New Member

  • Members
  • Pip
  • 8 posts

Posted 07 April 2014 - 11:39 PM

Any other information I can give to help debug this issue?

 

I really want to love Netduino, but this issue makes it pretty tough -_-

 

E: I noticed my 5v pin doesn't seem to be powered (board powered from USB). Perhaps I need to try powering it with the barrel jack? I'll go through and check the regulators tonight, maybe I blew one out..


Edited by GeorgeHahn, 08 April 2014 - 12:08 AM.


#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 April 2014 - 05:12 AM

Hi GeorgeHahn,

What version of firmware are you running on your Netduino Plus 2? The latest 4.3.1 firmware?

From your above notes, it doesn't look like Pinging is actually working from MFDeploy.

Regarding the 5V pin... The 5V pin should be showing the same voltage as your USB power is supplying. How are you measuring it? With a multimeter between 5V and GND? [If you're not seeing 5V there, it's likely that the hardware is damaged; if it's new, let's make sure we get you a replacement unit.]

Sorry for the troubles; let's see what we can do to get you up and running here.

Chris

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 April 2014 - 11:31 AM

Hi GeorgeHahn,

Looking at your debug output above ("adding assembly ##.##"), it looks like Visual Studio is trying to redeploy several assemblies that are already deployed on the device. That won't work. Not sure what's going on there.

Is your blinky app called MQTTApp?

Adding pe file C:\Users\George\Documents\Visual Studio 2013\Projects\MQTTApp\MQTTApp\bin\Debug\le\MQTTApp.pe to deployment bundle


Let's try reflashing your device via NetduinoUpdate, and then deploy the default empty app. If that works, deploy the same app but blinking the ONBOARD_LED. That will give us a basis to understand what your board is doing.

Chris

#7 GeorgeHahn

GeorgeHahn

    New Member

  • Members
  • Pip
  • 8 posts

Posted 04 May 2014 - 03:55 AM

My blinky app is called MQTTApp. I retested the 5v like and found it fine; sorry, I must have measured it too hastily last time.

 

My netduino seems fine with the exception that I need to put it into bootloader mode and perform an upgrade before most deploys. Erasing the app doesn't help. Once I've performed the 'upgrade', I can deploy again - sometimes just once, sometimes multiple times.

 

Is it possible this is a noise issue? Right now, my code that just does MQTT access and some SPI comms deploys fine every time, but when I was flashing the LED in a tight loop or trying to bitbang a protocol, I could only successfully deploy once.



#8 jorupp

jorupp

    New Member

  • Members
  • Pip
  • 1 posts

Posted 31 May 2014 - 04:33 PM

I seem to be having a similar issue (Netduino Plus 2, VS 2012, SDK 4.3 QFE 1, v4.3.1.0 firmware).  The basic issue appears to be that if I reboot the Netduino, it automatically re-runs the debugger, which means it's not in a mode where it's waiting for me to deploy code to it.

 

Is there a setting I've got flipped wrong that's telling it to automatically launch the debugger on every bootup?

 

To test this theory out, I pulled up the 'attach to process' menu in VS 2012, picked .Net Micro, USB, clicked Refresh, and picked my device.  Then, I hit reset on the Netduino, and as soon as I heard the sound to indicate Windows detected the device, I clicked attach.  I got this in my output window (from debug):

Found debugger!


The debugging target runtime is loading the application assemblies and starting execution.
The program '[10] Micro Framework application: Managed' has exited with code 0 (0x0).
Create TS.


 Loading start at 806b180, end 8086098


Assembly: mscorlib (4.3.1.0)


Assembly: Microsoft.SPOT.Native (4.3.1.0)


Assembly: Microsoft.SPOT.Hardware (4.3.1.0)


Assembly: Microsoft.SPOT.Net (4.3.1.0)


Assembly: System (4.3.1.0)


Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0)


Assembly: Microsoft.SPOT.IO (4.3.1.0)


Assembly: System.IO (4.3.1.0)


Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)


Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)


Assembly: SecretLabs.NETMF.Diagnostics (4.3.1.0)


Assembly: SecretLabs.NETMF.Hardware.Netduino (4.3.1.0)


Assembly: Microsoft.SPOT.Hardware.OneWire (4.3.1.0)


Assembly: Microsoft.SPOT.Time (4.3.1.0)


Loading Deployment Assemblies.


Attaching deployed file.


Assembly: MyNS.MyLib (1.0.0.0)


Resolving.


Ready.

The debugger then immediately detached.  I was still unable to deploy, re-attach, or ping (from MFDeploy).  Hoping the fact that I could get the debugger to attach momentarily may give someone a clue as to what I have misconfigured though.



#9 GeorgeHahn

GeorgeHahn

    New Member

  • Members
  • Pip
  • 8 posts

Posted 13 June 2014 - 12:14 AM

I had no luck resolving this issue. I ended up moving the bulk of my processing to a TI Tiva-C Launchpad and using the N2+ as a MQTT-SPI bridge (a glorified ethernet adapter).

 

I'd be interested if you find a solution!



#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 June 2014 - 09:34 PM

jorupp -- attach to debugger isn't supported in Visual Studio today. It's something that the NETMF team has looked into, but I'm not sure how far it is down the requested feature list.

GeorgeHahn -- from the debug output, it appears that Visual Studio may be trying to deploy assemblies which are _already_ on the device. I'm not sure if it's a versioning issue (4.3 vs 4.3 QFE1) or something going on in the app. Can you try creating a "NETMF Console Application" and deploying that? And then change the Debug.Print output in that default application to "hello world" instead and try redeploying? If that work successfully, then deployment is fine; if that doesn't work successfully then we should dig deeper into the deployment chain (and get a capture of MFDeploy's device configuration output).

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.