Skip to content

Commit c82a8a7

Browse files
committed
Remove repeater support. Will be removed from future Regional Parameters specifications.
1 parent 3ca34ce commit c82a8a7

24 files changed

+31
-304
lines changed

src/mac/LoRaMac.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ typedef struct sLoRaMacNvmCtx
164164
* Current channel index
165165
*/
166166
uint8_t LastTxChannel;
167-
/*
168-
* Holds the current rx window slot
169-
*/
170-
bool RepeaterSupport;
171167
/*
172168
* Buffer containing the MAC layer commands
173169
*/
@@ -1071,12 +1067,6 @@ static void ProcessRadioRxDone( void )
10711067
getPhy.UplinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime;
10721068
getPhy.Datarate = MacCtx.McpsIndication.RxDatarate;
10731069
getPhy.Attribute = PHY_MAX_PAYLOAD;
1074-
1075-
// Get the maximum payload length
1076-
if( MacCtx.NvmCtx->RepeaterSupport == true )
1077-
{
1078-
getPhy.Attribute = PHY_MAX_PAYLOAD_REPEATER;
1079-
}
10801070
phyParam = RegionGetPhyParam( MacCtx.NvmCtx->Region, &getPhy );
10811071
if( MAX( 0, ( int16_t )( ( int16_t ) size - ( int16_t ) LORA_MAC_FRMPAYLOAD_OVERHEAD ) ) > ( int16_t )phyParam.Value )
10821072
{
@@ -1720,7 +1710,6 @@ static void OnRxWindow1TimerEvent( void* context )
17201710
MacCtx.RxWindow1Config.Channel = MacCtx.Channel;
17211711
MacCtx.RxWindow1Config.DrOffset = MacCtx.NvmCtx->MacParams.Rx1DrOffset;
17221712
MacCtx.RxWindow1Config.DownlinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime;
1723-
MacCtx.RxWindow1Config.RepeaterSupport = MacCtx.NvmCtx->RepeaterSupport;
17241713
MacCtx.RxWindow1Config.RxContinuous = false;
17251714
MacCtx.RxWindow1Config.RxSlot = RX_SLOT_WIN_1;
17261715

@@ -1738,7 +1727,6 @@ static void OnRxWindow2TimerEvent( void* context )
17381727
MacCtx.RxWindow2Config.Channel = MacCtx.Channel;
17391728
MacCtx.RxWindow2Config.Frequency = MacCtx.NvmCtx->MacParams.Rx2Channel.Frequency;
17401729
MacCtx.RxWindow2Config.DownlinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime;
1741-
MacCtx.RxWindow2Config.RepeaterSupport = MacCtx.NvmCtx->RepeaterSupport;
17421730
MacCtx.RxWindow2Config.RxContinuous = false;
17431731
MacCtx.RxWindow2Config.RxSlot = RX_SLOT_WIN_2;
17441732

@@ -1851,7 +1839,6 @@ static LoRaMacStatus_t SwitchClass( DeviceClass_t deviceClass )
18511839
MacCtx.RxWindowCConfig.Channel = MacCtx.Channel;
18521840
MacCtx.RxWindowCConfig.Frequency = MacCtx.NvmCtx->MacParams.RxCChannel.Frequency;
18531841
MacCtx.RxWindowCConfig.DownlinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime;
1854-
MacCtx.RxWindowCConfig.RepeaterSupport = MacCtx.NvmCtx->RepeaterSupport;
18551842
MacCtx.RxWindowCConfig.RxSlot = RX_SLOT_WIN_CLASS_C_MULTICAST;
18561843
MacCtx.RxWindowCConfig.RxContinuous = true;
18571844
break;
@@ -1905,12 +1892,6 @@ static uint8_t GetMaxAppPayloadWithoutFOptsLength( int8_t datarate )
19051892
getPhy.UplinkDwellTime = MacCtx.NvmCtx->MacParams.UplinkDwellTime;
19061893
getPhy.Datarate = datarate;
19071894
getPhy.Attribute = PHY_MAX_PAYLOAD;
1908-
1909-
// Get the maximum payload length
1910-
if( MacCtx.NvmCtx->RepeaterSupport == true )
1911-
{
1912-
getPhy.Attribute = PHY_MAX_PAYLOAD_REPEATER;
1913-
}
19141895
phyParam = RegionGetPhyParam( MacCtx.NvmCtx->Region, &getPhy );
19151896

19161897
return phyParam.Value;
@@ -2629,7 +2610,6 @@ static void ResetMacParameters( void )
26292610
MacCtx.RxWindow2Config.Channel = MacCtx.Channel;
26302611
MacCtx.RxWindow2Config.Frequency = MacCtx.NvmCtx->MacParams.Rx2Channel.Frequency;
26312612
MacCtx.RxWindow2Config.DownlinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime;
2632-
MacCtx.RxWindow2Config.RepeaterSupport = MacCtx.NvmCtx->RepeaterSupport;
26332613
MacCtx.RxWindow2Config.RxContinuous = false;
26342614
MacCtx.RxWindow2Config.RxSlot = RX_SLOT_WIN_2;
26352615

@@ -2909,7 +2889,6 @@ LoRaMacStatus_t RestoreCtxs( LoRaMacCtxs_t* contexts )
29092889
MacCtx.RxWindowCConfig.Channel = MacCtx.Channel;
29102890
MacCtx.RxWindowCConfig.Frequency = MacCtx.NvmCtx->MacParams.RxCChannel.Frequency;
29112891
MacCtx.RxWindowCConfig.DownlinkDwellTime = MacCtx.NvmCtx->MacParams.DownlinkDwellTime;
2912-
MacCtx.RxWindowCConfig.RepeaterSupport = MacCtx.NvmCtx->RepeaterSupport;
29132892
MacCtx.RxWindowCConfig.RxContinuous = true;
29142893
MacCtx.RxWindowCConfig.RxSlot = RX_SLOT_WIN_CLASS_C;
29152894

@@ -3185,7 +3164,6 @@ LoRaMacStatus_t LoRaMacInitialization( LoRaMacPrimitives_t* primitives, LoRaMacC
31853164
MacCtx.AckTimeoutRetries = 1;
31863165
MacCtx.NvmCtx->Region = region;
31873166
MacCtx.NvmCtx->DeviceClass = CLASS_A;
3188-
MacCtx.NvmCtx->RepeaterSupport = false;
31893167

31903168
// Setup version
31913169
MacCtx.NvmCtx->Version.Value = LORAMAC_VERSION;
@@ -3554,11 +3532,6 @@ LoRaMacStatus_t LoRaMacMibGetRequestConfirm( MibRequestConfirm_t* mibGet )
35543532
mibGet->Param.EnablePublicNetwork = MacCtx.NvmCtx->PublicNetwork;
35553533
break;
35563534
}
3557-
case MIB_REPEATER_SUPPORT:
3558-
{
3559-
mibGet->Param.EnableRepeaterSupport = MacCtx.NvmCtx->RepeaterSupport;
3560-
break;
3561-
}
35623535
case MIB_CHANNELS:
35633536
{
35643537
getPhy.Attribute = PHY_CHANNELS;
@@ -4094,11 +4067,6 @@ LoRaMacStatus_t LoRaMacMibSetRequestConfirm( MibRequestConfirm_t* mibSet )
40944067
Radio.SetPublicNetwork( MacCtx.NvmCtx->PublicNetwork );
40954068
break;
40964069
}
4097-
case MIB_REPEATER_SUPPORT:
4098-
{
4099-
MacCtx.NvmCtx->RepeaterSupport = mibSet->Param.EnableRepeaterSupport;
4100-
break;
4101-
}
41024070
case MIB_RX2_CHANNEL:
41034071
{
41044072
verify.DatarateParams.Datarate = mibSet->Param.Rx2Channel.Datarate;

src/mac/LoRaMac.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extern "C"
163163
/*!
164164
* FRMPayload overhead to be used when setting the Radio.SetMaxPayloadLength
165165
* in RxWindowSetup function.
166-
* Maximum PHYPayload = MaxPayloadOfDatarate/MaxPayloadOfDatarateRepeater + LORA_MAC_FRMPAYLOAD_OVERHEAD
166+
* Maximum PHYPayload = MaxPayloadOfDatarate + LORA_MAC_FRMPAYLOAD_OVERHEAD
167167
*/
168168
#define LORA_MAC_FRMPAYLOAD_OVERHEAD 13 // MHDR(1) + FHDR(7) + Port(1) + MIC(4)
169169

@@ -445,10 +445,6 @@ typedef struct sLoRaMacParams
445445
* Antenna gain of the node
446446
*/
447447
float AntennaGain;
448-
/*!
449-
* Indicates if the node supports repeaters
450-
*/
451-
bool RepeaterSupport;
452448
}LoRaMacParams_t;
453449

454450
/*!
@@ -1243,7 +1239,6 @@ typedef struct sMlmeIndication
12431239
* \ref MIB_MC_APP_S_KEY_3 | NO | YES
12441240
* \ref MIB_MC_NWK_S_KEY_3 | NO | YES
12451241
* \ref MIB_PUBLIC_NETWORK | YES | YES
1246-
* \ref MIB_REPEATER_SUPPORT | YES | YES
12471242
* \ref MIB_CHANNELS | YES | NO
12481243
* \ref MIB_RX2_CHANNEL | YES | YES
12491244
* \ref MIB_RX2_DFAULT_CHANNEL | YES | YES
@@ -1475,14 +1470,6 @@ typedef enum eMib
14751470
* [true: public network, false: private network]
14761471
*/
14771472
MIB_PUBLIC_NETWORK,
1478-
/*!
1479-
* Support the operation with repeaters
1480-
*
1481-
* LoRaWAN Regional Parameters V1.0.2rB
1482-
*
1483-
* [true: repeater support enabled, false: repeater support disabled]
1484-
*/
1485-
MIB_REPEATER_SUPPORT,
14861473
/*!
14871474
* Communication channels. A get request will return a
14881475
* pointer which references the first entry of the channel list. The
@@ -1885,12 +1872,6 @@ typedef union uMibParam
18851872
* Related MIB type: \ref MIB_PUBLIC_NETWORK
18861873
*/
18871874
bool EnablePublicNetwork;
1888-
/*!
1889-
* Enable or disable repeater support
1890-
*
1891-
* Related MIB type: \ref MIB_REPEATER_SUPPORT
1892-
*/
1893-
bool EnableRepeaterSupport;
18941875
/*!
18951876
* LoRaWAN Channel
18961877
*

src/mac/LoRaMacClassB.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,6 @@ static void LoRaMacClassBProcessPingSlot( void )
10321032

10331033
pingSlotRxConfig.Datarate = Ctx.NvmCtx->PingSlotCtx.Datarate;
10341034
pingSlotRxConfig.DownlinkDwellTime = Ctx.LoRaMacClassBParams.LoRaMacParams->DownlinkDwellTime;
1035-
pingSlotRxConfig.RepeaterSupport = Ctx.LoRaMacClassBParams.LoRaMacParams->RepeaterSupport;
10361035
pingSlotRxConfig.Frequency = frequency;
10371036
pingSlotRxConfig.RxContinuous = false;
10381037
pingSlotRxConfig.RxSlot = RX_SLOT_WIN_CLASS_B_PING_SLOT;
@@ -1186,7 +1185,6 @@ static void LoRaMacClassBProcessMulticastSlot( void )
11861185

11871186
multicastSlotRxConfig.Datarate = Ctx.PingSlotCtx.NextMulticastChannel->ChannelParams.RxParams.ClassB.Datarate;
11881187
multicastSlotRxConfig.DownlinkDwellTime = Ctx.LoRaMacClassBParams.LoRaMacParams->DownlinkDwellTime;
1189-
multicastSlotRxConfig.RepeaterSupport = Ctx.LoRaMacClassBParams.LoRaMacParams->RepeaterSupport;
11901188
multicastSlotRxConfig.Frequency = frequency;
11911189
multicastSlotRxConfig.RxContinuous = false;
11921190
multicastSlotRxConfig.RxSlot = RX_SLOT_WIN_CLASS_B_MULTICAST_SLOT;

src/mac/region/Region.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,6 @@ typedef enum ePhyAttribute
646646
* Maximum payload possible.
647647
*/
648648
PHY_MAX_PAYLOAD,
649-
/*!
650-
* Maximum payload possible when repeater support is enabled.
651-
*/
652-
PHY_MAX_PAYLOAD_REPEATER,
653649
/*!
654650
* Duty cycle.
655651
*/
@@ -904,21 +900,21 @@ typedef struct sGetPhyParams
904900
/*!
905901
* Datarate.
906902
* The parameter is needed for the following queries:
907-
* PHY_MAX_PAYLOAD, PHY_MAX_PAYLOAD_REPEATER, PHY_NEXT_LOWER_TX_DR.
903+
* PHY_MAX_PAYLOAD, PHY_NEXT_LOWER_TX_DR.
908904
*/
909905
int8_t Datarate;
910906
/*!
911907
* Uplink dwell time. This parameter must be set to query:
912-
* PHY_MAX_PAYLOAD, PHY_MAX_PAYLOAD_REPEATER, PHY_MIN_TX_DR.
908+
* PHY_MAX_PAYLOAD, PHY_MIN_TX_DR.
913909
* The parameter is needed for the following queries:
914-
* PHY_MIN_TX_DR, PHY_MAX_PAYLOAD, PHY_MAX_PAYLOAD_REPEATER, PHY_NEXT_LOWER_TX_DR.
910+
* PHY_MIN_TX_DR, PHY_MAX_PAYLOAD, PHY_NEXT_LOWER_TX_DR.
915911
*/
916912
uint8_t UplinkDwellTime;
917913
/*!
918914
* Downlink dwell time. This parameter must be set to query:
919-
* PHY_MAX_PAYLOAD, PHY_MAX_PAYLOAD_REPEATER, PHY_MIN_RX_DR.
915+
* PHY_MAX_PAYLOAD, PHY_MIN_RX_DR.
920916
* The parameter is needed for the following queries:
921-
* PHY_MIN_RX_DR, PHY_MAX_PAYLOAD, PHY_MAX_PAYLOAD_REPEATER.
917+
* PHY_MIN_RX_DR, PHY_MAX_PAYLOAD.
922918
*/
923919
uint8_t DownlinkDwellTime;
924920
}GetPhyParams_t;
@@ -1073,10 +1069,6 @@ typedef struct sRxConfigParams
10731069
* Downlink dwell time.
10741070
*/
10751071
uint8_t DownlinkDwellTime;
1076-
/*!
1077-
* Set to true, if a repeater is supported.
1078-
*/
1079-
bool RepeaterSupport;
10801072
/*!
10811073
* Set to true, if RX should be continuous.
10821074
*/

src/mac/region/RegionAS923.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,6 @@ PhyParam_t RegionAS923GetPhyParam( GetPhyParams_t* getPhy )
198198
}
199199
break;
200200
}
201-
case PHY_MAX_PAYLOAD_REPEATER:
202-
{
203-
if( getPhy->UplinkDwellTime == 0 )
204-
{
205-
phyParam.Value = MaxPayloadOfDatarateRepeaterDwell0AS923[getPhy->Datarate];
206-
}
207-
else
208-
{
209-
phyParam.Value = MaxPayloadOfDatarateDwell1UpAS923[getPhy->Datarate];
210-
}
211-
break;
212-
}
213201
case PHY_DUTY_CYCLE:
214202
{
215203
phyParam.Value = AS923_DUTY_CYCLE_ENABLED;
@@ -552,7 +540,6 @@ bool RegionAS923RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate )
552540
{
553541
RadioModems_t modem;
554542
int8_t dr = rxConfig->Datarate;
555-
uint8_t maxPayload = 0;
556543
int8_t phyDr = 0;
557544
uint32_t frequency = rxConfig->Frequency;
558545

@@ -589,17 +576,7 @@ bool RegionAS923RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate )
589576
Radio.SetRxConfig( modem, rxConfig->Bandwidth, phyDr, 1, 0, 8, rxConfig->WindowTimeout, false, 0, false, 0, 0, true, rxConfig->RxContinuous );
590577
}
591578

592-
// Check for repeater support
593-
if( rxConfig->RepeaterSupport == true )
594-
{
595-
maxPayload = MaxPayloadOfDatarateRepeaterDwell0AS923[dr];
596-
}
597-
else
598-
{
599-
maxPayload = MaxPayloadOfDatarateDwell0AS923[dr];
600-
}
601-
602-
Radio.SetMaxPayloadLength( modem, maxPayload + LORA_MAC_FRMPAYLOAD_OVERHEAD );
579+
Radio.SetMaxPayloadLength( modem, MaxPayloadOfDatarateDwell0AS923[dr] + LORA_MAC_FRMPAYLOAD_OVERHEAD );
603580

604581
*datarate = (uint8_t) dr;
605582
return true;

src/mac/region/RegionAS923.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,27 +296,20 @@ static const uint8_t DataratesAS923[] = { 12, 11, 10, 9, 8, 7, 7, 50 };
296296
static const uint32_t BandwidthsAS923[] = { 125000, 125000, 125000, 125000, 125000, 125000, 250000, 0 };
297297

298298
/*!
299-
* Maximum payload with respect to the datarate index. Cannot operate with repeater.
299+
* Maximum payload with respect to the datarate index.
300300
* The table is valid for the dwell time configuration of 0 for uplinks and downlinks.
301301
*/
302302
static const uint8_t MaxPayloadOfDatarateDwell0AS923[] = { 51, 51, 51, 115, 242, 242, 242, 242 };
303303

304304
/*!
305-
* Maximum payload with respect to the datarate index. Can operate with repeater.
306-
* The table is valid for the dwell time configuration of 0 for uplinks and downlinks. The table provides
307-
* repeater support.
308-
*/
309-
static const uint8_t MaxPayloadOfDatarateRepeaterDwell0AS923[] = { 51, 51, 51, 115, 222, 222, 222, 222 };
310-
311-
/*!
312-
* Maximum payload with respect to the datarate index. Can operate with and without repeater.
313-
* The table proides repeater support. The table is only valid for uplinks.
305+
* Maximum payload with respect to the datarate index.
306+
* The table is only valid for uplinks.
314307
*/
315308
static const uint8_t MaxPayloadOfDatarateDwell1UpAS923[] = { 0, 0, 11, 53, 125, 242, 242, 242 };
316309

317310
/*!
318-
* Maximum payload with respect to the datarate index. Can operate with and without repeater.
319-
* The table proides repeater support. The table is only valid for downlinks.
311+
* Maximum payload with respect to the datarate index.
312+
* The table is only valid for downlinks.
320313
*/
321314
static const uint8_t MaxPayloadOfDatarateDwell1DownAS923[] = { 0, 0, 11, 53, 126, 242, 242, 242 };
322315

src/mac/region/RegionAU915.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,6 @@ PhyParam_t RegionAU915GetPhyParam( GetPhyParams_t* getPhy )
219219
}
220220
break;
221221
}
222-
case PHY_MAX_PAYLOAD_REPEATER:
223-
{
224-
if( getPhy->UplinkDwellTime == 0)
225-
{
226-
phyParam.Value = MaxPayloadOfDatarateRepeaterDwell0AU915[getPhy->Datarate];
227-
}
228-
else
229-
{
230-
phyParam.Value = MaxPayloadOfDatarateRepeaterDwell1AU915[getPhy->Datarate];
231-
}
232-
break;
233-
}
234222
case PHY_DUTY_CYCLE:
235223
{
236224
phyParam.Value = AU915_DUTY_CYCLE_ENABLED;
@@ -570,7 +558,6 @@ void RegionAU915ComputeRxWindowParameters( int8_t datarate, uint8_t minRxSymbols
570558
bool RegionAU915RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate )
571559
{
572560
int8_t dr = rxConfig->Datarate;
573-
uint8_t maxPayload = 0;
574561
int8_t phyDr = 0;
575562
uint32_t frequency = rxConfig->Frequency;
576563

@@ -593,15 +580,7 @@ bool RegionAU915RxConfig( RxConfigParams_t* rxConfig, int8_t* datarate )
593580
// Radio configuration
594581
Radio.SetRxConfig( MODEM_LORA, rxConfig->Bandwidth, phyDr, 1, 0, 8, rxConfig->WindowTimeout, false, 0, false, 0, 0, true, rxConfig->RxContinuous );
595582

596-
if( rxConfig->RepeaterSupport == true )
597-
{
598-
maxPayload = MaxPayloadOfDatarateRepeaterDwell0AU915[dr];
599-
}
600-
else
601-
{
602-
maxPayload = MaxPayloadOfDatarateDwell0AU915[dr];
603-
}
604-
Radio.SetMaxPayloadLength( MODEM_LORA, maxPayload + LORA_MAC_FRMPAYLOAD_OVERHEAD );
583+
Radio.SetMaxPayloadLength( MODEM_LORA, MaxPayloadOfDatarateDwell0AU915[dr] + LORA_MAC_FRMPAYLOAD_OVERHEAD );
605584

606585
*datarate = (uint8_t) dr;
607586
return true;

src/mac/region/RegionAU915.h

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -294,31 +294,17 @@ static const int8_t DatarateOffsetsAU915[7][6] =
294294
};
295295

296296
/*!
297-
* Maximum payload with respect to the datarate index. Cannot operate with repeater.
297+
* Maximum payload with respect to the datarate index.
298298
* The table is valid for the dwell time configuration of 0 for uplinks.
299299
*/
300300
static const uint8_t MaxPayloadOfDatarateDwell0AU915[] = { 51, 51, 51, 115, 242, 242, 242, 0, 53, 129, 242, 242, 242, 242 };
301301

302302
/*!
303-
* Maximum payload with respect to the datarate index. Can operate with repeater.
304-
* The table is valid for the dwell time configuration of 0 for uplinks. The table provides
305-
* repeater support.
306-
*/
307-
static const uint8_t MaxPayloadOfDatarateRepeaterDwell0AU915[] = { 51, 51, 51, 115, 222, 222, 222, 0, 33, 109, 222, 222, 222, 222 };
308-
309-
/*!
310-
* Maximum payload with respect to the datarate index. Cannot operate with repeater.
303+
* Maximum payload with respect to the datarate index.
311304
* The table is valid for the dwell time configuration of 1 for uplinks.
312305
*/
313306
static const uint8_t MaxPayloadOfDatarateDwell1AU915[] = { 0, 0, 11, 53, 125, 242, 242, 0, 53, 129, 242, 242, 242, 242 };
314307

315-
/*!
316-
* Maximum payload with respect to the datarate index. Can operate with repeater.
317-
* The table is valid for the dwell time configuration of 1 for uplinks. The table provides
318-
* repeater support.
319-
*/
320-
static const uint8_t MaxPayloadOfDatarateRepeaterDwell1AU915[] = { 0, 0, 11, 53, 125, 242, 242, 0, 33, 109, 222, 222, 222, 222 };
321-
322308
/*!
323309
* \brief The function gets a value of a specific phy attribute.
324310
*

0 commit comments

Comments
 (0)