Skip to content

Commit 30fc173

Browse files
Daniel Jaecklemluis1
authored andcommitted
Added a notification to send an uplink as soon as possible for RxParamSetupAns/PingSlotChannelAns answers
Changed MOTE_MAC_PING_SLOT_CHANNEL_ANS to be sticky
1 parent f9084ab commit 30fc173

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/mac/LoRaMac.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,9 @@ static void ProcessMacCommands( uint8_t *payload, uint8_t macIndex, uint8_t comm
22972297

22982298
status = LoRaMacClassBPingSlotChannelReq( datarate, frequency );
22992299
macCmdPayload[0] = status;
2300-
LoRaMacCommandsAddCmd( MOTE_MAC_PING_SLOT_FREQ_ANS, macCmdPayload, 1 );
2300+
LoRaMacCommandsAddCmd( MOTE_MAC_PING_SLOT_CHANNEL_ANS, macCmdPayload, 1 );
2301+
// Setup indication to inform the application
2302+
SetMlmeScheduleUplinkIndication( );
23012303
break;
23022304
}
23032305
case SRV_MAC_BEACON_TIMING_ANS:

src/mac/LoRaMacCommands.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ static bool IsSticky( uint8_t cid )
284284
case MOTE_MAC_RX_PARAM_SETUP_ANS:
285285
case MOTE_MAC_RX_TIMING_SETUP_ANS:
286286
case MOTE_MAC_TX_PARAM_SETUP_ANS:
287+
case MOTE_MAC_PING_SLOT_CHANNEL_ANS:
287288
return true;
288289
default:
289290
return false;

src/mac/LoRaMacTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ typedef enum eLoRaMacMoteCmd
508508
/*!
509509
* PingSlotFreqAns
510510
*/
511-
MOTE_MAC_PING_SLOT_FREQ_ANS = 0x11,
511+
MOTE_MAC_PING_SLOT_CHANNEL_ANS = 0x11,
512512
/*!
513513
* BeaconTimingReq
514514
*/

0 commit comments

Comments
 (0)