In the light switch example, I try to change the network-key and then get some new unprovisioned servers provisioned.
The servers seem to get provisioned, but the client logs "Configuration of device 1 failed" and there is no communication.
I use the following code, to change the network-key on the client:
ERROR_CHECK(dsm_subnet_update(m_netkey_handle,m_netkey));
ERROR_CHECK(dsm_subnet_update_swap_keys(m_netkey_handle));
ERROR_CHECK(dsm_subnet_update_commit(m_netkey_handle));
Client messages while provisioning:
0> <t: 3321384>, provisioner.c, 278, Local provisioning link established
0> <t: 3323420>, provisioner.c, 264, Using static authentication
0> <t: 3333395>, provisioner.c, 273, Static authentication data provided
0> <t: 3344788>, main.c, 363, Provisioning complete. Adding address 0x0101.
0> <t: 3344796>, provisioner.c, 111, Getting composition data
0> <t: 3348461>, provisioner.c, 234, Local provisioning link closed
0> <t: 4327847>, main.c, 349, Configuration of device 1 failed
Server messages:
0> <t: 1138783>, main.c, 117, Successfully provisioned
Is this the correct way to change the network-key? Would a key-refresh also be possible, if the servers
are already porvisioned? I read here, that this was not implemented in the SDK a few month ago.