Jump to content

Recommended Posts

Guest Croccy22
Posted

Wonder if anyone has had any luck with this.

I have writen a simple application to transmit and recieve text using serial port bluetooth. Basically it is going to be a simple chat program for use between two bluetooth phones.

Once I have got all this working then I want to look into bluetooth GPS aswell.

Anyway. Using OpenNetCF I have opened up a com port and succesfully send data from the phone to my pc running a hyperterminal connection.

Looking into how the serial ports work. It looks like if you establish a connection to the pc from your phone then the E200 uses the Outbound COM port. (COM7). If however the link is initialised from the pc, then the e200 uses the inbound COM port.

So using COM6 on the phone and COM3 on my pc the link is working. However when I send Data to the phone form the pc I cannot get the phone to detect it, I have tried using the port.datarecieved events. and also tried running a timer to keep checking the length of the input buffer but nothing ever seems to reach it.

Anyone got any ideas on why i can't see anything ariving on the phone?

Matt

Croccy22

Guest spender_uk1
Posted

I've come up with the same problem. I have a bluetooth GPS that I'm trying to receive data from (using the OpenNetCF) on COM7: The port opens but I can't get it to receive anything (or fire the received event).

Here is my code.

DetailedPortSettings portSettings = new OpenNETCF.IO.Serial.HandshakeNone();

sp = new Port(port,portSettings);

sp.Settings.BaudRate=BaudRates.CBR_9600;

sp.Settings.ByteSize=8;

sp.Settings.StopBits=StopBits.one;

sp.Settings.Parity=Parity.none;

sp.RThreshold=20;

try

{

sp.Open();

}

catch

{

}

if (!sp.IsOpen)

// Log the error

else

{

sp.DataReceived+=new OpenNETCF.IO.Serial.Port.CommEvent(sp_DataReceived);

...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.