LoRa newbie - How and where to find EUI parameters

Hi! I’m new with LoRaWAN and need help finding the appEui, devEui and appKey to connect to TTN
with OTAA.
I feel like i’m running in circles, couse I’ve already read ALL the Heltec suport and topics about LoRaWAN configuration parameters and important stuff, but nothing helps me.

I’m using the LoRaWAN example, as seen below, and tried to add an end device with this values but it do not look like its connected at all.

I think its somehow related to the board ChipID that I used on this website.

Wifi LoRa (V3).

What is printed on the serial port?

When I Compile the LoRaWAN example, it shows this on the serial:

And I tried using the EUI vallues shown on the serial monitor but nothing really happens…

Tried again and changed the code to the correct values but still no connection to TTN.

#include “LoRaWan_APP.h”

uint32_t license[4]={0x7ACE8ED4, 0x65C3AA90, 0xAE5D584D, 0xCB77EC13};

/* OTAA para*/

uint8_t devEui[] = { 0x67, 0xFA, 0x12, 0xF4, 0x00, 0x00, 0x88, 0x1B };

uint8_t appEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

uint8_t appKey[] = { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 };

/* ABP para*/

uint8_t nwkSKey[] = { 0x15, 0xb1, 0xd0, 0xef, 0xa4, 0x63, 0xdf, 0xbe, 0x3d, 0x11, 0x18, 0x1e, 0x1e, 0xc7, 0xda,0x85 };

uint8_t appSKey[] = { 0xd7, 0x2c, 0x78, 0x75, 0x8c, 0xdc, 0xca, 0xbf, 0x55, 0xee, 0x4a, 0x77, 0x8d, 0x16, 0xef,0x67 };

uint32_t devAddr = ( uint32_t )0x007e6ae1;

/LoraWan channelsmask, default channels 0-7/

uint16_t userChannelsMask[6]={ 0x00FF,0x0000,0x0000,0x0000,0x0000,0x0000 };

/LoraWan region, select in arduino IDE tools/

LoRaMacRegion_t loraWanRegion = ACTIVE_REGION;

/LoraWan Class, Class A and Class C are supported/

DeviceClass_t loraWanClass = CLASS_A;

/the application data transmission duty cycle. value in [ms]./

uint32_t appTxDutyCycle = 15000;

/OTAA or ABP/

bool overTheAirActivation = true;

/ADR enable/

bool loraWanAdr = true;

/* Indicates if the node is sending confirmed or unconfirmed messages */

bool isTxConfirmed = true;

/* Application port */

uint8_t appPort = 2;

/*!

  • Number of trials to transmit the frame, if the LoRaMAC layer did not

  • receive an acknowledgment. The MAC performs a datarate adaptation,

  • according to the LoRaWAN Specification V1.0.2, chapter 18.4, according

  • to the following table:

  • Transmission nb | Data Rate

  • ----------------|-----------

  • 1 (first) | DR

  • 2 | DR

  • 3 | max(DR-1,0)

  • 4 | max(DR-1,0)

  • 5 | max(DR-2,0)

  • 6 | max(DR-2,0)

  • 7 | max(DR-3,0)

  • 8 | max(DR-3,0)

  • Note, that if NbTrials is set to 1 or 2, the MAC will not decrease

  • the datarate, in case the LoRaMAC layer did not receive an acknowledgment

*/

uint8_t confirmedNbTrials = 4;

/* Prepares the payload of the frame */

static void prepareTxFrame( uint8_t port )

{

/*appData size is LORAWAN_APP_DATA_MAX_SIZE which is defined in “commissioning.h”.

*appDataSize max value is LORAWAN_APP_DATA_MAX_SIZE.

*if enabled AT, don’t modify LORAWAN_APP_DATA_MAX_SIZE, it may cause system hanging or failure.

*if disabled AT, LORAWAN_APP_DATA_MAX_SIZE can be modified, the max value is reference to lorawan region and SF.

*for example, if use REGION_CN470,

*the max value for different DR can be found in MaxPayloadOfDatarateCN470 refer to DataratesCN470 and BandwidthsCN470 in “RegionCN470.h”.

*/

appDataSize = 4;

appData[0] = 0x00;

appData[1] = 0x01;

appData[2] = 0x02;

appData[3] = 0x03;

}

//if true, next uplink will add MOTE_MAC_DEVICE_TIME_REQ

void setup() {

Serial.begin(115200);

Mcu.setlicense(license);

Mcu.begin();

deviceState = DEVICE_STATE_INIT;

}

void loop()

{

switch( deviceState )

{

case DEVICE_STATE_INIT:

{

#if(LORAWAN_DEVEUI_AUTO)

  LoRaWAN.generateDeveuiByChipID();

#endif

  LoRaWAN.init(loraWanClass,loraWanRegion);

  break;

}

case DEVICE_STATE_JOIN:

{

  LoRaWAN.join();

  break;

}

case DEVICE_STATE_SEND:

{

  prepareTxFrame( appPort );

  LoRaWAN.send();

  deviceState = DEVICE_STATE_CYCLE;

  break;

}

case DEVICE_STATE_CYCLE:

{

  // Schedule next packet transmission

  txDutyCycleTime = appTxDutyCycle + randr( -APP_TX_DUTYCYCLE_RND, APP_TX_DUTYCYCLE_RND );

  LoRaWAN.cycle(txDutyCycleTime);

  deviceState = DEVICE_STATE_SLEEP;

  break;

}

case DEVICE_STATE_SLEEP:

{

  LoRaWAN.sleep(loraWanClass);

  break;

}

default:

{

  deviceState = DEVICE_STATE_INIT;

  break;

}

}

}

image

I haven’t looked at your details yet, but are you confident that your end device is within range of a gateway? You could loose yourself in details - and may be doing it correctly all along. Check the ttnmapper.org website to see if there’s a gateway nearby, and then drive to within 100 meters to make sure it’ll hear your device.

There is no close gateway, but I bought 2 Esp LoRa just in case!!!
Thank you for the response, now I only need to understand where to find the “Gateway EUI” to register my gateway and use it to communicate with the end device I just registered.image

@puchalski I think you’re not familiar with LoRaWAN. You cannot simply add a LoRa enabled microcontroller as a gateway - a gateway is MUCH more than that. They are dedicated devices - costing around $100 and upwards. If there’s no gateway nearby, you’ll need to buy one yourself or you’ll have to revert to another technology than LoRaWAN (plain LoRa?). I suggest you look at the Learn section on The Things Network to learn the fundamentals and perhapss look through some recent TTN forum topics on how you might obtain some ‘lowcost’ gateway hardware.

On the TTN you must use an 8 channel gateway not a simple single port cheapie. Think you need to do some more reading.