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

Serial datarecieved event


  • Please log in to reply
27 replies to this topic

#21 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 January 2011 - 05:41 AM

For some reason this only works once. I am debugging on RS232 and have an XBee connected to TTL. In the code I open up COM2 to read data from the XBee. If I stop debugging and then start again I can't. I cannot even connect via MFDeploy. At that point I have to reflash TinyBooter and the firmware to get the Netduino Mini working again.

Not sure if it's just me, but fyi.


phantomtypist,

Do you have any more info on this? That should not happen at all.

BTW, you can force your Netduino Mini into bootloader mode (so that you can erase your current app) by applying power to the DTR pin (pin 3) during power up. No need to erase and reflash.

Chris

#22 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 26 January 2011 - 05:47 AM

phantomtypist,

Do you have any more info on this? That should not happen at all.

BTW, you can force your Netduino Mini into bootloader mode (so that you can erase your current app) by applying power to the DTR pin (pin 3) during power up. No need to erase and reflash.

Chris


I totally didn't know about the DTR pin to force the Mini into bootloader mode. I kinda wondered how to do that.

As for more info, I just create a SerialPort, assign COM2 to it (9600, Parity.None, 8, StopBits.One) and I have the XBee connected to pins 11 and 12. I then open the serial port and just look trying to read the buffer. If for whatever reason stop debugging, then try running debug again (F5), I can not connect to the Mini anymore (using RS232 PL2303 Prolific USB cable). I also can not get into the TinyCLR on the Mini using MFDeploy. I can now use the DTR to get to the bootloader so at least I don't have the reflash TinyBooter.

EDIT: Forgot to mention I am using 4.1.1.0 Alpha 5

#23 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 January 2011 - 06:08 AM

phantomtypist, You're deploying over a TTL cable (pins 11,12), not an RS232 cable (pins 1,2)--correct? Also, COM2 is pins 1,2. COM1 is pins 11,12. Are you actually wanting to use the COM1 SerialPort for XBee instead? Chris

#24 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 26 January 2011 - 09:57 PM

phantomtypist,

You're deploying over a TTL cable (pins 11,12), not an RS232 cable (pins 1,2)--correct?

Also, COM2 is pins 1,2. COM1 is pins 11,12. Are you actually wanting to use the COM1 SerialPort for XBee instead?

Chris


I am deploying over COM2 (pins 1,2) RS232

I have the XBee plugged into COM1 (pins 11, 12) TTL.

My assumption was that since the internal swapping between COM 1 and 2 still had a bug, I was thinking I could just call COM2 since it was physically mapped to pins 11 and 12 (TTL). I'm just going to give up at this point until a new firmware is released because the other bug in DataReceived is a show stopper.

#25 neuron uav

neuron uav

    New Member

  • Members
  • Pip
  • 2 posts

Posted 30 January 2011 - 08:10 PM

The only way to trigger an event is to a delegate within the loop of reading. We SerialPort class to encapsulate a singleton. It's good for you. I think there is an error in the SerialPort class. PD-I've tried from Visual Studio and the emulator and I have not been able to shoot the event. Only the solution of Singleton. Greetings

#26 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 31 January 2011 - 11:12 AM

Okay, this has hopefully been fixed in v4.1.1 alpha 6 as well (and v4.1.0.6 RC1). Please test out the new release and let me know if it works for you. Chris

#27 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 01 February 2011 - 04:26 AM

Works for me! Thank you!

#28 Tecchie

Tecchie

    Member

  • Members
  • PipPip
  • 23 posts
  • LocationGermany

Posted 03 February 2011 - 08:42 AM

Please test out the new release and let me know if it works for you.


Does work for me, too. Thanks for fixing!




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.