How does bluetoothctl work from the command line with gatt?

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

 



How does one do the following in bluetoothctl from a script and command line that one would do in gatttool as follows:

# gatttool -i hci0 -b $bd_addr -u 2a29 --char-read
handle: 0x0017     value: 54 65 78 61 73 20 49 6e 73 74 72 75 6d 65 6e 74 73 
# gatttool -i hci0 -b $bd_addr --char-desc | grep -i aa22
handle = 0x002f, uuid = f000aa22-0451-4000-b000-000000000000
# gatttool -i hci0 -b $bd_addr -a 0x002f --char-write-req -n 01
Characteristic value was written successfully


For instance:

# bluetoothctl connect CC:78:AB:7E:87:07
Attempting to connect to CC:78:AB:7E:87:07
Connection successful
# bluetoothctl gatt.select-attribute 2a29
# bluetoothctl gatt.read
No attribute selected
# bluetoothctl gatt.select-attribute f000aa22-0451-4000-b000-000000000000
# bluetoothctl gatt.acquire-write
No attribute selected
# bluetoothctl gatt.write 0x01                                           
No attribute selected





John Klug






[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