Bluetooth serial port communication (Windows 10 only)

Just starting out? Need help? Post your questions and find answers here.
User avatar
Michael Vogel
Addict
Addict
Posts: 2680
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Bluetooth serial port communication (Windows 10 only)

Post by Michael Vogel »

Hi there, I've written a program which communicates over the serial port with a bluetooth device. This works perfectly on one Windows 8.1 notebook but not another which has installed Windows 10.

The code itself seems simple, so I have no idea what could be changed here:

Code: Select all

ComPort=7
t=OpenSerialPort(#Serial,"COM"+Str(ComPort),9600,#PB_SerialPort_NoParity,8,1,#PB_SerialPort_NoHandshake,256,256)
If t
	t=WriteSerialPortData(#Serial,?Magic,6)
	If t=6
		Debug "Check Magic Sequence..."
		:
	Else
		Debug "Wrong reply sequence ("+Str(t)+" bytes)"
		CloseSerialPort(#Serial)
	EndIf
EndIf
When using the Windows 8 PC, 6 bytes are returned correctly from the "remote" device, using Windows 10, the serial port gets opened but 0 bytes are returned - the error says Frame (8) and Break (16). Does anyone have an idea what could be done here?
Last edited by Michael Vogel on Thu Jan 21, 2021 10:07 am, edited 2 times in total.
infratec
Always Here
Always Here
Posts: 6883
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Serial port communication (Windows)

Post by infratec »

Sound more like a driver problem.
Check the used driver in DeviceManager.
User avatar
Michael Vogel
Addict
Addict
Posts: 2680
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Bluetooth serial port communication (Windows)

Post by Michael Vogel »

infratec wrote:Sound more like a driver problem.
Check the used driver in DeviceManager.
When adding the Bluetooth device (a laser measuring tool), two virtual COM ports are created, the same behaviour as seen on the other computer.
Concerning the Device Manager: I've compared all informations and settings on both computers but everything looks fine on both sides.
On the "good" computer, it takes some m I moments to open the serial port, the "bad" one does not delay but can't communicate.

Remark - did find some clues that Windows 10 doesn't work properly for serial over bluetooth, has anyone else observed this?

Anyone knows about SPP 1.1 and SPP 1.2 for RFCOMM? I was told that Windows 10 does not supper SPP 1.1 bluetooth devices.
User avatar
Michael Vogel
Addict
Addict
Posts: 2680
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Bluetooth serial port communication (Windows 10 only)

Post by Michael Vogel »

Just a short summary:

1. Many bluetooth devices on the market support SPP Version 1.1 only (Bluetooth 2.1 or so), for example the laser measurement tape PLR 50C.
2. When pairing such devices with a Windows PC, virtual serial interfaces are created
3. Communication in PureBasic can be done by using standard commands like Using OpenSerialPort(...) and WriteSerialPortData(...)
3.1 Everything works fine for Windows XP (not tested), Windows 7 and Windows 8.1
3.2 I had no success doing this job for Windows 10 (supports SPP 1.2 only) and I fear, there's no chance to solve that problem.

Does anyone have additional information for solving that problem?
infratec
Always Here
Always Here
Posts: 6883
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Bluetooth serial port communication (Windows 10 only)

Post by infratec »

Have you tried the 'solution' out of your provided link?
6. “Update Driver Software”
7. left click. From the new menu select “Browse my computer for driver software” by left clicking.
8. “left click on “Let me pick from a list of device drivers on my computer”
9. From the list that appears select Generic Bluetooth Adapter and it will install
morosh
Enthusiast
Enthusiast
Posts: 293
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: Bluetooth serial port communication (Windows 10 only)

Post by morosh »

search for "bluesoleil" software for bluetooth, it may help you
PureBasic: Surprisingly simple, diabolically powerful
User avatar
Michael Vogel
Addict
Addict
Posts: 2680
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Bluetooth serial port communication (Windows 10 only)

Post by Michael Vogel »

@infratec - did try to replace the drivers as well with no success for now (some people also mentioned to swap drivers while establishing the serial ports and even more curious things)
@morosh - will have a more detailed look at the product, but atually I didn't see any hint it would support SPP 1.1
Post Reply