SODAQ ExpLoRer Connections + OTAA

In case any of you are struggling with the documentation for connecting the SODAQ ExpLoRer to the Things Connected network and EVRYTHNG I have put together a quick connect guide.

Quick Connect

There is a guide here https://developers.evrythng.com/docs/things-connected-integration but it can be a bit misleading.

Instead go to https://developers.evrythng.com/docs/using-the-dashboard-resource-management and just create a new project and application. Take a note (copy) of the Trusted API key in the application details.

Go to the Things Connected Dashboard , Devices, create new.
Fill in Device nickname and click Next button.
Under 'Where do you want to route device “Device Nickname” to? select EVRYTHNG.
Add a nickname.
Copy the Trusted API Key into the ‘EVRTHNG access token’ Field.
Set ‘EVRYTHNG Env’ to US and click Next button.

Copy the fields for DeviceEUI, Device address, Network session key, Application session key and click Done.

Back at the EVRTHNG Dashboard click on Thngs and then ‘add new+’.
Fill in name.
In Identifiers, name put ‘deviceEUI’. In value put the DeviceEUI that you copied from above.
Click on button ‘Create thng’.

Put the Device address, Network session key, Application session keys into the SODAQ code as in the tutorial 'Setting up a SODAQ ExpLoRer board to send ‘Hello World!’

When the SODAQ runs, if you see packets on the Things Connected Dashboard then the LoRa network connection is good.
Properties should then update on the EVRTHNG Dashboard under the THNG you have created.

Hope this helps people.

OTAA Mode

To set up the connection for OTAA, just select OTAA when creating the device and change the following Arduino code below. Comment out devAddr, nwkSKey, appSKey and add devEUI, appEUI, appKey.

// Set up the device keys. You will need to change thiese for your own values
// Set the Device EUI to your value
const uint8_t devEUI[8] =
{
0xdd,0x4b,0x29,0xe1,0xcf,0xeb,0xe7,0x83
};

// Set the Application EUI to your value
const uint8_t appEUI[8] =
{
0x35,0x0a,0x20,0x31,0xa6,0x51,0xca,0x64
};

//Set the Application key to your value
const uint8_t appKey[16] =
{
0x66,0x64,0x4E,0x8C,0x4C,0xDB,0xE7,0xb9,0x12,0x50,0x07,0x2f,0x16,0x8c,0xbb,0x00
};

//// Set up the device keys. You will need to change thiese for your own values
//// Set the Device Address to your value
//const uint8_t devAddr[4] =
//{
//0x95,0xc3,0xef,0x8a
//};
//
//// Set the Network session key to your value
//const uint8_t nwkSKey[16] =
//{
//0x36,0xca,0x4d,0x78,0x8d,0x3f,0xa7,0xe2,0xb5,0xd5,0xe3,0x42,0x03,0xb8,0xe8,0xcb
//};
//
////Set the Application session key to your value
//const uint8_t appSKey[16] =
//{
//0xcf,0xe4,0xba,0xfc,0xa0,0x5e,0x74,0x1b,0xd2,0x15,0x82,0xde,0x54,0xf2,0xc8,0x13
//};
//

Change the LoRaBee.init line from ABP to OTA.

if (LoRaBee.initOTA(loraSerial, devEUI, appEUI, appKey, false))
//if (LoRaBee.initABP(loraSerial, devAddr, appSKey, nwkSKey, false))

OTAA mode should now work.

Regards,
Steve