Skip to contentSkip to conversation

bluetoothctl: Connecting to a GATT service using BR/EDR

DISCUSSION Christian Eggers 2 participants 4 messages Sep 30, 2022 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

I am trying to connect to a GATT server using bluetoothctl.

HW: dual mode adapters (server+client)
SW: bluez-5.65

1st try: "simply connect" (BR/EDR + LE enabled)
-------------------------------------
[bluetooth]# connect 5C:F3:70:A3:94:E7
Attempting to connect to 5C:F3:70:A3:94:E7
[CHG] Device 5C:F3:70:A3:94:E7 TxPower: 0
[CHG] Device 5C:F3:70:A3:94:E7 Modalias: usb:v1D6Bp0246d0541
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001823-0000-1000-8000-00805f9b34fb <-- HTTP Proxy Service [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 72:DF:6C:03:4A:6A RSSI: -81
[CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable [CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: no
[CHG] Device 5C:F3:70:A3:94:E7 Connected: no

ok, it looks I need a profile for making a BR/EDR connection ...

2nd try: register profile beforehand (BR/EDR + LE enabled)
-------------------------------------
[bluetooth]# menu gatt
[bluetooth]# register-application 00001823-0000-1000-8000-00805f9b34fb Application registered
[bluetooth]# menu back
[bluetooth]# connect 5C:F3:70:A3:94:E7
Attempting to connect to 5C:F3:70:A3:94:E7
[CHG] Device 5C:F3:70:A3:94:E7 Connected: yes
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001823-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: yes
Failed to connect: org.bluez.Error.Failed br-connection-not-supported [CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: no
[CHG] Device 5C:F3:70:A3:94:E7 Connected: no

Unfortunately the created GATT profile doesn't provide a connect() method ...

What is the intended procedure for connecting to a GATT server over a BR/EDR link? The "connect" command works fine after disabling BR/EDR using btmgmt, but this is not what I wanted.

regards,
Christian

#1 lore raw

Hi Christian,

Quoted 45 lines · Christian Eggers

I am trying to connect to a GATT server using bluetoothctl.

HW: dual mode adapters (server+client)
SW: bluez-5.65

1st try: "simply connect" (BR/EDR + LE enabled)
-------------------------------------
[bluetooth]# connect 5C:F3:70:A3:94:E7
Attempting to connect to 5C:F3:70:A3:94:E7
[CHG] Device 5C:F3:70:A3:94:E7 TxPower: 0
[CHG] Device 5C:F3:70:A3:94:E7 Modalias: usb:v1D6Bp0246d0541
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001823-0000-1000-8000-00805f9b34fb <-- HTTP Proxy Service [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 72:DF:6C:03:4A:6A RSSI: -81
[CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable [CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: no
[CHG] Device 5C:F3:70:A3:94:E7 Connected: no

ok, it looks I need a profile for making a BR/EDR connection ...

2nd try: register profile beforehand (BR/EDR + LE enabled)
-------------------------------------
[bluetooth]# menu gatt
[bluetooth]# register-application 00001823-0000-1000-8000-00805f9b34fb Application registered
[bluetooth]# menu back
[bluetooth]# connect 5C:F3:70:A3:94:E7
Attempting to connect to 5C:F3:70:A3:94:E7
[CHG] Device 5C:F3:70:A3:94:E7 Connected: yes
[CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 UUIDs: 00001823-0000-1000-8000-00805f9b34fb [CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: yes
Failed to connect: org.bluez.Error.Failed br-connection-not-supported [CHG] Device 5C:F3:70:A3:94:E7 ServicesResolved: no
[CHG] Device 5C:F3:70:A3:94:E7 Connected: no

Quoted 6 lines

Unfortunately the created GATT profile doesn't provide a connect() method ...

What is the intended procedure for connecting to a GATT server over a BR/EDR link? The "connect" command works fine after disabling BR/EDR using btmgmt, but this is not what I wanted.

Connecting over BR/EDR as a central is currently not supported, it will probably require some changes in order to enable it although the likes of bt_att/bt_gatt_client shall have proper support for it.

Quoted 5 lines

regards,
Christian

Signature · 1 line
Luiz Augusto von Dentz
#2 lore raw

Hi Luiz,

Quoted 5 lines · Luiz Augusto von Dentz

Hi Christian,

Connecting over BR/EDR as a central is currently not supported, it will probably require some changes in order to enable it although the likes of bt_att/bt_gatt_client shall have proper support for it.

currently it takes several seconds to read 70 KiB over a FIFO like GATT characteristic. Is this normal? In which configuration I can get the maximum throughput? Is it worth to tune the BLE parameters or should I use BR/EDR with a "classic" profile instead?

regards,
Christian

#3 lore raw

Hi Christian,

Quoted 6 lines · Christian Eggers

Hi Luiz,

Quoted 2 lines · Luiz Augusto von Dentz

Hi Christian,

Quoted 8 lines
Quoted 3 lines

Connecting over BR/EDR as a central is currently not supported, it will probably require some changes in order to enable it although the likes of bt_att/bt_gatt_client shall have proper support for it.

currently it takes several seconds to read 70 KiB over a FIFO like GATT characteristic. Is this normal? In which configuration I can get the maximum throughput? Is it worth to tune the BLE parameters or should I use BR/EDR with a "classic" profile instead?

If you want to maximize throughput you will probably need to change the connection parameters and perhaps use L2CAP directly since ATT is not very efficient and you either have to resort to unreliable write without response+notify or wait for write responses. If you want to do file based transfer Id suggest you looking into implementing Object Transfer Service which uses L2CAP CoC to maximize data transfers, alternatively you can use OBEX if you prefer using BR/EDR, that said it would be great to have support for OTS since that is used by the likes of Media Control Service which is part of LE Audio stack.

Quoted 29 lines

regards,
Christian

_______________________________________________________
Christian
Eggers
Software Engineer
ARRI
Arnold & Richter Cine Technik GmbH & Co. Betriebs KG Arriweg 17,
83071
Stephanskirchen
www.arri.com

+49 8036 3009-3118
[email protected]

Get all the latest information from www.arri.com, Facebook, Twitter, Instagram, LinkedIn and YouTube.

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRA 57918 Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: München ‑ Registergericht: Amtsgericht München ‑ Handelsregisternummer: HRB 54477 Geschäftsführer: Dr. Matthias Erb (Chairman); Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger

Signature · 1 line
Luiz Augusto von Dentz