Sample Arduino LMIC Code

Hi Folks,

I’ve got Loraserver up and running with minimal difficulty (including linking my laird gateway into the platform), and it looks amazing.

I’m moving a project over from TheThingsNetwork for various reasons, and a significant number of the devices run the Arduino LMIC software stack with RFM95W chips.

The biggest issue I’m having is working out how to generate the three bits of information I need at the top of my Arduino code:

static const u1_t PROGMEM APPEUI[8]={ 0xHEX };
static const u1_t PROGMEM DEVEUI[8]={ 0xHEX };
static const u1_t PROGMEM APPKEY[16] = { 0xHEX };

I’d ideally like to connect using OTAA, however I’m struggling to work out the values from the device details section of the portal that I need to use, as I don’t appear to have an Application key, or an App EUI.

If someone can help me untangle this, I’d be happy to provide a sample application that can be downloaded and used under the MIT license.

Thanks in advance :slight_smile:

In the web app if you copy over the DevEUI from TTN it should accept it and I assume but at the moment I don’t remember 100% if the other two can also just be copied over as well. Though I would try to just copy and paste with a test node for all three pieces of information. As long as the information is being pushed to your LoRaServer it’s not like it’s going to randomly end up in TTN unless you still have the devices active there and are within range of another gateway that could possibly pick up the data packet and forward it there.


I’ll give this a shot, unfortunately I’m running a TTN network as well as the LoraServer one, and the gateways are in very close proximity, so knowing which values map from the LoraServer to the values required in the code is pretty important here so I can migrate the devices one by one from the old to the new.