If you get the LMIC_ERROR_TX_NOT_FEASIBLE error when doing TTNMapper or generally using the arduino-lmic library (my version is 3.3.0) then do this patch in src/lmic/lmic.c
. This patch was shown to me by Chris from Accelerando Consulting.
Original code:
u1_t maxFlen = LMICbandplan_maxFrameLen(LMIC.datarate);
if (flen > maxFlen) {
LMICOS_logEventUint32("frame too long for this bandplan", ((u4_t)dlen << 16) | (flen << 8) | maxFlen);
return 0;
}
New code adds a check for maxFlen:
u1_t maxFlen = LMICbandplan_maxFrameLen(LMIC.datarate);
if (maxFlen > 0) {
if (flen > maxFlen) {
LMICOS_logEventUint32("frame too long for this bandplan", ((u4_t)dlen << 16) | (flen << 8) | maxFlen);
return 0;
}
}
There’s something about checking for max frame length that only gets triggered when you’re using the 923Mhz bandplan, and this fixes it. I’m guessing it’s part of the lookup in LMICas923_maxFrameLen
in lmic_as923.c
which return 0
but I haven’t had time to figure out what’s triggering it.