2

I'm able to set up GATT services and characteristics with the latest bluetoothctl tool using the following commands:

register-service, register-characteristic, register-application

I was just wondering if there is a way to define GATT-based service for use only over the BR/EDR transport or LE transport using the bluetoothctl tool or any Bluez utility tool? Can anyone shed some light on this?

1 Answers1

0

Theoretically speaking, the GATT layer should be agnostic of whether BLE or BR/EDR is used. You can test this by disabling BLE through the following commands:-

#btmgmt power off
#btmgmt le off
#btmgmt power on

After that you can use something like gatttool from a remote device to check if you can see the services/characteristics that you have created using the bluetoothctl commands that you listed earlier.

I hope this helps.

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
  • Thanks for your reply Youssif. Currently, I'm doing Bluetooth SIG certification and there are two test cases /TP/GAR/CL/BI-34-C and /TP/GAR/CL/BI-35-C which requires GATT-based service for use only over the LE transport and BR/EDR transport, respectively. I tried what you suggested and was not able to pass the test cases either turning BR/EDR or LE off. I think I need to modify the Bluez code in order to pass these test cases. It would be great if you can point me to the right direction. Thanks! – Edward Fung Jul 24 '19 at 17:57
  • Hey Edward. I believe the tests that you are running are client tests not server tests, but I understand that you still need the server part in order to get the tests to pass. I have worked on SIG qualification of BlueZ myself and my recommendation is to drop GATT support over classic, if possible. GATT over classic is a feature that is almost never used and I believe it is an optional part of the qualification, so you can drop it. If you still want to pass it then you are right, you might have to modify existing tools. – Youssif Saeed Jul 25 '19 at 08:13
  • Moreover please see these links which might give you an idea about these tests and other BlueZ tests:- 1) https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/android/pts-gatt.txt. 2) https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/android. They are quite dated but are still a useful resource when getting qualifications to pass. – Youssif Saeed Jul 25 '19 at 08:17
  • Hello Youssif, I did not realize these two test cases were optional. Thanks for your tips! I've dropped the GATT support over Bluetooth Classic. – Edward Fung Jul 25 '19 at 19:05
  • Hello Youssif, one more quick question, have you managed to pass the test case "GATT/SR/UNS/BI-01-C"? This is a relatively new test case which is introduced in 2017. Thanks. – Edward Fung Jul 25 '19 at 19:09