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

a few deploy via serial questions


  • Please log in to reply
10 replies to this topic

#1 dyadica

dyadica

    Member

  • Members
  • PipPip
  • 17 posts

Posted 18 August 2010 - 06:36 PM

Hi All Just go my netduino today from skpang.co.uk however without the small (no un-boxing for me) box :( despite that I instantly implemented the blinking led example and jobs a good un ;) However I have a few questions whose answers seem to get more confusing as I read the forums. Primarily I am interested in communicating with a few windows forms applications. It seems that in order to achieve this I will have to update the firmware and deploy via serial. Is this defiantly the case, or is it possible to deploy an app to the device and then use the usb link for communication? All I want to do is turn on and off a couple of pager motors and led’s to begin with, via a windows form button press. If I do have to install the update patch would I follow the method as indicated in the following posting: http://forums.netdui...rased-netduino/ supplementing the serial patch etc Currently I own a TTL-232R Usb to TTL Serial Cable (5.0V) is this suitable for using with the netduino or will I need to obtain a 3V3 one? Can I persuade someone out there to produce a windows forms – netduino tutorial, I (and by the looks of it a few others) would be forever grateful :) Please excuse my ignorance on the subject, for I am new to all this etc, cheers :)

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 August 2010 - 08:23 PM

Hi dyadica, and welcome to the community! Your USB to TTL cable (5.0V) will work fine for sending data to the Netduino. The Netduino will send data _back_ to the cable at 3.3V--so whether or not the cable will work is dependent on whether the cable can accept 3.3V signals in return. I'd try it...and if it doesn't work then you can pick up an RS232 shield or a 3.3V USB-to-TTL cable. We're looking at options to enable a secondary channel over the USB connection, but there are some odd driver issues that crop up. We want to make sure that if we deliver something we do it well...so while we're investigating all the options we're recommending that users communicate serial data with the PC via USB-to-TTL cables or via an RS232 shield. We're also working on an HID driver for the Netduino that would let you communicate to/from a .NET desktop app with no drivers required. If we're really lucky, we'll be able to get it to work side-by-side with the debug/deploy capability. More on that as it develops. Chris

#3 dyadica

dyadica

    Member

  • Members
  • PipPip
  • 17 posts

Posted 18 August 2010 - 08:56 PM

Hi, thanks, I’ll give the cable a go and see what happens; I just didn’t want to risk blowing up my new toy ;) Great news about the HID driver, I can’t wait, that’s just what I want for about a thousand apps. In the mean time I’m going to give the USB/Serial patch a go. Would I use the procedure as outlined in the pre mentioned posting for re flashing the device etc. Again, thanks for your help

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 August 2010 - 09:08 PM

Hi, thanks, I’ll give the cable a go and see what happens; I just didn’t want to risk blowing up my new toy ;) Great news about the HID driver, I can’t wait, that’s just what I want for about a thousand apps.

In the mean time I’m going to give the USB/Serial patch a go. Would I use the procedure as outlined in the pre mentioned posting for re flashing the device etc.


Rather than using the USB-to-TTL cable for deploy/debug, I'd recommend starting out by using the standard USB deploy/debug method--and using the USB-to-TTL cable to write/read data to/from your computer.

Then if that works for you, yes, you can erase and reflash your Netduino with the serial firmware and reconfigure its USB port to turn it into an HID, WinUSB, etc. device. But I'd wait on that second part until we have the server/client HID code all done...and then you can do it completely driverless.

Chris

#5 dyadica

dyadica

    Member

  • Members
  • PipPip
  • 17 posts

Posted 18 August 2010 - 10:04 PM

Hi, yes, that sounds like a much better plan, thanks :)

#6 dyadica

dyadica

    Member

  • Members
  • PipPip
  • 17 posts

Posted 22 August 2010 - 05:41 PM

Hi, Sadly my 5V cable was a none starter however I have managed to pick up a 3V3 and implement simple 2 way Communication with a Windows Forms App - Rudimentary packet handling has been implemented via inclusion of an additional byte to the beginning of the packet which details the length of the string to be sent to the Netduino. Once received the device filters the incoming data and recreates the string. A simple switch statement is then used to trigger functionality. To see it in action, check out the video here: Attached File  Netduino Serial 1.0.zip   198.43KB   616 downloads I have attached the source to this post, hope its of help to someone, cheers, dyadica

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 August 2010 - 09:03 PM

Awesome. This may be our first "Computer + Netduino integration" project. Nice. If you'd like, you're more than welcome to post this in the Project Showcase section...

#8 gratz

gratz

    New Member

  • Members
  • Pip
  • 2 posts

Posted 29 August 2010 - 08:29 PM

I've been researching the newer boards around at the moment and the netduino caught my eye so I started investigating the PC / board communications and found this thread, so before I go ahead and buy one I have a few questions relating to the comms... Am I correct in understanding this thread, in that the netduino has 2 x UART ports as standard (dedicated interrupt driven ports - not bit banged) but there is no PC to netduino virtual serial by default but to get round it you can update the firmware to make the USB of the netduino behave as a virtual com port? Is this communication between PC and netduino via the USB socket then in both directions PC -> netduino and vice versa? I'm assuming the use of virtual serial via the USB doesn't override either of the other dedicated ports like the arduino does on pins 0 and 1? By updating the firmware for the virtual USB serial comms to take place this means that future program uploads to the board have to be done by one of the other dedicated serial ports? Am I also right then in thinking that after a program upload (without debugging) that I would be left with communications in both directions between the PC and netduino via USB *AND* still have 2 UART ports available to read / write to / from other devices all at the same time? Thanks

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 August 2010 - 08:32 PM

Hi gratz, If you use the "serial deployment" firmware, pins D0/D1 will be dedicated for deployment/debugging. If you use the standard "USB deployment" firmware, pins D0/D1 will be a true UART. There are two hardware UARTs (D0/D1 and D2/D3). We are also working on a HID project so that you can deploy/debug over D0/D1 and read/write data with your PC in a driverless fashion. Did that answer your questions? And also...welcome to the Netduino community! Chris

#10 gratz

gratz

    New Member

  • Members
  • Pip
  • 2 posts

Posted 29 August 2010 - 08:49 PM

Wow quick response, and thanks for the welcome :) So the most UART comms links I can have at any one time is two because one of the three always has to be allocated for deployment.. And in serial deployment mode, this would allow me to do Tx / Rx comms with the PC via the USB and Tx / Rx with a another serial device connected to COM2 (D2 / D3). "We are also working on a HID project so that you can deploy/debug over D0/D1 and read/write data with your PC in a driverless fashion." - This would then allow me to have effectively have 3 UARTs in the way mentioned in the last paragraph of my previous message? Sorry if I've misunderstood..

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 August 2010 - 08:51 PM

The default debugging connection from the PC to the Netduino is not a virtual serial port. It's a high-speed debug using the open source MFUSB driver. Someone could certainly put together a virtual serial port driver though...




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.