Connect RFCOMM profile using BlueZ 5

I am trying to port Rockpool (Pebble Watch connection app) to BlueZ 5.

The original (BlueZ 4) code used QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol) to establish RFCOMM connection on channel 1.

What I understand, in BlueZ 5 I need to create a Profile, set it to client mode, configure channel and register it to BlueZ DBus daemon. Then i use this profile to connect to Bluetooth device and it should give me a file-descriptor.

The thing is, that Pebble Watch does not advertise 0x1101 SerialPort profile UUID.

"Pebble Time 6C96"
("00000000-DECA-FADE-DECA-DEAFDECACAFF", "00001200-0000-1000-8000-00805F9B34FB")

so, when I try to connect it, I get "br-connection-profile-unavailable" error.

Is there some way to force connecting to SerialPort profile?

You can find my work-in-progress code at GitHub - smokku/rockpool: Pebble client application for Sailfish OS

1 Like