Netduino home hardware projects downloads community

Jump to content


Photo

Driverless PC<->Netduino communication using USB


  • Please log in to reply
79 replies to this topic

#21 beslan

beslan

    New Member

  • Members
  • Pip
  • 1 posts

Posted 27 July 2011 - 10:19 PM

Hi,

I'm using USB port for communication and Serial port for deploy/debug.
Both cables and external power are connected. How can i debug netduino?

Its firing IOException in UsbHidHostLiteStream (299)

                    if (!_writeHandle.IsInvalid)
                        _writeHandle.Close();
                    throw new System.IO.IOException();

Thanks.

#22 javer

javer

    New Member

  • Members
  • Pip
  • 3 posts

Posted 01 August 2011 - 08:45 PM

Hi, can you please explain me why i need to program netduino using serial port when i want to use usb to communicate with pc ? The only problem I see is that debugging wont work, but im newbie. Thank you

#23 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 August 2011 - 09:24 PM

Hi javer,

can you please explain me why i need to program netduino using serial port when i want to use usb to communicate with pc ?
The only problem I see is that debugging wont work, but im newbie. Thank you

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.

Chris

#24 Jay Beavers

Jay Beavers

    New Member

  • Members
  • Pip
  • 6 posts

Posted 24 August 2011 - 09:28 PM

Working on a few options... No news to share quite yet.

Chris


I'm still excitedly waiting here! Lots of great progress over the last few months, but unless I've missed something this feature (shared debugging/deployment/communications over a single USB channel) hasn't made it in yet, correct?

#25 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 August 2011 - 09:41 PM

I'm still excitedly waiting here! Lots of great progress over the last few months, but unless I've missed something this feature (shared debugging/deployment/communications over a single USB channel) hasn't made it in yet, correct?

Correct. We've found a way to make it possible today...but it's a bit kludgy. So we're working on a streamlined method.

#26 bkmckenzie

bkmckenzie

    New Member

  • Members
  • Pip
  • 5 posts

Posted 04 January 2012 - 01:32 PM

I've tried to add a reply to this topic a couple of times, so sorry if this is a repeat, but I don't see anything ever get posted. Just curious why the device firmware couldn't be changed to make this a USB composite device, and have the device enumerate as the whatever it is USB device it is already enumerating as, and then also have it enumerate as a USB serial device (like Arduino does) which has native drivers. Seems like a USB composite device solution would then only comprise a firmware change, nothing on the other end of the USB connection would need altering.

#27 Humancell

Humancell

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationUtah

Posted 06 January 2012 - 10:42 PM

Any updated news on shared debugging/deployment/communications over a single USB channel?

I'm very excited by this new capability and very much looking forward to starting a new project once I have firmware with this capability.

Working on a few options... No news to share quite yet.

Chris


Chris ... any update on this? We're about to begin work on using the HID method to communicate with our configuration application, but then need to understand the implications of how to also update/deploy our code ... hopefully using the same USB/HID connection ...

#28 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 January 2012 - 10:48 PM

Hi bkmckenzie, Humancell: That's actually the exact solution we're investigating (composite device: NETMF + HID). The additional endpoints need some extra RAM, so we need to figure out how to squeeze that down a bit. Also, there are some native code issues that we need to take care of preventing non-responsiveness on the additional endpoints. If you'd like to be involved helping out with the native code side of this, please PM me offline--and we'll make sure you get lots of kudos when such a feature ships :) Chris

#29 Mitchell

Mitchell

    New Member

  • Members
  • Pip
  • 7 posts

Posted 10 January 2012 - 08:05 AM

Hey I am Kinda New to Netduino's and I want to know what the most stable firmware is at the moment.

#30 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 10 January 2012 - 11:20 AM

Hi Mitchell, The current stable firmware is v4.1.0.6. the v4.1.1 beta firmware has also proven to be quite stable if you'd like its extra features. Chris

#31 Mitchell

Mitchell

    New Member

  • Members
  • Pip
  • 7 posts

Posted 10 January 2012 - 12:22 PM

Hi Chris, Just a question on speed and simplicity, I looked over the samples at the beginning of this forum and it seemed to be alot more complicated then plain serial. Does it have big speed differences? Is it all worth it?

#32 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 10 January 2012 - 02:50 PM

Just a question on speed and simplicity, I looked over the samples at the beginning of this forum and it seemed to be alot more complicated then plain serial. Does it have big speed differences? Is it all worth it?

Hi Mitchell,

It should be roughly the same simplicity as using the SerialPort object--but without needing to do enumeration. For your code, you should just open up the connection and read/write data.

That said, plugging in a serial shield is pretty simple too.

Chris

#33 Mitchell

Mitchell

    New Member

  • Members
  • Pip
  • 7 posts

Posted 17 January 2012 - 10:44 AM

Hello, With this code, If I was to create a USBLiteStream on the Netduino, what would I need to use for the Input and Output Byte Lenght? Can someone explain this? Thanks. Mitchell

#34 bkmckenzie

bkmckenzie

    New Member

  • Members
  • Pip
  • 5 posts

Posted 19 January 2012 - 12:43 PM

Hi bkmckenzie, Humancell:

That's actually the exact solution we're investigating (composite device: NETMF + HID). The additional endpoints need some extra RAM, so we need to figure out how to squeeze that down a bit.

Also, there are some native code issues that we need to take care of preventing non-responsiveness on the additional endpoints.

If you'd like to be involved helping out with the native code side of this, please PM me offline--and we'll make sure you get lots of kudos when such a feature ships :)

Chris



I've tried PMing you offline via this forum a couple of times, but this web forum seems to not like me. Anyway, I would love to help with the firmware changes, just contact me if possible.

Bill M.

#35 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 January 2012 - 10:14 PM

Hi Bill,

I've tried PMing you offline via this forum a couple of times, but this web forum seems to not like me. Anyway, I would love to help with the firmware changes, just contact me if possible.

So sorry about that. Thanks for the offer! I'll ping you offline!

Chris

#36 JacopoMTK

JacopoMTK

    Member

  • Members
  • PipPip
  • 26 posts

Posted 21 April 2012 - 03:14 PM

I have netduino with firmware v.4.1.1.0 1b. I need to send data to an application instead of only using it on netduino so i checked this post and updated firmware,installed tinybooterDecompressor ecc. Now running the Console Echo give me this error: "Netduino running custom USB HID code was not found".And i think it's because in the second post Chris said "For the v4.1.1 beta, you'll need to debug/deploy over serial to use the USB port in your Netduino app." Now,is there a solution to do everything through USB like newer firmware etc. or do i need to buy a serial cable / shield and so on? Thanks. Ps: in attachment the device capabilities from MFDeploy 4.2

Attached Files



#37 luisperezphd

luisperezphd

    New Member

  • Members
  • Pip
  • 1 posts

Posted 06 May 2012 - 08:56 PM

Does this work on the regular (not mini/go or plus) Netduino? If so it appears I need to update my firmware but I can't find the binaries for the new firmware version, in the downloads section I only see links to download the source code for the firmware.

#38 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 07 May 2012 - 11:33 AM

Does this work on the regular (not mini/go or plus) Netduino? If so it appears I need to update my firmware but I can't find the binaries for the new firmware version, in the downloads section I only see links to download the source code for the firmware.

Here is the Netduino 4.1.1 beta firmware:
http://forums.netdui...re-v411-beta-1/

Chris

#39 C.c

C.c

    New Member

  • Members
  • Pip
  • 1 posts

Posted 15 May 2012 - 09:38 PM

Hi! Is there a way to use the USB HID without plugging an external power supply? Thx.

#40 NebulaSleuth

NebulaSleuth

    New Member

  • Members
  • Pip
  • 1 posts

Posted 23 May 2012 - 06:56 PM

So its great that USB communications is now available. I have a scenario I need to work out. I have a project that communicates to 2 RFID readers. These readers are TTL serial. I need to communicate to them from the Netduino, and then from the netduino to the PC via USB. I plan on switching between USB/serial debug and deploy depending on the portions of the code I am working on. So at times I will have USB debug and 2 serial ports to talk to the RFID readers, then I will switch to serial debug and test the PC <--> Netduino usb communications. and my questions.. 1. When I am done, can I have a release setup where both serial ports are available and the device communicates to the PC via USB all at the same time? (maybe by stealing the serial port from the debug/deploy connection?) 2. Which serial port is used for the debug session? 3. I assume that I would need to do a "clear" and bootloader reprogram in order to download new code, unless could I can make things dynamic and not steal the serial port from the debug/deploy at boot time depending on a switch connected to a GPIO. Any thoughts would be appreciated... Thanks. -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.