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

BLE Mesh serial - cannot set the device key via UART

It is possible to provision the NetKey, AppKey and unicast address of a node using the serial protocol, using the following messages:

Mesh Subnet Add, Opcode: 0x92 - NetKey

Mesh Appkey Add, Opcode: 0x97 - I assume this sets the appkey that is used to encrypt data submitted with Bluetooth Mesh Packet Send, Opcode: 0xab

Mesh Addr Local Unicast Set Opcode: 0x9f

However I cannot find any way to provision a device key in a node via the serial protocol (we would like this option, in addition to the option to provision OTA).

If no device key is set in a node does this then mean that the node cannot be configured to publish a periodic heartbeat ?   (And another node could not subscribe to that heartbeat).

Without a device key set it seems that the whole configuration model would not be usable.  This may not be a problem in our application - I just need to understand it.  Thanks!

Parents Reply
  • A comment from our Mesh team regarding the device key:

    This is not provided for a reason. The device key is the most important part which secures the device settings. Therefore it is never exchanged over the air or via any interface. The device key gets generated independently at both ends during the provisioning process. Because of this, we did not think there is a need to set the device key over a serial interface. 

    For your purpose, you can, of course, use already available DSM APIs and add such custom serial command.

Children
Related