I've been debugging this issue for 2 weeks without a solution. I belive there must be a problem with basic station. The problem occurs when sending confirmed downlinks.
I send a confirmed downlink with random data and port.
It gets queued.
On the first uplink, the downlink is sent as expected.
On the next uplink, the LNS fails the confirmed downlink with the error: "Downlink was not acknowledged on the next uplink". IF the downlink was confirmed correctly it would not send this error.
Initially, I thought the end device was not confirming the downlink. I tested another end device that I know confirms downlinks, but the problem persisted. Tested with a Legacy Packet Forwarder and confirmed that the confirmed downlinks works without issues. Thus, the problem appears to be with the Basic Station setup.
The end device can join normally without failure so downlinks must work in some way.
Hardware setup
Concentrator: SX1302 by Waveshare also tested with LR1302 both EU868MHz
Controller: Raspberry Pi Zero
End Device: Class A, sending data every 30 seconds
The problem
I've been debugging this issue for 2 weeks without a solution. I belive there must be a problem with basic station. The problem occurs when sending confirmed downlinks.
Initially, I thought the end device was not confirming the downlink. I tested another end device that I know confirms downlinks, but the problem persisted. Tested with a Legacy Packet Forwarder and confirmed that the confirmed downlinks works without issues. Thus, the problem appears to be with the Basic Station setup.
The end device can join normally without failure so downlinks must work in some way.
Hardware setup
Basic Station setup
Using the corecell example station.conf for basic station configuration:
Log file
Logfile with full XDEBUG log info: station.log
Example of the error
Here’s an example from the LNS log:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
Time | Gateway Time | Gateway | Origin | Type | Join Id | Seq No | RSSI | SNR | Data Rate | Frequency | Channel | Port | Bytes (PHY/APP) | App Payload | MIC | Too Late | Details -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 05/22/2024 11:50:54.492 AM | N/A | | | Downlink Failed | | | | | | -1 | | | | | | | DnMsgID=138984032, FailureReason=Downlink was not acknowledged on the next uplink, DnMsgID=138984032, DnSeqNo=1, UpSeqNo=7 05/22/2024 11:50:54.491 AM | 05/22/24 11:43:08.644.1841 AM | B827EBFFFE6835B7 | | Uplink | 95 | 7 | -36 | 12 | 5 | 868,3 | 1 | 1 | 26 (13) | 48656C6C6F2C20776F726C6421 | A3549279 | false | FCtrl [ADR=True ADRAckReq=False ACK=False] 05/22/2024 11:50:22.297 AM | 05/22/24 11:42:36.266.7898 AM | B827EBFFFE6835B7 | | Downlink Tx | 95 | 1 | | | 5 | 868,1 | 0 | 12 | | | | | DnMsgID=138984032, Status=Successful 05/22/2024 11:50:21.303 AM | 05/22/24 11:42:36.266.7898 AM | B827EBFFFE6835B7 | | Conf Downlink | 95 | 1 | | | 5 | 868,1 | 0 | 12 | 14 (1) | 32 | ECE485B9 | | [UpSeqNo=5], DnMsgID=138984032, Confirmed=True, AppPldLen=1 05/22/2024 11:50:21.048 AM | 05/22/24 11:42:35.266.7898 AM | B827EBFFFE6835B7 | | Uplink | 95 | 5 | -37 | 13 | 5 | 868,1 | 0 | 1 | 26 (13) | 48656C6C6F2C20776F726C6421 | 73BDA67F | false | FCtrl [ADR=True ADRAckReq=False ACK=False] 05/22/2024 11:48:09.869 AM | N/A | | | Downlink Queued | | | | | | -1 | | | 1 (0) | 32 | | | Timeout=5 Min DnMsgID=138984032, FPort=12, Confirmed=True, AppPldLen=1