diff --git a/src/mac/LoRaMac.c b/src/mac/LoRaMac.c index 91e303b35..461ca61dd 100644 --- a/src/mac/LoRaMac.c +++ b/src/mac/LoRaMac.c @@ -3331,6 +3331,11 @@ LoRaMacStatus_t SendFrameOnChannel( uint8_t channel ) // Send now Radio.Send( MacCtx.PktBuffer, MacCtx.PktBufferLen ); + if(MacCtx.ChannelsNbTransCounter != 1 && MacCtx.MacPrimitives->MacMcpsRetransmit != NULL) + { + MacCtx.MacPrimitives->MacMcpsRetransmit( ); + } + return LORAMAC_STATUS_OK; } diff --git a/src/mac/LoRaMac.h b/src/mac/LoRaMac.h index ef408ca8e..390c35be9 100644 --- a/src/mac/LoRaMac.h +++ b/src/mac/LoRaMac.h @@ -2476,6 +2476,12 @@ typedef struct sLoRaMacPrimitives * \param [OUT] MCPS-Confirm parameters */ void ( *MacMcpsConfirm )( McpsConfirm_t* McpsConfirm ); + /*! + * \brief MCPS-Retransmit primitive + * + * \param [OUT] MCPS-Retransmit parameters + */ + void ( *MacMcpsRetransmit )( void ); /*! * \brief MCPS-Indication primitive *