End Node uses FSK mode instead of LoRa mode

(Uss1994) #1

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
// Reset the MAC state. Session and pending data transfers will be discarded.
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

// Disable link check validation

// 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)

// Start job (sending automatically starts OTAA too)

(Arjan) #2

How come that reports IBM_LMIC_framework? Since december 2017 I’d expect LMIC-Arduino instead. I’m not an Arduino expert, but are you sure you installed the correct library in your Arduino IDE, and the latest version?

That said, I guess you’re just hitting some mechanism that makes LMiC try to find correct settings while all joins using LoRa are failing, as you wrote:

(Of course, the code hitting an assert then is not nice.)

(Uss1994) #3

@arjanvanb Thanks!

I installed the 1.5.0+arduino-2 release, which is before the name change. There aren’t any significant changes between the two though.

Yeah, definitely not great that it fails - this stops the execution of other actions that the device does as well.
Do you know how I can avoid this mechanism, or somehow handle this error nicely?

(Uss1994) #4

To follow up here, I discovered the problem and issued a PR to the lmic-arduino library to fix it.

Documented here: https://github.com/matthijskooijman/arduino-lmic/issues/193