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

#21 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 August 2012 - 05:44 PM

Hi Donn, Does this work for you? http://forums.netdui...b-and-com1com2/ Chris

#22 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 13 August 2012 - 05:46 PM

Related to my previous post, I just attempted to acess the SecretLabs.Diagnostics namespace in Visual Studio--but it doesn't appear to be available? (In examining the Program Files\Secret Labs\Netduino SDK\Assemblies\v4.1 folder, I see four assemblies: NETMF.Hardware.dll, NETMF.Hardware.Netduino.dll, NETMF.Hardware.NetduinoMini.dll, and NETMF.Hardware.Netduino.Plus.dll--do I need to add one of these to my project in order to access the Diagnostics namespace?)

#23 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 13 August 2012 - 05:48 PM

I'll give it a try. Thanks!

#24 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 13 August 2012 - 06:19 PM

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


Chris: I downloaded the new instance of MFDeploy, and used the Target/Connect to establish a connection to my Plus board. However, I still cannot deploy my app over serial. (Nor can I ping the board from MFDeploy.)

Attaching screenshot.

#25 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 August 2012 - 07:35 PM

Hi donmo,

Chris: I downloaded the new instance of MFDeploy, and used the Target/Connect to establish a connection to my Plus board. However, I still cannot deploy my app over serial. (Nor can I ping the board from MFDeploy.)


Which option did you select? It should be under Target > Configuration > Deployment Transport. Then select "COM1".

Attaching screenshot.

Can you please re-attach the screenshot? There's an "Attach This File" button that needs to be pressed after browsing for the image. I miss it sometimes too.

Chris

#26 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 13 August 2012 - 10:05 PM

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


Chris: Appreciate the help. Unfortunately, I've tested the updated MFDeploy tool on two machines (Win7/64-bit and Win7/32-bit) and it fails with identical errors on both. If I attempt to Ping the Netduino plus board from the MFDeploy app, I see a "Pinging... Error: No response from device." when the serial cable is connected. Now, if I attempt Target/Connect, I see "Connecting to COM2...Connected"; but, if I attempt a Ping after this, I see a "Pinging... NoConnection". (I see identical behavior for COM1 and COM2.)

Now, if I disconnect the serial cable, attach a USB cable, and restart MFDeploy, I can ping the device, retrieve device capabilities, etc. Are there known issues with specific serial cables/converters/chips? (Re-attaching screenshot.)

Thanks!
--Donn

Attached Files



#27 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 August 2012 - 10:34 PM

Could you please take a screenshot of the step when you switch the board's transport? It should be under Target > Configuration > Deployment Transport. What options are available in the pulldown of that window? What is the default option? What do you choose? We're getting closer... Chris

#28 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 13 August 2012 - 10:35 PM

Chris: I just got serial deployment to work. (What I'd needed to do was start the process with my USB cable connected. After re-attaching the USB cable, I was able to reconfigure the Target/Configuration/Deployment Transport with the updated MFDeploy and we were in business.) Appreciate your help today! Thanks, --Donn Morse

#29 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 August 2012 - 11:21 PM

Chris: I just got serial deployment to work. (What I'd needed to do was start the process with my USB cable connected. After re-attaching the USB cable, I was able to reconfigure the Target/Configuration/Deployment Transport with the updated MFDeploy and we were in business.)

Appreciate your help today!

Thanks,
--Donn Morse

No problem. Glad you're up and running! Let us know if you need anything else

Chris

#30 kylejudd

kylejudd

    New Member

  • Members
  • Pip
  • 1 posts

Posted 04 March 2013 - 12:57 PM

Hi Guys,

 

My Name is Kyle, and I would like to offer whatever help or insight I can into the issue of PC communication over a single USB Cable. Sorry for the long post, hopefully it is worthwhile :)

 

 I am a software developer with 15 years experience writing software that interacts with HID/Serial devices that act as remote controls for my software.  Although I am a newbie to Hardware/Firmware development, I recently got into the NetDuino/Arduino so that I could learn to build these HID/Serial remote control devices myself. 

 

I believe I might be able to help work out some of the HID issues in the UsbClient stuff (someone mentioned instablility), but I am unclear as to whether the hardware will support HID communication and .Net Micro debugging.  Since there would be a learning curve for me with writing firmware, I wanted to aske these questions before I invested too much time...

 

Do you guys already know if HID + .Net Micro is not possible with existing hardware, or is it worth me poking around a bit in the firmware?

 

Most commercial "Custom HID" devices I have worked with don't really use the Read/Write Report mechanisms. I use the HID Api to enumerate and open a handle to the device, but then I use ReadFile/WriteFile functions to communicate with device as if it were a normal Serial device.  I believe this may be the key to more stable HID communication.  Did you guys see this possibility when developing the UsbHidEchoNetduinoApp, or is it worth some investigation?

 

Another issue with the UsbHidEchoNetduinoApp solution is that it seems that the NetDuino needs power before being plugged into the computer (the program needs to be running).  If I intend to use the single usb connection for power, does that mean I have to have whatever HID code built into the firmware?  If that is true, is it possible to set up the firmware to communicate with the NetDuino program to customize what data is sent back and forth?

 

Thanks guys. Sorry for the long post, but making a single cable device is the whole ball game for me (and probably others), and I just want to offer whatever help I can.

 

Kyle

 

 

 



#31 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

Posted 04 March 2013 - 03:45 PM

Kyle,

Welcome! They could probably use your insight into USB over here --> Looking for a few ninja code contributors...



#32 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 March 2013 - 07:03 AM

Hi kylejudd, On USB HID... Since there are three USB pipes available on STM32's full-speed USB port and Micro Framework debugging uses two...that only leaves one USB pipe remaining for USB HID communication. If the Win32 WriteFile API will write to the control report and we can capture that on the board, then the extra USB pipe might be able to be used as a read endpoint. It's also certainly possible to enable support for HID communication on the gen2 hardware (and debug over another channel). We'd just need to get the USB driver set up to allow non-default USB configurations. Are either of those something you'd be interested in helping contribute to? I'm sure lots of people would say thank you :) Welcome to the Netduino community, 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.