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

Switching deployment/debugging between USB and COM1/COM2


  • Please log in to reply
31 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 January 2011 - 09:20 AM

Netduino and Netduino Plus support both USB and serial deployment/debugging. To switch between them use the attached (enhanced) version of MFDeploy.exe. Instructions: 1. Select your Netduino or Netduino Plus in the Target section (USB or Serial). 2. Click on the Target Menu > Configuration > Deployment Transport 3. Select your new deployment transport. 4. Unplug and re-attach your Netduino or Netduino Plus. 5. Update your transport options in Visual Studio (Project Properties > .NET Micro Framework > Transport) We will be providing this feature as part of the upcoming Netduino Update program...which will replace this custom build of MFDeploy. Chris

Attached Files



#2 Dr. Genestealer

Dr. Genestealer

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationEngland, UK

Posted 16 March 2011 - 11:55 PM

Hi Chris, If I have changed the Deployment Transport from USB to Serial, how can I change it back without a serial cable as I cannot communicate with the netduino at the moment! I'm running v4.1.2.0 and used MFDeploy to change the Deployment Transport. Is there anyway I can get things working again? Thanks, Richard

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 17 March 2011 - 12:10 AM

Hi Chris,

If I have changed the Deployment Transport from USB to Serial, how can I change it back without a serial cable as I cannot communicate with the netduino at the moment!

I'm running v4.1.2.0 and used MFDeploy to change the Deployment Transport.

Is there anyway I can get things working again?


Hi Richard,

Ruh roh :)

You can erase your Netduino (connecting a jumper wire between the 3V3 header and the ERASE pad for half a second or so)...and then reflash the bootloader using SAM-BA.

Does that work for you?

Chris

#4 Dr. Genestealer

Dr. Genestealer

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationEngland, UK

Posted 17 March 2011 - 01:40 PM

Hi Richard,

Ruh roh :)

You can erase your Netduino (connecting a jumper wire between the 3V3 header and the ERASE pad for half a second or so)...and then reflash the bootloader using SAM-BA.

Does that work for you?

Chris


Hi Chris,

Yes, it was my late night desperate attempts to blindly force the netduino to do what I want. (Act as an interface for a c#/vb.net app on the pc to the analogue in and digital i/o)

I will give it a try later today, I tried late last night (UK time) and stopped when I realised I will need to use "XP Mode" (VM Image of Windows XP) to load the bootloader as I am using 64bit Win7 :(
I will pick it back up tonight and report my findings.

Thanks,
Richard

#5 Dr. Genestealer

Dr. Genestealer

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationEngland, UK

Posted 18 March 2011 - 06:51 PM

I can report that I successfully recovered my netduino. Thanks everyone for the help. I found this post very helpful: http://forums.netdui...p__347#entry347 Richard

#6 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 08 July 2012 - 08:14 PM

Hi,

does the enhanced version of MFDeploy.exe works with the Netduino Firmware v4.2 RC5, to switch the deployment method?

Trying to change the deployment method generates following output:
Chk


#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 July 2012 - 08:33 PM

Hi awaiK,

does the enhanced version of MFDeploy.exe works with the Netduino Firmware v4.2 RC5, to switch the deployment method?

It should, yes. Please let us know if you have any troubles doing so.

Chris

#8 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 08 July 2012 - 09:14 PM

I have trouble to switch the deployment method successfully. After switching the deployment method to serial (COM1 or COM2) I can't ping my netduino with MFDeploy (over serial) nor can I deploy my assemblies (over serial) with Visual Studio. Of course, I changed the project settings to serial. The serial connection to my netduino works, both with COM1 and COM2. I confirmed this using a custom program, which I deployed over USB. The program was able to communicate bidirectional. Any ideas?

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 July 2012 - 09:43 PM

Hi awaiK, Thank you; we'll check this out. In the meantime, I would recommend using the production 4.1 firmware for scenarios where you want to change the deployment to serial. Chris

#10 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 09 July 2012 - 05:33 PM

In the meantime, I would recommend using the production 4.1 firmware for scenarios where you want to change the deployment to serial.

Unfortunately I need UsbClient support.

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 July 2012 - 07:14 PM

Hi awaiK,

Unfortunately I need UsbClient support.

The v4.1.1 beta has proved to be stable as well, if you'd like to try that. It has the same early support for USB Client as v4.2.

Chris

#12 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 09 July 2012 - 07:51 PM

Hi, can't switch the deployment method with v4.1 nor with v4.1.1 beta. But: I'm using a vanilla USB-to-RS232 Converter. I have to use a USB-to-TTL Converter, right? But why should my program, which I used to confirm the working COM ports, works and ping & deployment not? There must be a general problem with my configuration, seems not related to v4.2 RC5.

#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 July 2012 - 08:00 PM

Hi awaiK,

can't switch the deployment method with v4.1 nor with v4.1.1 beta.

But: I'm using a vanilla USB-to-RS232 Converter. I have to use a USB-to-TTL Converter, right? But why should my program, which I used to confirm the working COM ports, works and ping & deployment not?
There must be a general problem with my configuration, seems not related to v4.2 RC5.

A word of caution: a USB-to-RS232 cable would drive up to +/-15V to the Netduino mainboard. That -15V can damage the microcontroller pins.

Here's some info on RS232... The spec is officially "up to" -15V/15V and devices often drive -12V/12V. But many of the USB-RS232 adapters drive -5V/5V instead. Which is pretty close to the "0V/5V" used by 5V MCUs. So in some cases, you could see some data.

I would grab a USB-TTL cable (or an RS232-TTL level converter) and try that. It may fix all your issues :)

Chris

#14 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 19 July 2012 - 05:02 PM

Great. With a USB-to-TTL cable everything works. Thanks Chris.

#15 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 10 August 2012 - 10:35 PM

Great. With a USB-to-TTL cable everything works.
Thanks Chris.


Ignorant question: The USB-to-TTL cables that I'm finding on the web don't include a 9-pin male connector. How are you connecting your cable to your Netduino?

Thanks!
--DonnMo

#16 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 11 August 2012 - 08:47 AM

Hi,

I bought one of this on eBay: PL2303 based USB-to-TLL Converters

I also own a CP2102 based Converter, which works great too.

#17 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 August 2012 - 09:05 AM

Hi donmo,

Ignorant question: The USB-to-TTL cables that I'm finding on the web don't include a 9-pin male connector. How are you connecting your cable to your Netduino?

Re: 9-pin male connector...are you thinking of an RS232 connector? The USB-TTL cables should have 3 exposed leads at the end (RX, TX, and GND) to connect directly to the Netduino's headers...

For RS232, you can use an RS232 shield. CuteDigi makes one, and there are other breakouts and options available. We can point you in the right direction.

Chris

#18 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 11 August 2012 - 04:49 PM

Hi donmo,


Re: 9-pin male connector...are you thinking of an RS232 connector? The USB-TTL cables should have 3 exposed leads at the end (RX, TX, and GND) to connect directly to the Netduino's headers...

For RS232, you can use an RS232 shield. CuteDigi makes one, and there are other breakouts and options available. We can point you in the right direction.

Chris


My bad: I'd thought that I somehow needed to modify a USB-TTL cable to connect to the DB9 port on an RS232 shield.

Here's a description of what I'm seeing below:

I have the RS232 shield attached to my Netduino plus board. And, I have a Parallax USB-to-Serial cable that i'd used to connect my PC (Windows 7, 64-bit) to the Netduino board.

In the Properties/.NET Micro Framework tab, I’ve selected Serial as the Transport and Visual Studio has correctly identified COM1 as the only port available.

This port corresponds to the Parallax cable that’s attached to my machine. When I open Device Manager, a “USB Serial Port (COM1)” appears. And, when I open Control Panel/Hardware and Sound/Devices and Printers, this device appears as an FT232R USB UART.

What I see when attempting to deploy is:

1) “Preparing to deploy assemblies to the device.” in Visual Studio (after I specified Build/Deploy).
2) A red LED begins flashing on the RS232 shield (mounted above the Netduino).
3) Finally, the LED stops flashing and an error appears in Visual Studio: “Deploy failed.”
4) A further error appears in Visual Studio’s “Error List”: “Unable to communicate with device = Serial:COM1”

Any thoughts? (I am able to deploy this same code over USB; so, the issue appears to be with the serial deployment itself.)

Thanks!
--Donn Morse

#19 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 August 2012 - 05:02 PM

Hi Donn, Did you switch your Netduino from USB deployment mode to Serial deployment mode? Netduino will listen to either USB or Serial for deployment. If USB deployment is working, then you'll need to use the SecretLabs.Diagnostics namespace (or the custom MFDeploy build we made a while back) to switch deployment to COM1. Chris

#20 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 13 August 2012 - 05:40 PM

Hi Donn,

Did you switch your Netduino from USB deployment mode to Serial deployment mode?

Netduino will listen to either USB or Serial for deployment. If USB deployment is working, then you'll need to use the SecretLabs.Diagnostics namespace (or the custom MFDeploy build we made a while back) to switch deployment to COM1.

Chris


Thanks, Chris.

What methods do I need to invoke in the SecretLabs.Diagnostics namespace? (I'm attempting to download the Netduino Touch Keyboard sample over Serial but I don't see the Diagnostics namespace included in either the Program.cs or the Keyboard.cs modules.) Is there an article on the forums that describes switching deployment to COM1?

--Donn




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.