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

Concept of DevKey for BLE MESH

According to SIG's MESH Profile: "There is also a device key (DevKey), which is a special application key that is unique to each node, is known only to the node and a Configuration Client, and is used to secure communications between the node and a Configuration Client".

I also found such description from another question: "My understanding is that the devkey (device key) is simply a special form of appkey (application key) known only between each specific node and the provisioner".

Is that mean the Devkey is the special key only used between Configuration Server(Node) and Configuration Client (provisioner e.g phone) and won't be used between other models(e.g on/off, vendor)?  Is it possibble to communicate with an on/off model if I want to create the json file and import is to mesh app but only has Netkey and Appkey?

  • Hi,

    To communicate with a node on a Bluetooth mesh network, you need two keys:

    • The Network Key; for the general ability to send packets on the network
    • The appropriate Application Key; for messaging to and from a model.

    In addition, you need to configure the models, in each end, so that they subscribe to / publish to addresses in a way that lets them communicate. For example, if you have light bulbs subscribing to a group address (e.g. 0xCAFE), then you can control those lights if you publish generic on/off messages to that address, using the correct Network Key and the correct Application Key for that message.

    In order to configure the lights to subscribe to the group address, you need to use the configuration model on each light for setting up that subscription address. The configuration model of a node uses that node's Device Key in the same way as other models uses an Application Key for the communication. So the Device Key is essentially the same as an Application Key, but the only "application" it is used for is the configuration model of one specific node.

    Regards,
    Terje

  • Hi Terje,

    Thanks for clarify the concept. In my case I'm trying to use another device, say user, imported the Mesh Network json file which contains valid App Key and Net Key to join the mesh network. Is this possible to remove or replace an invalid DevKey if I didn't want the user configure the Nodes.

    Thanks,

  • Hi,

    I don't quite understand what you mean, but if you find anything in the json that you want to remove or replace, you can do so, yes. The json file is a text file, so you should be able to do it manually with a program such as notepad or similar.

    Regards,
    Terje

Related