Mbed LoRaWAN Example on Mdot
- This topic has 7 replies, 2 voices, and was last updated 6 years ago by .
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.
Home › Forums › Conduit: AEP Model › Mbed LoRaWAN Example on Mdot
Tagged: conduit mdot mbed
There is a lot of great code and examples for programming MT dots in addition to those offered from Multitech on Mbed. It is not readily apparent, though, as to how to get that code (ie, non Multitech code) to work on an AEP Conduit. A great example of this is the configuration necessary to connect using Mbed’s LoRaWAN example: https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/ In particular, I am not clear on how to determine the correct AppEUI and AppKEY (note that we use network “Name” and “Passphrase” in text as opposed to the hex versions called for in the Mbed example calls). While I understand and appreciate that MT has custom libraries to handle this stuff, it is somewhat limiting to not be able to easily use the other open source code available on Mbed.
How do we derive or otherwise determine both the correct AppEUI and AppKEY in hex for both the Conduit (as required on the Conduit “LORAWAN – Key Management” setup tab) and the Mdot (see lines 37 & 38 in https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/file/5293a23c7ba9/mbed_app.json/)?
Best practice is to use unique keys per device on Key Management page of Conduit.
Sharing the appkey can lead to false joins if two device send requests at the same time on same channel. They will both receive a join accept with a valid MIC. Only one will have valid sessions keys unless both chose same DevNonce. If same devnonce they both have the same session keys.
Thanks, Jason. In the post you linked to showing the calculations, I am not aware of how to do the CMAC. I have looked around but unfortunately my cryptography skills are quite lacking. Do you know of a good resource for me to use to calculate it?
Thanks, Jason. What about the “defaultKey” parameter for the CMAC? Where do we get it?
It is listed at the bottom of the post.
Default Key: 2b.7e.15.16.28.ae.d2.a6.ab.f7.15.88.09.cf.4f.3c
I see that now, Jason. Not enough coffee this morning I guess. Thanks for your timely response.