Page 1 of 1

Programing Bluetooth

Posted: Fri Sep 30, 2005 7:08 am
by TheMaster
Hi Folks,

does anyone have any idea how to program a bluetooth interface under windows. Is it the same like programing a serial interface like com1, com2 etc.

If anyone has some code or hint would be very helpfull. Many thanks for help.

Posted: Fri Jan 02, 2009 9:33 pm
by Joakim Christiansen
I ask the same question, I saw some C# application using calls like these:

Code: Select all

using System.IO.Ports;

static SerialPort MyPort = new SerialPort();

MyPort.Write(...)
I wonder how to do the same in PB.

Posted: Fri Jan 02, 2009 10:06 pm
by Gansta93
Joakim Christiansen wrote:I ask the same question, I saw some C# application using calls like these:

Code: Select all

using System.IO.Ports;

static SerialPort MyPort = new SerialPort();

MyPort.Write(...)
I wonder how to do the same in PB.
And what about Serial Port library?

BlueTooth ports are serial ports (com).

Posted: Fri Jan 02, 2009 10:14 pm
by Progi1984

Posted: Sun Jan 04, 2009 4:19 pm
by Baldrick
@TheMaster,
I have some code here from a project which I started & abandoned which may or may not be of use to you.
There are several bluetooth stacks available which makes it pretty much impossible to program an application to generically connect to a bluetooth device. The code I have partially ported is for the BlueSoleil products, which is useless if you happen to be using a device on your computer using say the Widcomm stack or the M$ stack versions. ( Hence the main reason why I abandoned the project. :cry: )
I had it connecting to my Bluesoleil dongle & able to seek, find, get information about remote bluetooth devices, etc. I ran into problems with some of the bluetooth callback threads with what I believe was a limitation with PB at the time. ( I just can't remember exactly what the problem was atm, except that it was something to do with external threads created by the bluesoleil dll which I was unable to ID or something such for it. )

So, if you happen to be using a BlueSoleil bluetooth device, I am happy to pass what code I have here for you to continue with. ( There is approx 1,000 lines of code including constants, prototypes, structures, test code etc. )
Just let me know here if you would like a look at the code & I will organise a way to get it to you. :)