Skip to content

Commit fa23483

Browse files
author
Daniel Jäckle
committed
Apply certification protocol changes for LoRaWAN 1.0.1 compliance tests.
1 parent 2f37b8d commit fa23483

File tree

18 files changed

+138
-81
lines changed

18 files changed

+138
-81
lines changed

src/apps/LoRaMac/classA/LoRaMote/Comissioning.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Maintainer: Miguel Luis and Gregory Cristian
2626
*/
2727
#define LORAWAN_PUBLIC_NETWORK true
2828

29-
#if( OVER_THE_AIR_ACTIVATION != 0 )
30-
3129
/*!
3230
* IEEE Organizationally Unique Identifier ( OUI ) (big endian)
3331
*/
@@ -51,8 +49,6 @@ Maintainer: Miguel Luis and Gregory Cristian
5149
*/
5250
#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
5351

54-
#else
55-
5652
/*!
5753
* Current network ID
5854
*/
@@ -77,6 +73,4 @@ Maintainer: Miguel Luis and Gregory Cristian
7773
*/
7874
#define LORAWAN_APPSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
7975

80-
#endif
81-
8276
#endif // __LORA_COMMISSIONING_H__

src/apps/LoRaMac/classA/LoRaMote/main.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,11 @@ Maintainer: Miguel Luis and Gregory Cristian
9595

9696
#endif
9797

98-
#if( OVER_THE_AIR_ACTIVATION != 0 )
99-
10098
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
10199
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
102100
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
103101

104-
#else
102+
#if( OVER_THE_AIR_ACTIVATION == 0 )
105103

106104
static uint8_t NwkSKey[] = LORAWAN_NWKSKEY;
107105
static uint8_t AppSKey[] = LORAWAN_APPSKEY;
@@ -568,6 +566,20 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
568566
LoRaMacMlmeRequest( &mlmeReq );
569567
}
570568
break;
569+
case 6: // (ix)
570+
{
571+
MlmeReq_t mlmeReq;
572+
573+
mlmeReq.Type = MLME_JOIN;
574+
575+
mlmeReq.Req.Join.DevEui = DevEui;
576+
mlmeReq.Req.Join.AppEui = AppEui;
577+
mlmeReq.Req.Join.AppKey = AppKey;
578+
579+
LoRaMacMlmeRequest( &mlmeReq );
580+
DeviceState = DEVICE_STATE_SLEEP;
581+
}
582+
break;
571583
default:
572584
break;
573585
}

src/apps/LoRaMac/classA/SK-iM880A/Comissioning.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Maintainer: Miguel Luis and Gregory Cristian
2626
*/
2727
#define LORAWAN_PUBLIC_NETWORK true
2828

29-
#if( OVER_THE_AIR_ACTIVATION != 0 )
30-
3129
/*!
3230
* IEEE Organizationally Unique Identifier ( OUI ) (big endian)
3331
*/
@@ -51,8 +49,6 @@ Maintainer: Miguel Luis and Gregory Cristian
5149
*/
5250
#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
5351

54-
#else
55-
5652
/*!
5753
* Current network ID
5854
*/
@@ -77,6 +73,4 @@ Maintainer: Miguel Luis and Gregory Cristian
7773
*/
7874
#define LORAWAN_APPSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
7975

80-
#endif
81-
8276
#endif // __LORA_COMMISSIONING_H__

src/apps/LoRaMac/classA/SK-iM880A/main.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,11 @@ Maintainer: Andreas Pella (IMST GmbH), Miguel Luis and Gregory Cristian
8484
*/
8585
#define LORAWAN_APP_DATA_SIZE 4
8686

87-
#if( OVER_THE_AIR_ACTIVATION != 0 )
88-
8987
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
9088
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
9189
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
9290

93-
#else
91+
#if( OVER_THE_AIR_ACTIVATION == 0 )
9492

9593
static uint8_t NwkSKey[] = LORAWAN_NWKSKEY;
9694
static uint8_t AppSKey[] = LORAWAN_APPSKEY;
@@ -513,6 +511,20 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
513511
LoRaMacMlmeRequest( &mlmeReq );
514512
}
515513
break;
514+
case 6: // (ix)
515+
{
516+
MlmeReq_t mlmeReq;
517+
518+
mlmeReq.Type = MLME_JOIN;
519+
520+
mlmeReq.Req.Join.DevEui = DevEui;
521+
mlmeReq.Req.Join.AppEui = AppEui;
522+
mlmeReq.Req.Join.AppKey = AppKey;
523+
524+
LoRaMacMlmeRequest( &mlmeReq );
525+
DeviceState = DEVICE_STATE_SLEEP;
526+
}
527+
break;
516528
default:
517529
break;
518530
}

src/apps/LoRaMac/classA/SensorNode/Comissioning.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Maintainer: Miguel Luis and Gregory Cristian
2626
*/
2727
#define LORAWAN_PUBLIC_NETWORK true
2828

29-
#if( OVER_THE_AIR_ACTIVATION != 0 )
30-
3129
/*!
3230
* IEEE Organizationally Unique Identifier ( OUI ) (big endian)
3331
*/
@@ -51,8 +49,6 @@ Maintainer: Miguel Luis and Gregory Cristian
5149
*/
5250
#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
5351

54-
#else
55-
5652
/*!
5753
* Current network ID
5854
*/
@@ -77,6 +73,4 @@ Maintainer: Miguel Luis and Gregory Cristian
7773
*/
7874
#define LORAWAN_APPSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
7975

80-
#endif
81-
8276
#endif // __LORA_COMMISSIONING_H__

src/apps/LoRaMac/classA/SensorNode/main.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ Maintainer: Miguel Luis and Gregory Cristian
9292

9393
#endif
9494

95-
#if( OVER_THE_AIR_ACTIVATION != 0 )
96-
9795
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
9896
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
9997
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
10098

101-
#else
99+
#if( OVER_THE_AIR_ACTIVATION == 0 )
102100

103101
static uint8_t NwkSKey[] = LORAWAN_NWKSKEY;
104102
static uint8_t AppSKey[] = LORAWAN_APPSKEY;
@@ -397,6 +395,7 @@ static void OnLed4TimerEvent( void )
397395
// Switch LED 4 OFF
398396
GpioWrite( &Led4, 1 );
399397
}
398+
400399
/*!
401400
* \brief MCPS-Confirm event function
402401
*
@@ -579,6 +578,20 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
579578
LoRaMacMlmeRequest( &mlmeReq );
580579
}
581580
break;
581+
case 6: // (ix)
582+
{
583+
MlmeReq_t mlmeReq;
584+
585+
mlmeReq.Type = MLME_JOIN;
586+
587+
mlmeReq.Req.Join.DevEui = DevEui;
588+
mlmeReq.Req.Join.AppEui = AppEui;
589+
mlmeReq.Req.Join.AppKey = AppKey;
590+
591+
LoRaMacMlmeRequest( &mlmeReq );
592+
DeviceState = DEVICE_STATE_SLEEP;
593+
}
594+
break;
582595
default:
583596
break;
584597
}

src/apps/LoRaMac/classB/LoRaMote/Comissioning.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Maintainer: Miguel Luis and Gregory Cristian
2626
*/
2727
#define LORAWAN_PUBLIC_NETWORK true
2828

29-
#if( OVER_THE_AIR_ACTIVATION != 0 )
30-
3129
/*!
3230
* IEEE Organizationally Unique Identifier ( OUI ) (big endian)
3331
*/
@@ -51,8 +49,6 @@ Maintainer: Miguel Luis and Gregory Cristian
5149
*/
5250
#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
5351

54-
#else
55-
5652
/*!
5753
* Current network ID
5854
*/
@@ -77,6 +73,4 @@ Maintainer: Miguel Luis and Gregory Cristian
7773
*/
7874
#define LORAWAN_APPSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
7975

80-
#endif
81-
8276
#endif // __LORA_COMMISSIONING_H__

src/apps/LoRaMac/classB/LoRaMote/main.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,11 @@ Maintainer: Miguel Luis and Gregory Cristian
9595

9696
#endif
9797

98-
#if( OVER_THE_AIR_ACTIVATION != 0 )
99-
10098
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
10199
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
102100
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
103101

104-
#else
102+
#if( OVER_THE_AIR_ACTIVATION == 0 )
105103

106104
static uint8_t NwkSKey[] = LORAWAN_NWKSKEY;
107105
static uint8_t AppSKey[] = LORAWAN_APPSKEY;
@@ -568,6 +566,20 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
568566
LoRaMacMlmeRequest( &mlmeReq );
569567
}
570568
break;
569+
case 6: // (ix)
570+
{
571+
MlmeReq_t mlmeReq;
572+
573+
mlmeReq.Type = MLME_JOIN;
574+
575+
mlmeReq.Req.Join.DevEui = DevEui;
576+
mlmeReq.Req.Join.AppEui = AppEui;
577+
mlmeReq.Req.Join.AppKey = AppKey;
578+
579+
LoRaMacMlmeRequest( &mlmeReq );
580+
DeviceState = DEVICE_STATE_SLEEP;
581+
}
582+
break;
571583
default:
572584
break;
573585
}

src/apps/LoRaMac/classB/SK-iM880A/Comissioning.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Maintainer: Miguel Luis and Gregory Cristian
2626
*/
2727
#define LORAWAN_PUBLIC_NETWORK true
2828

29-
#if( OVER_THE_AIR_ACTIVATION != 0 )
30-
3129
/*!
3230
* IEEE Organizationally Unique Identifier ( OUI ) (big endian)
3331
*/
@@ -51,8 +49,6 @@ Maintainer: Miguel Luis and Gregory Cristian
5149
*/
5250
#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
5351

54-
#else
55-
5652
/*!
5753
* Current network ID
5854
*/
@@ -77,6 +73,4 @@ Maintainer: Miguel Luis and Gregory Cristian
7773
*/
7874
#define LORAWAN_APPSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
7975

80-
#endif
81-
8276
#endif // __LORA_COMMISSIONING_H__

src/apps/LoRaMac/classB/SK-iM880A/main.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,11 @@ Maintainer: Andreas Pella (IMST GmbH), Miguel Luis and Gregory Cristian
8484
*/
8585
#define LORAWAN_APP_DATA_SIZE 4
8686

87-
#if( OVER_THE_AIR_ACTIVATION != 0 )
88-
8987
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
9088
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
9189
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
9290

93-
#else
91+
#if( OVER_THE_AIR_ACTIVATION == 0 )
9492

9593
static uint8_t NwkSKey[] = LORAWAN_NWKSKEY;
9694
static uint8_t AppSKey[] = LORAWAN_APPSKEY;
@@ -513,6 +511,20 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
513511
LoRaMacMlmeRequest( &mlmeReq );
514512
}
515513
break;
514+
case 6: // (ix)
515+
{
516+
MlmeReq_t mlmeReq;
517+
518+
mlmeReq.Type = MLME_JOIN;
519+
520+
mlmeReq.Req.Join.DevEui = DevEui;
521+
mlmeReq.Req.Join.AppEui = AppEui;
522+
mlmeReq.Req.Join.AppKey = AppKey;
523+
524+
LoRaMacMlmeRequest( &mlmeReq );
525+
DeviceState = DEVICE_STATE_SLEEP;
526+
}
527+
break;
516528
default:
517529
break;
518530
}

0 commit comments

Comments
 (0)