I'm going to revise the entire post since I have a more solid grasp on the issue + relevant troubleshooting steps. I have a Trimble R1 GPS device, which doesn't specify support for Ubuntu, however there are drivers for Windows, and apps available for Android and iOS. I need to bind serial ports to the Bluetooth GPS device so I can read NMEA sentences. I'm using a Raspberry Pi.
When trying to use bluetoothctl
, pair XX:XX:XX:XX:XX:XX
seems to work fine, however the connect XX:XX:XX:XX:XX:XX
command returns Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable
Checking btmon shows that some data looks to be exchanged, before the device (I assume) requests to disconnect:
...> HCI Event: Number of Completed Packets (0x13) plen 5 #33 [hci0] 9.312221 Num handles: 1 Handle: 12 Address: 0C:61:CF:24:53:D7 (Texas Instruments) Count: 1 #31: len 24 (0 Kb/s) Latency: 235 msec (2-235 msec ~127 msec) Channel: 66 [PSM 1 mode Basic (0x00)] {chan 0} Channel Latency: 235 msec (3-235 msec ~119 msec)< ACL Data TX: Handle 12 flags 0x00 dlen 12 #34 [hci0] 11.586892 L2CAP: Disconnection Request (0x06) ident 5 len 4 Destination CID: 66 Source CID: 64> ACL Data RX: Handle 12 flags 0x02 dlen 12 #35 [hci0] 11.592545 L2CAP: Disconnection Response (0x07) ident 5 len 4 Destination CID: 66 Source CID: 64> HCI Event: Number of Completed Packets (0x13) plen 5 #36 [hci0] 11.812223 Num handles: 1 Handle: 12 Address: 0C:61:CF:24:53:D7 (Texas Instruments) Count: 1 #34: len 12 (0 Kb/s) Latency: 225 msec (2-235 msec ~176 msec)< HCI Command: Disconnect (0x01|0x0006) plen 3 #37 [hci0] 13.599716 Handle: 12 Address: 0C:61:CF:24:53:D7 (Texas Instruments) Reason: Remote User Terminated Connection (0x13)> HCI Event: Command Status (0x0f) plen 4 #38 [hci0] 13.600151 Disconnect (0x01|0x0006) ncmd 1 Status: Success (0x00)> HCI Event: Disconnect Complete (0x05) plen 4 #39 [hci0] 13.697542 Status: Success (0x00) Handle: 12 Address: 0C:61:CF:24:53:D7 (Texas Instruments) Reason: Connection Terminated By Local Host (0x16)@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 13.697592 BR/EDR Address: 0C:61:CF:24:53:D7 (Texas Instruments) Reason: Connection terminated by local host (0x02)
I've also tried binding the rfcomm port directly to the address with:
sudo rfcomm bind rfcommx 0C:61:CF:24:53:D7 x
The bluetooth GPS has several different channels available, so I ended up binding each channel to a different rfcomm port. Checking the output with gpsd and cgps doesn't show any data transfer happening on any of the channels.
Here is the result from sdptool browse XX:XX:XX:XX:XX:XX
:
Browsing 0C:61:CF:24:53:D7 ...Service Name: COM1Service RecHandle: 0x10006Service Class ID List:"Serial Port" (0x1101)Protocol Descriptor List:"L2CAP" (0x0100)"RFCOMM" (0x0003) Channel: 1Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100Profile Descriptor List:"Serial Port" (0x1101) Version: 0x0100Service Name: COM2Service RecHandle: 0x10005Service Class ID List:"Serial Port" (0x1101)Protocol Descriptor List:"L2CAP" (0x0100)"RFCOMM" (0x0003) Channel: 2Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100Profile Descriptor List:"Serial Port" (0x1101) Version: 0x0100Service Name: COM3Service RecHandle: 0x10004Service Class ID List:"Serial Port" (0x1101)Protocol Descriptor List:"L2CAP" (0x0100)"RFCOMM" (0x0003) Channel: 3Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100Profile Descriptor List:"Serial Port" (0x1101) Version: 0x0100Service Name: GNSS ServerService RecHandle: 0x10008Service Class ID List:"Serial Port" (0x1101)"" (0x1136)Protocol Descriptor List:"L2CAP" (0x0100)"RFCOMM" (0x0003) Channel: 4Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100Profile Descriptor List:"" (0x1135) Version: 0x0100Failed to connect to SDP server on 0C:61:CF:24:53:D7: Connection refused
I'm not sure if that last error is relevant to the connection here. When I'm using this device on a windows machine, I'm able to get the NMEA sentences from COM13
. I'm not seeing that service name pop up here.