This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 DK PCA10040 ble cannot connect with linux (hcitool neither gatttool)

Hi,

I'm using Uart exemple to post data over BLE. Everything works fine as long as I'm connecting with my phone with BLE apps.

I would like to connect using a linux system to log data and execute scripts. But here i my problem: I'm able to scan the device (using sudo hcitool lescan), but impossible to connect to (neither cmd line using hcitool, gatttool or even BLE GUI on my Rpi).

The error I'm getting when trying to connect over Rpi BLE Gui is : "Pairing failed - GDBus.Error.org.bluez.Error.AuthenticationRejected: Authentication Rejected"

I tried softdevices 5.0.0, 3.1.0 and 2.0.1 using corresponding SDK exemples

I already used Rpi ble with another IOT object I did using a Cypress module, and everything worked fine (I retried it to be sure).

Any idea about what's going wrong ?

Thanks for your help, and have a good day !

Parents
  • Hi everyone,

    I finally managed to make everything work fine with python (bluepy).

    Unfortunately, the only cmd line working is the scan "sudo hcitool lescan" to get MAC_ADRESS

    I am still unable to connect using "gatttool -I -b MAC_ADRESS" or "sudo hcitool leccMAC_ADRESS". @Bjørn Kvaale, I red you links, I managed to scan properly using this link but It doesn't change anything about connecting.

    Lucky for me, I only needed to connect, activate notifications, and use incoming events using Bluepy (python library), and this worked.

    To install bluepy library, I used theses setps

    I could share my python code if needed.

    Thanks for your help, and have a good day !

    Sincerely

Reply
  • Hi everyone,

    I finally managed to make everything work fine with python (bluepy).

    Unfortunately, the only cmd line working is the scan "sudo hcitool lescan" to get MAC_ADRESS

    I am still unable to connect using "gatttool -I -b MAC_ADRESS" or "sudo hcitool leccMAC_ADRESS". @Bjørn Kvaale, I red you links, I managed to scan properly using this link but It doesn't change anything about connecting.

    Lucky for me, I only needed to connect, activate notifications, and use incoming events using Bluepy (python library), and this worked.

    To install bluepy library, I used theses setps

    I could share my python code if needed.

    Thanks for your help, and have a good day !

    Sincerely

Children
Related