Closed jjduhamel closed 3 years ago
Hi,
the correct procedure if you have a lot of nodes that go into production is to write the necessary data in the UICR, see here: https://www.bluerange.io/docs/fruitymesh/Specification.html#UICR
The idea in general is to have a unique (randomly generated) node key (aka. device key). Then the user will use an enrollment application or gateway to enroll all nodes into one network (See Enrollment Module documentation).
If you just want to flash some nodes and have them in the same network, you can also write a networkId > 1 in the UICR and a network key. Then all these nodes wil automatically be in the same network after flashing.
Marius
Ok I see. It would be helpful if you provided an example of using srec_cat
to write the nodeKey, networkKey, etc. Is it safe to assume that all my devices are currently programmed with the aforementioned network key (0xef...ef)?
Also, what's the purpose of the following line?
CheckedMemset(c->networkKey, 0x00, 16);
Hello,
that is a good idea. I will try to get an example together and write it here. The CheckedMemset is currently setting the networkkey to 000000...000000. I will try to set this straight and document it a bit better. I'll respond again once I have that.
Marius
Thanks. Look forward to your response.
Hi, I have updated our documentation with a lot more clarification and an example on how to use srec_cat to create the UICR. I have attached this information to the ticket and it will be available officialy soon after we release again.
Quick Start.pdf Specification.pdf Developers.pdf
Marius
Hi, I will close this as it was inactive for a while.
Hi, I now have encryption working. The final step I'm trying to figure out is how to set the network key. I made the following change to the code; however, I added some logging to the firmware and it seems to be using 0xefef...efef. What's the correct procedure to program a device with a randomly generated network key?