After running for about an hour using a slight modification of ttn-otaa (just sending unheard join requests, the TTN gateway I’m using is disconnected), my LoRa end node hits:
FAILURE /.../Arduino/libraries/IBM_LMIC_framework/src/lmic/radio.c:429
This corresponds to an early assert in the txfsk()
method. However, this node should be running in Lora mode, not FSK mode.
I assume this means that getSf(LMIC.rps) == FSK
must be true. I’ve set my downlink datarate to SF9, as suggested in the ttn-otaa example, and my uplink datarate to SF10.
Why might my end node be in FSK mode? How do I change this?
Additional Info:
I’m using a Feather 32u4 with Hope RF95 chip.
I’m using the LMIC-Arduino Library here: https://github.com/matthijskooijman/arduino-lmic
I’m using a slightly modified version of the ttn-otaa example. My setup looks like:
// LMIC init
os_init();
// Reset the MAC state. Session and pending data transfers will be discarded.
LMIC_reset();
LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);
#if defined(CFG_us915)
Serial.println(F("US defined"));
// NA-US channels 0-71 are configured automatically
// but only one group of 8 should (a subband) should be active
// TTN recommends the second sub band, 1 in a zero based count.
// https://github.com/TheThingsNetwork/gateway-conf/blob/master/US-global_conf.json
LMIC_selectSubBand(1);
#endif
// Disable link check validation
LMIC_setLinkCheckMode(0);
// TTN uses SF9 for its RX2 window.
LMIC.dn2Dr = DR_SF9;
// Set data rate and transmit power for uplink (note: txpow seems to be ignored by the library)
LMIC_setDrTxpow(DR_SF10,14);
// Start job (sending automatically starts OTAA too)
do_send(&sendjob);