USB CDC on Netduino Plus 2 - 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

USB CDC on Netduino Plus 2

USB CDC USBCLIENT

  • Please log in to reply
6 replies to this topic

#1 haurucki

haurucki

    New Member

  • Members
  • Pip
  • 5 posts

Posted 01 June 2013 - 07:41 AM

hi,

 

i need a bit help with the usb communication.

I have no idea, how to getting a cdc-communication with the netduino plus 2 working.

 

So i ask for the steps i have to make in my program.

 

I only know that i need  an UsbClient.UsbStream and an UsbClient.UsbController and an UsbClient.Configuration.UsbInterface.

The USB-Device-Class CDC has the code 0x02.

 

Is it possible with the newest firmware?

Whats the steps to get it?

 

Maybe, im creating a wiki-article if im familiar with it.^^

 

 



#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 01 June 2013 - 08:41 AM

Hi!

I think some work has been done in this direction, google returns some hits when searching for usb + cdc:

http://lmgtfy.com/?q...o.com usb + cdc

Also forum member Oz made a HID keyboard a while back:

http://forums.netdui...d-updated-code/

In either case, I think the normal programming/debugging device will no longer be available so you have to switch to serial deployment.

Hopefully, the above will get you started. Good luck!

#3 haurucki

haurucki

    New Member

  • Members
  • Pip
  • 5 posts

Posted 01 June 2013 - 11:07 AM

Thank you,

 

i allready know the most hits of google.

There is not much which discribes how to do this.

Beside this, working projects are pretty old and work with 4.1-Firmware.

There are even a mouse-sample in the sample-Folder. But thats a HID-Sample and the code is a bit to difficult for me to figure out which steps i need to get a cdc-communication working.

 

So, anyone know more?

What i have to do first?

 

...UsbClient.UsbStream _usbstream;

_usbstream.????



#4 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 01 June 2013 - 11:32 AM

Yes, most of what has already been done is HID since that is one of the simplest device classes to implement and won't require a dedicated driver on the host PC. If I recall correctly, a CDC device will require a driver. All in all it's a big thing to take on.

#5 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 01 June 2013 - 06:50 PM

Maybe this would work. It's buit around the MAX3421E USB to SPI chip.

http://www.circuitsa...shield_projects

 

Sparkfun also has a shield,

https://www.sparkfun.com/products/9947

 

The Arduino USB Host Shield library,

http://www.circuitsa...on-2-0-released

 

claims support for, quote:

 

"•Human Interface Device AKA HID. Keyboards, mice, game controllers,
bar code scanners, magnetic card and RFID readers – the list goes on.
Initialization, polling, report descriptor parsing, as well as
reading and sending reports is possible.

 

 •Asynchronous Serial over USB AKA CDC. Devices of this class
provide serial connectivity. For example, newer Arduino boards,
such as UNO and Mega 2560 communicate to a PC using CDC ACM-class
device, while older boards, such as Duemilanove, use FTDI FT232
USB-to-serial converter. 3 main types of converters are
supported – CDC ACM (newer Arduinos and most modern cell phones),
FTDI FT232 (older Arduinos plus a ton of standalone converters )
and Prolific PL2303 (mainly used in USB cables for various cellphones)".

 

It might be a bit of a bother to port the driver over to the Micro Framework, However.

 



#6 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 02 June 2013 - 02:19 AM

@baxter: those boards are USB host modules, I was under the impression that a USB device was sought after. @Haurucki: As I gathered, you're looking to make your Netduino present itself as a USB virtual com port to the host PC, right?

#7 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 02 June 2013 - 08:15 PM

@hanzibal: Well the title page says "USB HOST", but I think you can do all sorts of things with this module. The only thing different (aside from a different chip) relative to the FTDI VDIP1/2 is the driver. The Circuits@Home module has an Arduino driver that encapsulates  the functionality. The FTDI product has separate downloadable drivers for different functionality. The VDIP1 and VDIP2 cost about the same.

 

Look at pages 20-22 of this document,

http://www.google.co...ZgGlYeCxlDGoJUw

 

I may be wrong about all of this and I hope you can clarify these issues because I bought an IOIO-OTG and it only provides functionality on the Android side. The FTDI modules are the obvious choice in order to avoid the writing driver pain trying to port the Arduino code.

 

 






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.