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
  • I think I found a way to provision the device key via the UART of the node being configured

    1) The host sets the netkey of the node with "Bluetooth Mesh Subnet Add Opcode: 0x92"

    2) The host then sets the unicast address of the node with "Bluetooth Mesh Addr Local Unicast Set Opcode: 0x9f"

    3) The host then sets an "Bluetooth Mesh Devkey Add Opcode: 0x9c" with the unicast address set in setp 2, the subnet handle from step 1 and a RNG generated devkey.

    4) Finally the host would issue "Bluetooth Mesh Config Server Bind Opcode: 0xad" to bind the node's configuration server to the device key handle returned in step 3.

Children
No Data
Related