RXTXPEND Stuck, Can't transmit

Hi All,

Working with a Sparkfun Pro RF board, running SAMD51. I’m using LMIC 4.1.1 and connecting through a Laird gateway to Chirpstack, 4.5.1. US915_1 frequency band.

Generally I’m getting things working. However, I’ve run into an issue that I’ve not been able to resolve. Essentially, after my OTAA join succeeds, the first time I send a packet, confirmed or not confirmed, it goes through. For the discussion here, it will be a confirmed packet. We receive the packet in Chirpstack, the ACK is received on the sensor board and all is fine. Chirpstack, then sends several, what I believe from other reading, are ADR setup commands which my board responds to. However, once the last one has arrived and been responded to, I’m no longer able to send any subsequent data.

The LMIC.opmode is 0x880 which when I check it before my next setTxData2 command shows the OP_TXRXPEND bit is set. This never seems to unset.

Below is a sequence of print statements trying to debug what is causing this, comments mixed in:
Started
Entered initfunc…
1783: EV_JOINING
1785: EV_TXSTART
UpRepeat=0 UpRepeateCount=0 TxCount=0
7275: EV_JOINED <<<—HERE WE ARE JOINED, ALL GOOD
netid: 0
devaddr: 109D540
AppSKey: 24-2C-B8-BC-B6-B8-CF-CD-D6-02-0F-7D-46-A6-D9-25
NwkSKey: F7-C6-67-C8-71-CE-11-7A-18-9B-BE-F3-E6-40-45-66
47400: tx_func called <<<<----- About 40 seconds later, first call to transmit sensor data
47429: EV_TXSTART
UpRepeat=0 UpRepeateCount=0 TxCount=1
Packet queued, return=0 Length=6
48847: EV_TXCOMPLETE (includes waiting for RX windows)
Received ack <<<<------ In Event TXCOMPLETE, confirmed that we were ACKed
49339: EV_TXSTART <<<—Half second later, TX occurs, and is repeated
UpRepeat=1 UpRepeateCount=0 TxCount=0
50408: EV_TXCOMPLETE (includes waiting for RX windows)
50899: EV_TXSTART
UpRepeat=1 UpRepeateCount=0 TxCount=0
51964: EV_TXCOMPLETE (includes waiting for RX windows)
52455: EV_TXSTART
UpRepeat=1 UpRepeateCount=0 TxCount=0
53519: EV_TXCOMPLETE (includes waiting for RX windows)
54011: EV_TXSTART
UpRepeat=1 UpRepeateCount=0 TxCount=0
55075: EV_TXCOMPLETE (includes waiting for RX windows)
55566: EV_TXSTART
UpRepeat=1 UpRepeateCount=0 TxCount=0
56630: EV_TXCOMPLETE (includes waiting for RX windows)
57121: EV_TXSTART <<<—Finally this TX start is called, but there is no complete for it
UpRepeat=1 UpRepeateCount=0 TxCount=0
97533: tx_func called
OP_TXRXPEND, not sending. opmode=880 <<<—We are stuck forever now because of TXRXPEND
147666: tx_func called
OP_TXRXPEND, not sending. opmode=880
197798: tx_func called
OP_TXRXPEND, not sending. opmode=880

Does anybody have any idea why this might be occurring? I could probably clear the opmode myself with some delay timer, but not sure why we aren’t getting this mode to clear.

Thanks in advance!
Doug

I did go ahead and try clearing the RXTXPEND bit in LMIC.opmode on my TX timeout, about a minute later. Worked fine for a bit, then the OP_TXDATA bit was set as well.

Seems like some kind of reset needs to occur that isn’t…

Thanks all,
Doug

Bottom line after more testing. When EV_TXCOMPLETE doesn’t get called after an EV_TXSTART, then the opmode shows busy. Manually clearing it seems to work…

Is this rate limiting?

Doug