D
dgretlein
Greetings -
I found your name on this MSDN chat:
..NET Compact Framework and Smart Device Programming (October 11, 2005)
I have an issue and it is driving me crazy !!! I have been developing
with VB6 forever it seems like ( cut my teeth on assembly and C code
development ).
My delima has confused me ..... and I am wondering if you would help me
along. I am stuck on not being about to fire a data received event.
I have been working on a Bluetooth application for an Dell Axim x51
PDA, developing in C# in VS2005, using .NET CF 2.0, WM5.
I there is a Bluetooth manager on the PDA that shows me two COM ports (
COM7 Incoming port and COM8 Outgoing port ).
My code can "discover" the Bluetooth radio device and connect. I can
send data to the device, but cannot get any of my serialPort receive
event handlers to fire when I am pretty darn certain data is coming.
When I close the app, the connection closes as it should and the BT
radio disconnects cleanly.
Here is where I am stuck. I have created serialPort1 and serialPort2
objects and configured the setting via the properties page. I have a
menu item that does
serialPort1.Open();
serialPort2.Open();
and the LED on the BT radio lights up and stays discovered. As I said,
I send data reliably and repeatably.
I have read a few threads of developers having similar problems, but I
have not found any solutions. I have the receive code below.
private void serialPort1_DataReceived(object sender,
System.IO.Ports.SerialDataReceivedEventArgs e) {
string line = serialPort1.ReadExisting();
receivedData = line;
txtReceive.Invoke(new
EventHandler(dataReceivedEventPort1));
}
private void dataReceivedEventPort1(object o, EventArgs e)
{
//writeToConsole(receivedData);
txtReceive.Text = receivedData;
}
I found your name on this MSDN chat:
..NET Compact Framework and Smart Device Programming (October 11, 2005)
I have an issue and it is driving me crazy !!! I have been developing
with VB6 forever it seems like ( cut my teeth on assembly and C code
development ).
My delima has confused me ..... and I am wondering if you would help me
along. I am stuck on not being about to fire a data received event.
I have been working on a Bluetooth application for an Dell Axim x51
PDA, developing in C# in VS2005, using .NET CF 2.0, WM5.
I there is a Bluetooth manager on the PDA that shows me two COM ports (
COM7 Incoming port and COM8 Outgoing port ).
My code can "discover" the Bluetooth radio device and connect. I can
send data to the device, but cannot get any of my serialPort receive
event handlers to fire when I am pretty darn certain data is coming.
When I close the app, the connection closes as it should and the BT
radio disconnects cleanly.
Here is where I am stuck. I have created serialPort1 and serialPort2
objects and configured the setting via the properties page. I have a
menu item that does
serialPort1.Open();
serialPort2.Open();
and the LED on the BT radio lights up and stays discovered. As I said,
I send data reliably and repeatably.
I have read a few threads of developers having similar problems, but I
have not found any solutions. I have the receive code below.
private void serialPort1_DataReceived(object sender,
System.IO.Ports.SerialDataReceivedEventArgs e) {
string line = serialPort1.ReadExisting();
receivedData = line;
txtReceive.Invoke(new
EventHandler(dataReceivedEventPort1));
}
private void dataReceivedEventPort1(object o, EventArgs e)
{
//writeToConsole(receivedData);
txtReceive.Text = receivedData;
}