2021-03-09 9:54 AM
Hi,
I'm working with the stm32mp157f-dk2 and with OpenSTLinux and I'm trying to create a GATT service for provisioning the wifi credentials.
The problem is, according to https://wiki.st.com/stm32mpu/wiki/How_to_scan_BLE_devices I should be able to run the gatttool command. Unfurntently I'm not.
I have already re-flashed the OpenSTLinux and I also have reprogrammed the kernel.
I'm running the OpenSTLinux 5-4 20-11-12.
What should I do? I have also tried the apt-get install command..
Thanks,
Fernando Fontes
Solved! Go to Solution.
2021-03-31 7:45 AM
Hi @FFont.1
The gatttool is available after installing the package bluez5-noinst-tools :
root@stm32mp1:~# apt-get install bluez5-noinst-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  bluez5-noinst-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
...
root@stm32mp1:~# which gatttool
/usr/bin/gatttool
root@stm32mp1:~# gatttool -h
Usage:
  gatttool [OPTION?]
 
Help Options:
  -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
 
Application Options:
  -i, --adapter=hciX                        Specify local adapter interface
  -b, --device=MAC                          Specify remote Bluetooth address
  -t, --addr-type=[public | random]         Set LE address type. Default: public
  -m, --mtu=MTU                             Specify the MTU size
  -p, --psm=PSM                             Specify the PSM for GATT/ATT over BR/EDR
  -l, --sec-level=[low | medium | high]     Set security level. Default: low
  -I, --interactive                         Use interactive modeBest regards
JM
2021-03-15 10:06 AM
Hi @FFont.1 ,
I understand Gattool is provided by gattlib module.
Is it the one you tried to app-get ?
Olivier
2021-03-31 7:45 AM
Hi @FFont.1
The gatttool is available after installing the package bluez5-noinst-tools :
root@stm32mp1:~# apt-get install bluez5-noinst-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  bluez5-noinst-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
...
root@stm32mp1:~# which gatttool
/usr/bin/gatttool
root@stm32mp1:~# gatttool -h
Usage:
  gatttool [OPTION?]
 
Help Options:
  -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
 
Application Options:
  -i, --adapter=hciX                        Specify local adapter interface
  -b, --device=MAC                          Specify remote Bluetooth address
  -t, --addr-type=[public | random]         Set LE address type. Default: public
  -m, --mtu=MTU                             Specify the MTU size
  -p, --psm=PSM                             Specify the PSM for GATT/ATT over BR/EDR
  -l, --sec-level=[low | medium | high]     Set security level. Default: low
  -I, --interactive                         Use interactive modeBest regards
JM
