GATT Tools
BLE generic attribute bluetooth
Access the services running on bluetooth device
sudo gatttool --device=MAC BLE ADDRESS --interactive
gatttool [OPTION...]
-h, --help Show help options
--help-all Show all help options
--help-gatt Show all GATT commands
--help-params Show all Primary Services/Characteristics arguments
--help-char-read-write Show all Characteristics Value/Descriptor Read/Write arguments
-i --adapter=hciX local adapter interface
| -b --device=MAC remote Bluetooth address
| -t --addr-type=[public | random] Set LE address type. Default: public
| -m --mtu=MTU the MTU size
| -p --psm=PSM the PSM for GATT/ATT over BR/EDR
| -l --sec-level=[low | medium | high] security level. Default: low
| -I --interactive
| Interactive commands:
| connect [address [address type]] Connect to a remote device
| disconnect Disconnect from a remote device
|
primary [UUID] Primary Service Discovery
| included [start hnd [end hnd]] Find Included Services
| characteristics [start hnd<\/var>[end hnd<\/var> [UUID]]] Characteristics Discovery
| char-desc [start hnd<\/var>] [end hnd<\/var>] Descriptor Discovery
| char-read-hnd handle Value/Descriptor Read by handle
| char-read-uuid UUID [start hnd<\/var>] [end hnd] Value/Descriptor Read by UUID
| char-write-req handle new value Value Write (Write Request)
| char-write-cmd handle new value Value Write (No response)
| sec-level [low | medium | high] Set security level. Default: low
| mtu value Exchange MTU for GATT/ATT
| | | | | | | | | | | | | | | | | | | | | | |
Adapted from:
jaredwolff.com/blog/get-started-with-bluetooth-low-energy/