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

Bluetooth Long Range and encryption

I am using NRF Connect SDK on NRF52840 Dongle and I have written two programs. First acts as bluetooth peripherial device, second acts as bluetooth centeral devices. I have implemented my own service and characteristics. For that characteristics I set permission bit = BT_GATT_PERM_READ_ENCRYPT or BT_GATT_PERM_WRITE_ENCRYPT, it works fine.

Recently I tried to upgrade my programs to support Bluetooth Long Range based on following examples:

https://github.com/nrfconnect/sdk-nrf/tree/master/samples/bluetooth/peripheral_hr_coded

https://github.com/nrfconnect/sdk-nrf/tree/master/samples/bluetooth/central_hr_coded

It works only when permission bit is set to BT_GATT_PERM_READ or BT_GATT_PERM_WRITE, but when I set BT_GATT_PERM_READ_ENCRYPT or BT_GATT_PERM_WRITE_ENCRYPT flag it hands on characteristic read/write.

So, is it possible to use encryption in Long Range mode?

If yes, could you provide any working example?

Related