Note: I got LMIC working with Moteino Mega..
0. solder bridges for DIO1, DIO2, and RST
1. use LMIC library from here
https://github.com/matthijskooijman/arduino-lmic2. open src/lmic/config.h and set correct configuration (US915 for me).. i also set
3. for ABP example set your keys.. use this pinmap
const lmic_pinmap lmic_pins = {
.nss = 4,
.rxtx = LMIC_UNUSED_PIN,
.rst = 3,
.dio = {2, 22, 21},
};
4. for OTAA example set your keys (make sure to REVERSE order for APPEUI and DEVEUI)
5. for OTAA also after the LMIC_reset(); add these lines
LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);
LMIC_selectSubBand(1);
LMIC.dn2Dr = DR_SF9;
LMIC_setLinkCheckMode(0);
LMIC_setDrTxpow(DR_SF7,14);