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

Driverless PC<->Netduino communication using USB


  • Please log in to reply
79 replies to this topic

#41 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 May 2012 - 07:38 PM

Hi Mike, Our test jigs use Netduinos to program Netduinos-under-test. They communicate with the test PC (which scripts SAM-BA and MFDeploy to flash the device-under-test) using USB HID...and they use one of their serial ports to communicate with the other Netduino (and the pins from the remaining serial port as GPIOs). We do have to power up the "USB HID" Netduino via external power before connecting the USB plug...but otherwise they work really nicely. Chris

#42 luto

luto

    Member

  • Members
  • PipPip
  • 12 posts

Posted 10 November 2012 - 01:51 PM

Hi,

I can't use this with my NetduinoGo, because I can't power it without USB, right?
Even the external power-module uses USB.
The app currently crashes around line 54 (the catch is triggered), but I can't transfer the exception-message because the USB connection is dead (haha). Crashes somewhere in CreateUsbStream.

You, Chris, stated earlier:

Technically, you can switch the USB configuration after your program is started...and then unplug and reattach the USB cable. But you'll lose debugging and you'll need to put your Netduino into "bootloader" mode to erase your current app whenever you want to deploy a new one.

How can force the USB configuration to switch?
Deploying a new app should be easy without erasing - just unplug a go-module which is used in the app :) that's kinda hacky, though.


luto

Edited by luto, 10 November 2012 - 02:36 PM.


#43 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 10 November 2012 - 04:27 PM

Hi luto, UsbClient is not officially supported on Netduino Go yet. When it is, the device you're plugging your Netduino Go into will of course still need to provide power via USB. Chris

#44 luto

luto

    Member

  • Members
  • PipPip
  • 12 posts

Posted 10 November 2012 - 05:19 PM

Hi Chris, oh, my poor toothless Go :unsure: ;) Do you know when this is going to be implemented? luto

#45 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 10 November 2012 - 05:30 PM

Hi luto,

oh, my poor toothless Go :unsure: ;)
Do you know when this is going to be implemented?

UsbClient was something we were able to partially support with the Netduino 4.1.1 beta, but we couldn't fully support because the board needed extra circuitry to do it well.

Netduino Go and Netduino Plus 2 both include extra circuitry to make rich USB Client support possible. It'll be a new, official supported feature. Our current roadmap is to officially add support for it in December/January...but I will update here on the forums as we get it up and running.

Chris

#46 luto

luto

    Member

  • Members
  • PipPip
  • 12 posts

Posted 10 November 2012 - 06:09 PM

December/January is perfect, thanks for the info! :) and thanks for adding this, it will make my project a lot easier to implement.

#47 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 11 November 2012 - 11:18 PM

Hi, I've been away from my Netduino for a while and wondered if someone could clarify... Is it now possible, using only a USB connection, to deploy an app, debug it and communicate with an app running on Windows? Does this still require a power supply too or just updated firmware? If this is now possible, please let thank you for your effort getting this up and running - it's been a major drawback compared to the Arduino and is very welcome.

#48 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 November 2012 - 11:37 PM

Hi Basiclife,

Is it now possible, using only a USB connection, to deploy an app, debug it and communicate with an app running on Windows?

Does this still require a power supply too or just updated firmware?

If this is now possible, please let thank you for your effort getting this up and running - it's been a major drawback compared to the Arduino and is very welcome.

Using the 4.1.1 beta firmware, it's possible to deploy/debug using serial and then communicate with the PC using USB.

It wasn't possible to deploy and then switch the connection to a custom USB connection. This is due to the way the NETMF drivers work.

To enhance this, we have added extra hardware to Netduino Plus 2 to enable the device to re-enumerate on the fly. This will allow applications to use the UsbClient feature more easily, leading to things like bi-directional data streams. There is quite a bit of work to do to the USB peripheral feature to make this happen...it's a huge set of code...but we're working on it in conjunction with community members.

Please note that debugging and using the USB for custom USB communication at the same time is very tricky in NETMF. We're looking at ways to support this scenario too...but I don't want to promise anything until it's all tested.

Chris

#49 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 11 November 2012 - 11:53 PM

Hi Basiclife,

...
To enhance this, we have added extra hardware to Netduino Plus 2 to enable the device to re-enumerate on the fly. This will allow applications to use the UsbClient feature more easily, leading to things like bi-directional data streams. There is quite a bit of work to do to the USB peripheral feature to make this happen...

...

Chris


Hi Chris, thanks for the clarification and quick response. Would it be fair to say that if I were to grab a ND2+, then this will be possible at some point in the future? Or would that be premature and I should wait until it's implemented in case it needs a v3/4/??? In short, are you confident the 2+ has all the required hardware and just needs the appropriate firmware?

#50 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 November 2012 - 12:01 AM

In short, are you confident the 2+ has all the required hardware and just needs the appropriate firmware?

Both Netduino Go and Netduino Plus 2 have all the required hardware. The limitations are the three endpoints provided by the ST USB feature (two of which are used by NETMF, limiting simultaneous use) and the necessary code and testing to make the feature happen.

That said...I wouldn't buy a Netduino Plus 2 for this feature. I'd buy one because it's awesome, and if we can deliver this as an update in the future it's a really nice bonus :)

Chris

#51 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 12 November 2012 - 01:57 AM

That said...I wouldn't buy a Netduino Plus 2 for this feature. I'd buy one because it's awesome, and if we can deliver this as an update in the future it's a really nice bonus :)

Chris


Thanks again for the rapid reply. Unfortunately, for me this is the "killer" feature. I love my netduino but the ability to deploy/debug/communicate entirely over USB will make things so much simpler, it would be _the_ reason to purchase an upgrade.

I look forward to further updates and will likely buy a new netduino when this becomes available.

Many thanks

#52 luto

luto

    Member

  • Members
  • PipPip
  • 12 posts

Posted 26 February 2013 - 06:34 AM

Hey Chris,

 

how is the status on this?  :)

The project I need this for will start soon  :unsure:

 

luto



#53 Sivat

Sivat

    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 April 2013 - 06:36 PM

I was also very interested in this feature (which is why I stopped lurking and actually created an account!) Is there any news regarding the ability to use USB both for deploying/debugging and for custom communications?

 

Thank you



#54 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 26 April 2013 - 03:33 PM

Hello,

 

I'd installed the 4.1 beta firmware on a Netduino plus and attached a Serial shield (which I used while debugging my HID application). This had been working fine initially.

 

However, I just returned to the project and am no longer able to download (or debug) over the serial connection. (I can download my Netduino app over USB; but, this isn't a working solution since I need to debug over serial.)

 

Thinking that something had happened to the Netduino, I reinstalled the boot loader, the 4.1 beta firmware, and the .Net micro framework last night. However, I'm still unable to download over the serial connection. (I'm seeing the same results on a Windows 7 and a Windows 8 machine. And, I'm starting to wonder if there's been an update to the serial driver that may be causing the issue(s)?)

 

Has anyone else observed similar?

 

Thanks!

--Donn Morse



#55 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 April 2013 - 03:28 PM

Hi Donn,

I'd installed the 4.1 beta firmware on a Netduino plus and attached a Serial shield (which I used while debugging my HID application). This had been working fine initially.

Which 4.1 beta firmware are you using? Did you run the custom version of MFDeploy to change your deployment port from USB to Serial? Chris

#56 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 29 April 2013 - 05:21 PM

Chris,

 

Appreciate the response! I'm running MFDeploy version 4.1.2821.0--is this the custom version? (And, where would I find the instructions for changing the deployment port from USB to Serial?)

 

As per the DeviceInfo from MFDeploy, I'm running "v4.1.1.0 b1" of the beta firmware. (I'll attach a screenshot of the device info response)

 

Thanks!

--Donn

Attached Files



#57 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 29 April 2013 - 05:37 PM

Chris: Belay that response--I located the special version of MFDeploy and am now able to deploy over an RS232 connection. (When I had reset my Netduino Plus, I had forgotten the necessity of using MFDeploy to toggle the deployment port. Appreciate both your response and the guidance.)

 

Thanks!

--Donn



#58 glober

glober

    New Member

  • Members
  • Pip
  • 4 posts

Posted 04 August 2013 - 01:04 PM

Hi Chris,

 

In your first post you mentioned that this is not supported in the 4.2.0 firmware and I have to go with 4.1.1 beta to try this out. Recently I got myself a Netduino 2 which runs 4.2.2 version. Shall I still go with the 4.1.1 beta or this is already supported?

 

Thanks, Ivan



#59 donnmo

donnmo

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSpokane area

Posted 08 August 2013 - 08:17 PM

Chris:

 

You'd noted above: "UsbClient was something we were able to partially support with the Netduino 4.1.1 beta, but we couldn't fully support because the board needed extra circuitry to do it well. Netduino Go and Netduino Plus 2 both include extra circuitry to make rich USB Client support possible. It'll be a new, official supported feature. Our current roadmap is to officially add support for it in December/January...but I will update here on the forums as we get it up and running."

 

Does this mean that if I'm using the Netduino Go or the Netduino Plus 2, there's no need to download any beta firmware and I can run the UsbHidEchoNetduinoApp sample as is?

 

Thanks!

--Donn



#60 msneen

msneen

    New Member

  • Members
  • Pip
  • 1 posts

Posted 23 December 2013 - 05:46 PM

Hi Chris,

 

What is the status of this?  I bought a Netduino2 a few days ago.  What is the easiest way to communicate with the computer thru USB?

 

Muchas Gracias!

 

Mike






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.