how to advertise a GATT service only for LE or BR/EDR?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi group,

As part of the bluetooth SIG certification there are two test cases 
/TP/GAR/CL/BI-34-C and /TP/GAR/CL/BI-35-C (you can see they defined in 
unit/test-gatt.c).
Currently I am able to run the "test/example-gatt-server" and see my 
custom services and characteristics, but I need to define an specific 
service/characteristic to be only accessible trough LE or BR/EDR 
transport parameter. I was digging into the code but I was unable to 
find how to set it for the GATT server.

In other words, what I want to do is launch the gatt-server and then, 
when inspecting the services/characteristic with gatttool, the returned 
list should be different if I run gatttool with "-p 31" or not (notice 
how the gatttool prompt is set to LE or BR).

# gatttool -I -b 00:40:9D:98:99:BD -p 0
[00:40:9D:98:99:BD][LE]> connect
Attempting to connect to 00:40:9D:98:99:BD
Connection successful
[00:40:9D:98:99:BD][LE]> primary
attr handle: 0x0001, end grp handle: 0x0005 uuid: 
00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0006, end grp handle: 0x0009 uuid: 
00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000a, end grp handle: 0x000d uuid: 
0000180f-0000-1000-8000-00805f9b34fb
attr handle: 0x000e, end grp handle: 0x001d uuid: 
12345678-1234-5678-1234-56789abcdef0
attr handle: 0x001e, end grp handle: 0x0025 uuid: 
0000180d-0000-1000-8000-00805f9b34fb


# /tmp/gatttool -I -b 00:40:9D:98:99:BD -p 31
[00:40:9D:98:99:BD][BR]> connect
Attempting to connect to 00:40:9D:98:99:BD
Connection successful
[00:40:9D:98:99:BD][BR]> primary
attr handle: 0x0001, end grp handle: 0x0005 uuid: 
00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0006, end grp handle: 0x0009 uuid: 
00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000a, end grp handle: 0x0019 uuid: 
12345678-1234-5678-1234-56789abcdef0
attr handle: 0x001a, end grp handle: 0x001d uuid: 
0000180f-0000-1000-8000-00805f9b34fb
attr handle: 0x001e, end grp handle: 0x0025 uuid: 
0000180d-0000-1000-8000-00805f9b34fb



I am using bluez 5.41. Is possible to advertise a service only for LE or 
BR? I guess it should because is part of the SIG certification and is 
part of the unit/test-gatt.��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux