Mbed LoRaWAN Example on Mdot

Home Forums Conduit: AEP Model Mbed LoRaWAN Example on Mdot

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #27518
    John Greene
    Participant

    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/)?

    #27519
    Jason Reiss
    Keymaster
    #27520
    Jason Reiss
    Keymaster

    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.

    #27563
    John Greene
    Participant

    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?

    #27564
    Jason Reiss
    Keymaster
    #27565
    John Greene
    Participant

    Thanks, Jason. What about the “defaultKey” parameter for the CMAC? Where do we get it?

    #27567
    Jason Reiss
    Keymaster

    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

    #27570
    John Greene
    Participant

    I see that now, Jason. Not enough coffee this morning I guess. Thanks for your timely response.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.