S
Star
Hi all,
I am using the OpenNETCF.IO.Serial.Port class for reading data from a
COM port (to use a GPS)
Everything works fine, however when the Power button of my PDA is
pressed, the port seems to be closed (the GPS led stops blinking)
However if I press the power button again, it will start blinking again.
Is there a way of keep the port open even when the power button is
pressed (I guess while the PDA is in sleep mode)?
I think it´s possible because I've seen some other GPS programs that do
that.
I've check the NGs for some information but I couldn't find anything.
Here is a sample code that shows basically what I do:
private static OpenNETCF.IO.Serial.Port m_Port;
public Form1()
{
InitializeComponent();
m_Port = new OpenNETCF.IO.Serial.Port("COM4:");
m_Port.Settings.Parity = Parity.none;
m_Port.Settings.BaudRate =
OpenNETCF.IO.Serial.BaudRates.CBR_2400;
m_Port.Settings.StopBits = StopBits.one;
}
private void button1_Click(object sender, EventArgs e)
{
m_Port.Open();
}
Thanks
I am using the OpenNETCF.IO.Serial.Port class for reading data from a
COM port (to use a GPS)
Everything works fine, however when the Power button of my PDA is
pressed, the port seems to be closed (the GPS led stops blinking)
However if I press the power button again, it will start blinking again.
Is there a way of keep the port open even when the power button is
pressed (I guess while the PDA is in sleep mode)?
I think it´s possible because I've seen some other GPS programs that do
that.
I've check the NGs for some information but I couldn't find anything.
Here is a sample code that shows basically what I do:
private static OpenNETCF.IO.Serial.Port m_Port;
public Form1()
{
InitializeComponent();
m_Port = new OpenNETCF.IO.Serial.Port("COM4:");
m_Port.Settings.Parity = Parity.none;
m_Port.Settings.BaudRate =
OpenNETCF.IO.Serial.BaudRates.CBR_2400;
m_Port.Settings.StopBits = StopBits.one;
}
private void button1_Click(object sender, EventArgs e)
{
m_Port.Open();
}
Thanks