Mbed LoRaWAN Example on Mdot
Home › Forums › Conduit: AEP Model › Mbed LoRaWAN Example on Mdot
Tagged: conduit mdot mbed
- This topic has 7 replies, 2 voices, and was last updated 6 years, 7 months ago by
John Greene.
-
AuthorPosts
-
March 25, 2019 at 6:31 pm #27518
John Greene
ParticipantThere 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/)?
March 25, 2019 at 7:46 pm #27519March 25, 2019 at 7:51 pm #27520Jason Reiss
KeymasterBest 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.
March 29, 2019 at 10:32 am #27563John Greene
ParticipantThanks, 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?
March 29, 2019 at 10:41 am #27564Jason Reiss
KeymasterMarch 29, 2019 at 11:10 am #27565John Greene
ParticipantThanks, Jason. What about the “defaultKey” parameter for the CMAC? Where do we get it?
March 29, 2019 at 12:07 pm #27567Jason Reiss
KeymasterIt 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.3cMarch 29, 2019 at 12:58 pm #27570John Greene
ParticipantI see that now, Jason. Not enough coffee this morning I guess. Thanks for your timely response.
-
AuthorPosts
- You must be logged in to reply to this topic.