2

I'm trying to pair from a Linux host (ARM based, Angstrom distribution) to a MCU driven embedded device using BLE Just Works Secure Connection. As a device I'm currently using an ESP32 dev kit flashed with the GATT security example. However, so far my tries weren't successful and I failed to find the according documentation, either.

I managed to pair my Android smartphone with the device, so pairing on the device side, in general, seems to work. I also tried to conduct the pairing without a Secure Connection (setting Authorization Request to SP_LE_AUTH_BOND) which worked with bluetoothctl or btmgmt.

I'm grateful for any documentation pointer how to perform pairing from the command line, Python scripting or any C/C++ code.

kadamb
  • 1,532
  • 3
  • 29
  • 55
Oleg
  • 21
  • 2
  • Please clarify "weren't successful" and include what happens. – Emil May 31 '20 at 09:22
  • I tried to use the ```pair``` command from ```btmgmt```: ```pair -c 0x03 -t 0x02
    ``` and the ```pair``` comand from ```bluetoothctl``` but received inconclusive error messages like ```fail_reason: 0x55``` on the ESP32 and an ```unspecified error``` that authentication failed from BlueZ.
    – Oleg May 31 '20 at 09:47

1 Answers1

0

Have a look at the answer below and the included references; these cover pairing using BlueZ/Linux:-

Raspberry Pi BLE Encryption/Pairing

If this still doesn't work, please launch "btmon" on another terminal before starting the pairing process as that will give you an indication as to what is going wrong.

I hope this helps.

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72