Skip to content

Commit b9390d6

Browse files
committed
Added the possibility to Enable/Disable the LoRaWAN certification FPort (224)
1 parent 20d9727 commit b9390d6

File tree

22 files changed

+51
-35
lines changed

22 files changed

+51
-35
lines changed

src/apps/LoRaMac/common/LmHandler/packages/LmhpCompliance.c

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <stdint.h>
2323
#include <stdbool.h>
2424
#include "board.h"
25+
#include "NvmCtxMgmt.h"
2526
#include "LoRaMacTest.h"
2627
#include "LmHandler.h"
2728
#include "LmhpCompliance.h"
@@ -261,6 +262,7 @@ static void LmhpComplianceProcess( void )
261262
if( ComplianceTestState.IsResetCmdPending == true )
262263
{
263264
ComplianceTestState.IsResetCmdPending = false;
265+
264266
// Call platform MCU reset API
265267
BoardResetMcu( );
266268
}
@@ -269,17 +271,13 @@ static void LmhpComplianceProcess( void )
269271
static void LmhpComplianceOnMcpsIndication( McpsIndication_t* mcpsIndication )
270272
{
271273
uint8_t cmdIndex = 0;
274+
MibRequestConfirm_t mibReq;
272275

273276
if( ComplianceTestState.Initialized == false )
274277
{
275278
return;
276279
}
277280

278-
if( ComplianceParams->IsDutFPort224On == false )
279-
{
280-
return;
281-
}
282-
283281
// Increment the compliance certification protocol downlink counter
284282
// Not counting downlinks on FPort 0
285283
if( ( mcpsIndication->Port > 0 ) || ( mcpsIndication->AckReceived == true ) )
@@ -447,8 +445,10 @@ static void LmhpComplianceOnMcpsIndication( McpsIndication_t* mcpsIndication )
447445
}
448446
case COMPLIANCE_DUT_FPORT_224_DISABLE_REQ:
449447
{
450-
// TODO: Handle FPort 224 control NVM update
451-
ComplianceParams->IsDutFPort224On = false;
448+
mibReq.Type = MIB_IS_CERT_FPORT_ON;
449+
mibReq.Param.IsCertPortOn = false;
450+
LoRaMacMibSetRequestConfirm( &mibReq );
451+
452452
ComplianceTestState.IsResetCmdPending = true;
453453
break;
454454
}
@@ -521,11 +521,6 @@ static void LmhpComplianceOnMlmeIndication( MlmeIndication_t* mlmeIndication )
521521
return;
522522
}
523523

524-
if( ComplianceParams->IsDutFPort224On == false )
525-
{
526-
return;
527-
}
528-
529524
switch( mlmeIndication->MlmeIndication )
530525
{
531526
case MLME_BEACON_LOST:

src/apps/LoRaMac/common/LmHandler/packages/LmhpCompliance.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
*/
3838
typedef struct LmhpComplianceParams_s
3939
{
40-
/*!
41-
* Indicates if the DUT FPort 224 is enabled.
42-
*/
43-
bool IsDutFPort224On;
4440
/*!
4541
* Current firmware version
4642
*/

src/apps/LoRaMac/fuota-test-01/B-L072Z-LRWAN1/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ static LmHandlerParams_t LmHandlerParams =
230230

231231
static LmhpComplianceParams_t LmhpComplianceParams =
232232
{
233-
.IsDutFPort224On = true,
234233
.FwVersion.Value = FIRMWARE_VERSION,
235234
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
236235
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/NAMote72/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ static LmHandlerParams_t LmHandlerParams =
223223

224224
static LmhpComplianceParams_t LmhpComplianceParams =
225225
{
226-
.IsDutFPort224On = true,
227226
.FwVersion.Value = FIRMWARE_VERSION,
228227
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
229228
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/NucleoL073/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ static LmHandlerParams_t LmHandlerParams =
220220

221221
static LmhpComplianceParams_t LmhpComplianceParams =
222222
{
223-
.IsDutFPort224On = true,
224223
.FwVersion.Value = FIRMWARE_VERSION,
225224
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
226225
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/NucleoL152/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ static LmHandlerParams_t LmHandlerParams =
220220

221221
static LmhpComplianceParams_t LmhpComplianceParams =
222222
{
223-
.IsDutFPort224On = true,
224223
.FwVersion.Value = FIRMWARE_VERSION,
225224
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
226225
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/NucleoL476/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ static LmHandlerParams_t LmHandlerParams =
220220

221221
static LmhpComplianceParams_t LmhpComplianceParams =
222222
{
223-
.IsDutFPort224On = true,
224223
.FwVersion.Value = FIRMWARE_VERSION,
225224
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
226225
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/SAMR34/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ static LmHandlerParams_t LmHandlerParams =
200200

201201
static LmhpComplianceParams_t LmhpComplianceParams =
202202
{
203-
.IsDutFPort224On = true,
204203
.FwVersion.Value = FIRMWARE_VERSION,
205204
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
206205
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/SKiM880B/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ static LmHandlerParams_t LmHandlerParams =
210210

211211
static LmhpComplianceParams_t LmhpComplianceParams =
212212
{
213-
.IsDutFPort224On = true,
214213
.FwVersion.Value = FIRMWARE_VERSION,
215214
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
216215
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

src/apps/LoRaMac/fuota-test-01/SKiM881AXL/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ static LmHandlerParams_t LmHandlerParams =
210210

211211
static LmhpComplianceParams_t LmhpComplianceParams =
212212
{
213-
.IsDutFPort224On = true,
214213
.FwVersion.Value = FIRMWARE_VERSION,
215214
.OnTxPeriodicityChanged = OnTxPeriodicityChanged,
216215
.OnTxFrameCtrlChanged = OnTxFrameCtrlChanged,

0 commit comments

Comments
 (0)