I recently bought a Things Indoor Gateway and successfully registered it and connected it to TTN. Now I’ve built a simple IoT device that consists of an Arduino Pro Mini 3.3 and HopeRF RFM95. I’m running Matthijs Kooijman’s arduino-lmic library and its ttn-oota example program. In TTN my Gateway shows successful Joins and my Application shows successful Activations. However, the Arduino doesn’t seem to hear about these successes and keeps trying to join and activate again. It looks like the problem could be related to the receive timeouts shown below:
12:26:10.165 -> Starting
12:26:10.234 -> RXMODE_RSSI
12:26:10.234 -> 335: engineUpdate, opmode=0x8
12:26:10.268 -> Packet queued
12:26:10.305 -> 426: EV_JOINING
12:26:10.305 -> 1261: engineUpdate, opmode=0xc
12:26:10.339 -> 3737: EV_TXSTART
12:26:10.372 -> 4446: engineUpdate, opmode=0x88c
12:26:10.372 -> 6722: TXMODE, freq=906500000, len=23, SF=10, BW=125, CR=4/5, IH=0
12:26:15.709 -> start single rx: now-rxtime: 10
12:26:15.743 -> 338378: RXMODE_SINGLE, freq=926300000, SF=10, BW=500, CR=4/5, IH=0
12:26:15.811 -> rxtimeout: entry: 338368 rxtime: 338316 entry-rxtime: 52 now-entry: 9 rxtime-txend: 312692
12:26:16.767 -> start single rx: now-rxtime: 10
12:26:16.767 -> 401326: RXMODE_SINGLE, freq=923300000, SF=12, BW=500, CR=4/5, IH=0
12:26:16.868 -> rxtimeout: entry: 401660 rxtime: 401392 entry-rxtime: 268 now-entry: 9 rxtime-txend: 375768
12:26:16.971 -> 407334: engineUpdate, opmode=0xc
12:26:17.585 -> 450916: engineUpdate, opmode=0xc
12:26:17.619 -> 451435: EV_TXSTART
I’ve also verified that there are RxTimeout pulses on the DI1 pin that seem to correspond with the EV_TXSTART events. The device keeps trying to join and showing me EV_TX_START events with the occasional EV_JOIN_FAILED event.
The only thing I’ve changed in the ttn-oota example is the APPEUI, DEVEUI, APPKEY, and pin mapping:
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = LMIC_UNUSED_PIN,
.dio = {4, 5, 6},
};
My theory is that the APPEUI, DEVEUI, APPKEY are correct in my code because the device is successfully joining and activating (from TTN’s perspective). Also that the SPI interface is working correctly or I would not have successful radio transmissions from the device.
I’ve also tried deleting and recreating the Application and Device in TTN, and replacing both the Arduino hardware and the RFM95 hardware.
Can anyone suggest how I can determine what’s going wrong? Is there some kind of accessible logging in the Things Indoor Gateway that could help? Could my receive problem be that I’m listening on the wrong frequency(s)? I’m new to LoRaWAN so I could be missing something obvious.
I’ve included some TTN screenshots below: