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

How RPi3 could decrypt Mesh packets

I managed to sniff Nordic mesh sdk 0.9.2 packets on raspberry pi 3 using "hcidump --raw", and I can read the raw hex data of mesh packets of light control demo, but since these packets are encrypted I can't understand or get use of this data, as I'm building my own custom application sending my own data, I think to get use of these data on RPi ,

  • I should find a way to decrypt these packets on RPi, how?
  • I don't need this encryption, and how can I disable this encryption? these would be the easiest way.

Any suggestions.

Thanks

  • Hi,

    To sniff packets using the PyACI-interface you need to add relevant cryptographic keys and addresses. In the light control example you will find these in the folder "examples/light_control/client/include/provisioner.h":

    #define APPKEY {0x5f, 0x11, 0x6e, 0x6f, 0x72, 0x64, 0x69, 0x63, 0x5f, 0x5f, 0x73, 0x65, 0x6d, 0x69, 0x5f, 0x5f}
    #define NETKEY {0x5f, 0x5f, 0x6e, 0x6f, 0x72, 0x64, 0x69, 0x63, 0x5f, 0x5f, 0x73, 0x65, 0x6d, 0x69, 0x5f, 0x5f}
    #define APPKEY_INDEX (0)
    #define NETKEY_INDEX (0)
    
    #define GROUP_ADDRESS (0xCAFE)
    #define PROVISIONER_ADDRESS  (0x0001)
    #define UNPROV_START_ADDRESS (0x0010)
    

    To use the build in BLE chip to sniff mesh activity you will have to implement the decryption yourself. It is unfortunately not possible to use mesh without encryption.

Related