0

This is quite a general question I think but searching online I can't really find that much information. I have an embedded system with a Bluetooth chip that I often use to connect to another embedded device. This connection is very robust and never fails.

However the embedded system can also connect to windows via a virtual serial port. I've written a piece of software to handle the connection using the 32Foot inthehand bluetooth library. It works very consistently on some computers (including my own) but entirely fails or is very flakey on others. One of which is actually an identical system ( same hardware/ same version of windows)

Is there anything I should specifically be looking at in my software to improve reliability accross different computers/ versions of windows when it comes to bluetooth pairing, creation of virtual com ports etc.

Thanks

1 Answers1

1

I write software that runs on Windows and connects to an embedded device via a virtual serial port using the 32Foot library. I've experienced similar issues to you, and from experience the main problems are:

Conflicts between Bluetooth radio on Windows: Is more than one Bluetooth radio installed/attached? I find that if on a Windows machine there is both an external Bluetooth dongle plugged in, and the internal Bluetooth is switched on, it won't work.

Widcomm/Broadcom and BlueSoleil stacks: These don't support authentication, and Widcomm/Broadcom don't support setting of a pin. You can check if BluetoothRadio.PrimaryRadio is not null, and if so find out the SoftwareManufacturer of the Bluetooth Radio. If the Manufacturer enum is Bluesoleil, Widcomm or Broadcom then just don't use authentication or SetPin when initializing the BluetoothClient.

Toshiba stack: This isn't supported at all

Is a supported Bluetooth radio and stack even currently available?: You can handle a PlatformNotSupportedException which will tell you if there is no currently available supported Bluetooth stack on the machine. This won't let you know if there is more than one radio attached however.

Finally, from experience, internal Bluetooth chips don't always have a good range and interference can really affect the connection. I have had better luck with an external Bluetooth dongle.

spaceplane
  • 607
  • 1
  • 12
  • 27