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

Netduino Mini -using same COMPORT for deployment and debugging


  • Please log in to reply
1 reply to this topic

#1 Nissim

Nissim

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts
  • LocationNew Zealand

Posted 12 September 2011 - 07:02 AM

Hi There

I have Netduino Mini

Is it possible to make use of the same comport of Netduino Mini to download firmware and for debugging?
I can deploy my example successfully on first attempt.
But the second time around the device is hung
As you can see below I close comport after sending test byte - I was hoping that after closing the port the comport will become available again.

using System;
using System.Threading;
using System.IO.Ports;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoMini;


namespace NetduinoMiniApplication1
{
    public class Program
    {
        public static void Main()
        {
     
            var serialPort = (SerialPort)null;
            Thread.Sleep(1000);
            var bytes = new byte[] { 0x31 };
            serialPort = new SerialPort("COM2", 9600, Parity.None, 8, StopBits.One);//" COM2"  RS232  Pin 1,2
            serialPort.Open();
            serialPort.Write(bytes, 0, 1);
           serialPort.Close();
            while (true)
            {
                Thread.Sleep(5000);
            }
        }

    }
}

Many thanks
Nissim

Edited by Nissim, 12 September 2011 - 07:22 AM.
Added [code] tags


#2 Dixon

Dixon

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 13 September 2011 - 08:58 AM

Hi Nissim, I'm afraid you can't. You will need to delete the application before you can deploy again. Check http://forums.netdui...-netduino-mini/ Regards, Carlos.




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.