Hi all:
Q:When i reboot the board which burn the serial project , how to add the device key to serial board again?
I use PYACI to control the board which burn the serial code
SDK for mesh:v2.0.1
Best regard.
Hi all:
Q:When i reboot the board which burn the serial project , how to add the device key to serial board again?
I use PYACI to control the board which burn the serial code
SDK for mesh:v2.0.1
Best regard.
This is something the mesh team might consider implementing in the future. For now, what you can do is enable PERSISTENT_STORAGE in the mesh serial example. You should be able to follow the whole interactive mesh provisioning example & then power cycle the serial board.
Another application engineer & I tested by following all of the steps, including cc.composition_data_get(). We used the serial example & a light switch server to test. Then, we power cycled the serial board & ran the following commands:
python interactive_pyaci.py -d COM1 --no-logfile db = MeshDB("database/example_database.json") cc = ConfigurationClient(db) device.model_add(cc) cc.publish_set(8, 0) cc.composition_data_get()
where 8 is the devkey handle & 0 is the address handle from when you provisioned the first light client (i.e. p.provision(name="Light bulb")).
You may need to update DSM_DEVICE_MAX & DSM_FLASH_PAGE_COUNT, depending on how many devices you want to test with. I would recommend testing with two devices first, as I mentioned above.
Hi all,
Thanks for your answer.
Now I reboot the serial board, then send PYACI CMD as below:
1.db = MeshDB("database/example_database.json")
2.p=provisioner(d[0],db)
3.device.send(cmd.AddrPublicationAdd(db.nodes[0].unicast_address))
4. d0=SimpleOnOffClient()
5. device.model_add(d0)
6. d0.publish_set(0,0)
7. d0.set(1)
When I send the CMD 1~7 as soon as possible, it can't control the Node's LED On/Off immediately, but over Ten or two seconds, it can control the LED On/Off normal.What cause the delay?From reboot the serial board, how long can i re-control the node?
Regard
Hi
I've done all the PYACI need to do and can send the sc.set() command to control the LED OnOff,after that, I reboot the serial board then the issue coming.
Sorry for the delayed response. Just finished testing: everything works fine if you follow the guide like stated until sc.set(True). I tested with one serial board & one light switch server board. Remember to enable PERSISTENT_STORAGE on both examples. Then, power cycle the serial board & enter the following commands:
python interactive_pyaci.py -d COM1 --no-logfile db = MeshDB("database/example_database.json") cc = ConfigurationClient(db) device.model_add(cc) cc.publish_set(8, 0) cc.composition_data_get() cc.appkey_add(0) cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0, 0x59)) sc = SimpleOnOffClient() device.model_add(sc) sc.publish_set(0, 0) sc.set(True)
Since the provisioning has already been done, you do not need to do this part after you
power cycled the serial board. Everything should work fine then.
thank you for your replied,I've done the step as your suggestion
then I found one new problem is that when I reboot the serial then I reboot the server node ,it can control the server immediately. But if I don't reboot the sever node,it will take a long time to control the server node light On/Off.
Dose someone have meet the same problem before?
thanks !
How long does it take? I guess you have PERSISTENT_STORAGE enabled on the server too, right? You are still only using the serial example & the server example, correct? Could you try with the latest mesh sdk & see if that helps? Not sure it will help, but could be worth a shot.
it will take more than one minute,yes I have PERSISTENT_STORAGE enabled on the server too,and demo as the usage of PYACI guide ,the sdk is nRF5-SDK-for-Mesh 2.1.1.
I will try your suggest latter on,and thanks a lots again for your kindly reply!
Best regard!
it will take more than one minute,yes I have PERSISTENT_STORAGE enabled on the server too,and demo as the usage of PYACI guide ,the sdk is nRF5-SDK-for-Mesh 2.1.1.
I will try your suggest latter on,and thanks a lots again for your kindly reply!
Best regard!