File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ var handleDownlinkTXAckTasks = []func(*ackContext) error{
3737 forApplicationPayload (
3838 sendErrorToApplicationServerOnLastFrame ,
3939 ),
40+ forMACOnlyPayload (
41+ sendErrorToApplicationServerOnLastFrame ,
42+ ),
4043 forMulticastPayload (
4144 // TODO: For now we delete the multicast queue-item. What would be the best
4245 // way to retry? Multicast is a bit more complicated as the downlinks are
@@ -498,8 +501,7 @@ func sendTxAckToApplicationServer(ctx *ackContext) error {
498501
499502func sendErrorToApplicationServerOnLastFrame (ctx * ackContext ) error {
500503 // Only send an error to the AS on the last possible attempt.
501- // We only want to send error for application payloads.
502- if (len (ctx .DownlinkTXAck .Items ) == 0 && len (ctx .DownlinkFrame .DownlinkFrame .Items ) >= 2 ) || ctx .MACPayload == nil || ctx .MACPayload .FPort == nil || * ctx .MACPayload .FPort == 0 {
504+ if (len (ctx .DownlinkTXAck .Items ) == 0 && len (ctx .DownlinkFrame .DownlinkFrame .Items ) >= 2 ) || ctx .MACPayload == nil {
503505 return nil
504506 }
505507
Original file line number Diff line number Diff line change @@ -371,7 +371,11 @@ func (ts *DownlinkTXAckTestSuite) TestDownlinkTXAck() {
371371 },
372372 Assert : []Assertion {
373373 AssertNFCntDown (10 ),
374- AssertASNoHandleErrorRequest (), // no error as this is mac-layer only
374+ AssertASHandleErrorRequest (as.HandleErrorRequest {
375+ DevEui : ts .Device .DevEUI [:],
376+ Type : as .ErrorType_DATA_DOWN_GATEWAY ,
377+ Error : "TX_FREQ" ,
378+ }),
375379 AssertASNoHandleTxAckRequest (),
376380 AssertNCNoHandleDownlinkMetaDataRequest (),
377381 },
You can’t perform that action at this time.
0 commit comments