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

local adapter interface
remote Bluetooth address
--addr-type=[public | random]
Set LE address type. Default: public
the MTU size
the PSM for GATT/ATT over BR/EDR
--sec-level=[low | medium | high]
security level. Default: low
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: