[Interest] [Bluetooth] Cannot identify the SPP service

Claudiu Olteanu olteanu.claudiu at ymail.com
Thu Jul 2 20:07:46 CEST 2015


Hi there,

I encountered some problems when I tried to connect to a specific service (Serial Port Profile) on a Bluetooth device.
Apparently it cannot identify the service.  Here you can find some logs:

qt.bluetooth: Starting discovery
qt.bluetooth: UUID filter ("{00001101-0000-1000-8000-00805f9b34fb}")
qt.bluetooth.bluez: Discovery on:  "00:12:6F:2A:0B:6E" Mode: 1
qt.bluetooth: Socket discovery finished
qt.bluetooth: Didn't find any

Initially I thought that maybe there is a problem with the implementation of connectToService method.
Therefore I decided to use the QBluetoothServiceDiscoveryAgent to list all the available services. I was surprised to see that when I do a FullDescovery I cannot identify any service for this device.

When I use the sdptool to interrogate the SDP servers I can see the SPP service.

claudiu at linux-qpot:~> sdptool -i hci0 records 00:12:6F:2A:0B:6E
Service Name: SPP
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100


You can find at the end of the e-mail the HCI events captured during both scannings. I couldn't see anything wrong.
The same thing happens randomly when I use a different remote Bluetooth device which exposes only the SPP service. There are moments when it can discover the service and moments when the scanning ends with no results. I couldn't see a pattern.

Details about my environment:
- OS: openSUSE 13.2 (Harlequin) (x86_64) - KDE 
- Qt 5.5 (beta version) 
- BlueZ 5.30
- Remote Bluetooth Devices: HW (HeinrichsWeikamp) OSTC sport, HW OSTC 2

Also I asked a friend to do the Qt SDP search and he has the same problem. The SPP service is never identified. Details about his environment:
- OS: Fedora 22
- Qt 5.4.1
- BlueZ 5.28
- Remote Bluetooth Device: Shearwater Petrel 2


The interesting thing is that when I search for SDP servers exposed by my smartphone I can always discover them, but it doesn't expose a Serial Port Profile.

Regards,
Claudiu

--- SDP scanning using the QT Bluetooth API ----
claudiu at linux-qpot:~> hcidump
HCI sniffer - Bluetooth packet analyzer ver 5.30
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 37 bdaddr 00:12:6F:2A:0B:6E type ACL encrypt 0x00
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 37
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x87
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 37 page 1 max 0
    Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:12:6F:2A:0B:6E name 'OSTCs 0892'
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 37 reason 0x16
    Reason: Connection Terminated by Local Host


--- SDP scanning using the sdptool ----
claudiu at linux-qpot:~> hcidump 
HCI sniffer - Bluetooth packet analyzer ver 5.30
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 34 bdaddr 00:12:6F:2A:0B:6E type ACL encrypt 0x00
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 34
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x87
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 34 page 1 max 0
    Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:12:6F:2A:0B:6E name 'OSTCs 0892'
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 34 reason 0x16
    Reason: Connection Terminated by Local Host



More information about the Interest mailing list