Blues vs GATTtool list of primary services

520 Views Asked by At

I need to create app with BLE-button. I use simple ab shutter for that and java-application on RPi3. But tinyB does not found right primary service. Then i try to look for it at native tools of bluez and gatttool. Can someone help: Blues 5.65 correctly connect to the device. Then info command prints all services on device, gatttool too. But command list-attributes shows only some of them. Charactersitic , that i need - HID (00001812-0000-1000-8000-00805f9b34fb). How can i found it at list-attributes? Cause tinyB library shows only that list for ex.

bluetoothctl info:

info
Device 31:F7:32:16:2E:B2 (public)
    Name: AB Shutter3
    Alias: AB Shutter3
    Appearance: 0x03c1
    Icon: input-keyboard
    Paired: yes
    Bonded: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
    UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
    UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
    UUID: Unknown                   (0000ae40-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v2717p0040d0023
    Battery Percentage: 0x58 (88)

list-attributes:

list-attributes 31:F7:32:16:2E:B2
Primary Service (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service0008
    00001801-0000-1000-8000-00805f9b34fb
    Generic Attribute Profile
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service0008/char0009
    00002a05-0000-1000-8000-00805f9b34fb
    Service Changed
Descriptor (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service0008/char0009/desc000b
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
Primary Service (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c
    0000180a-0000-1000-8000-00805f9b34fb
    Device Information
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char000d
    00002a29-0000-1000-8000-00805f9b34fb
    Manufacturer Name String
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char000f
    00002a24-0000-1000-8000-00805f9b34fb
    Model Number String
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char0011
    00002a25-0000-1000-8000-00805f9b34fb
    Serial Number String
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char0013
    00002a27-0000-1000-8000-00805f9b34fb
    Hardware Revision String
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char0015
    00002a26-0000-1000-8000-00805f9b34fb
    Firmware Revision String
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char0017
    00002a28-0000-1000-8000-00805f9b34fb
    Software Revision String
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char0019
    00002a23-0000-1000-8000-00805f9b34fb
    System ID
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char001b
    00002a2a-0000-1000-8000-00805f9b34fb
    IEEE 11073-20601 Regulatory Cert. Data List
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service000c/char001d
    00002a50-0000-1000-8000-00805f9b34fb
    PnP ID
Primary Service (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service001f
    0000180f-0000-1000-8000-00805f9b34fb
    Battery Service
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service001f/char0020
    00002a19-0000-1000-8000-00805f9b34fb
    Battery Level
Descriptor (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service001f/char0020/desc0022
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
Primary Service (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service003e
    0000ae40-0000-1000-8000-00805f9b34fb
    Unknown
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service003e/char003f
    0000ae41-0000-1000-8000-00805f9b34fb
    Unknown
Characteristic (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service003e/char0041
    0000ae42-0000-1000-8000-00805f9b34fb
    Unknown
Descriptor (Handle 0x0000)
    /org/bluez/hci0/dev_31_F7_32_16_2E_B2/service003e/char0041/desc0043
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration

gatttool:

[31:F7:32:16:2E:B2][LE]> primary

Command Failed: Disconnected Connection successful [31:F7:32:16:2E:B2][LE]> primary attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb attr handle: 0x0008, end grp handle: 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb attr handle: 0x000c, end grp handle: 0x001e uuid: 0000180a-0000-1000-8000-00805f9b34fb attr handle: 0x001f, end grp handle: 0x0022 uuid: 0000180f-0000-1000-8000-00805f9b34fb attr handle: 0x0023, end grp handle: 0x003d uuid: 00001812-0000-1000-8000-00805f9b34fb attr handle: 0x003e, end grp handle: 0x0043 uuid: 0000ae40-0000-1000-8000-00805f9b34fb

1

There are 1 best solutions below

0
Dragomir On

Problem was solved by configure bluetooth service at unit-file (/lib/systemd/system/bluetooth.service) by adding --noplugin=input,hog at exec