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

How disable packet encryption in nrf51822

Hi to all,

i have an example that it implemented a device with some charactristics, when i use sniffer to sniff these packets i can not see the packets data because the encryption enabled, now i want know that how can  disable packet encryption in this example, i am new in ble and i want learn about ble.

thanks.

Parents
  • Hello,

    What sniffer are you using? Most sniffers have no problem following basic SMP. But some simpler models, like our own https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer has trouble with advanced LESC.

    What SDK are you using? 12.3?

    What example in the SDK are you using as your starting point?

     

    I don't think you should try to remove the encryption. If you are a beginner you may be making things harder instead of simpler.

    But here are some ideas anyway:

    If your device is a central, you can try to avoid calling pm_conn_secure(), however, many characteristics that you interact with have security requirements. Notice that many examples use these macros BLE_GAP_CONN_SEC_MODE_SET_OPEN, BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM etc in the main.c files

    So on your periheral side, you would have to disable security (set to open) on all characteristics.

  • i am using CC2540 sniffer and version of my softdevice is 13, when i use sniffer to sniff the ble packets, it show something like this:

    as you can see i entered the pass key and also sniffer detected the LTK, but still do not encrypt packets and i  could not see the packets raw data.

    thanks for your response

  • I see that you have entered an LTK, but still, the LTK is the prime suspect for faulty decryption.

    Try deleting the bond on both sides, then connect and bond. And let me see the key exchange that happens.

    (erasing the entire chip will do the trick to delete bonds, but for most of our BLE examples, you can simply hold button 2 while doing a power cycle).

    What example in the SDK are you using as your starting point?

Reply
  • I see that you have entered an LTK, but still, the LTK is the prime suspect for faulty decryption.

    Try deleting the bond on both sides, then connect and bond. And let me see the key exchange that happens.

    (erasing the entire chip will do the trick to delete bonds, but for most of our BLE examples, you can simply hold button 2 while doing a power cycle).

    What example in the SDK are you using as your starting point?

Children
No Data
Related