Skip to content

Commit 0f12186

Browse files
committed
regions: increased tx timeout from 3000 to 4000 ms
This patches all regions for the same issue as 98e324b did for EU868. For SF12 packets of 51 bytes, the TxTimeOnAir is ~2800 ms. With a few additional delays (in the Radio and firmware) the default timeout of 3000 is sometimes reached, leading to the invalid conclusion that Tx has timed out, while the packet has been sent. This, in turn, leads to the possibility of a new packet being sent in violation of dutycycle constraints. A better approach would be to take the calculated TxTimeOnAir plus 1000 ms as timeout, but that would require a bit of rework on both the region code as well as on the Radio code.
1 parent 98e324b commit 0f12186

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

src/mac/region/RegionAS923.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,12 @@ bool RegionAS923TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
651651
if( txConfig->Datarate == DR_7 )
652652
{ // High Speed FSK channel
653653
modem = MODEM_FSK;
654-
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 3000 );
654+
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 4000 );
655655
}
656656
else
657657
{
658658
modem = MODEM_LORA;
659-
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
659+
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
660660
}
661661

662662
// Setup maximum payload lenght of the radio driver

src/mac/region/RegionAU915.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ bool RegionAU915TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
642642
// Setup the radio frequency
643643
Radio.SetChannel( NvmCtx.Channels[txConfig->Channel].Frequency );
644644

645-
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
645+
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
646646

647647
// Setup maximum payload lenght of the radio driver
648648
Radio.SetMaxPayloadLength( MODEM_LORA, txConfig->PktLen );

src/mac/region/RegionCN470.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ bool RegionCN470TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
547547
// Setup the radio frequency
548548
Radio.SetChannel( NvmCtx.Channels[txConfig->Channel].Frequency );
549549

550-
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, 0, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
550+
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, 0, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
551551
// Setup maximum payload lenght of the radio driver
552552
Radio.SetMaxPayloadLength( MODEM_LORA, txConfig->PktLen );
553553
// Get the time-on-air of the next tx frame

src/mac/region/RegionCN779.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,12 @@ bool RegionCN779TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
597597
if( txConfig->Datarate == DR_7 )
598598
{ // High Speed FSK channel
599599
modem = MODEM_FSK;
600-
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 3000 );
600+
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 4000 );
601601
}
602602
else
603603
{
604604
modem = MODEM_LORA;
605-
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
605+
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
606606
}
607607

608608
// Setup maximum payload lenght of the radio driver

src/mac/region/RegionEU433.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,12 @@ bool RegionEU433TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
597597
if( txConfig->Datarate == DR_7 )
598598
{ // High Speed FSK channel
599599
modem = MODEM_FSK;
600-
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 3000 );
600+
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 4000 );
601601
}
602602
else
603603
{
604604
modem = MODEM_LORA;
605-
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
605+
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
606606
}
607607

608608
// Setup maximum payload lenght of the radio driver

src/mac/region/RegionIN865.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,12 +615,12 @@ bool RegionIN865TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
615615
if( txConfig->Datarate == DR_7 )
616616
{ // High Speed FSK channel
617617
modem = MODEM_FSK;
618-
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 3000 );
618+
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 4000 );
619619
}
620620
else
621621
{
622622
modem = MODEM_LORA;
623-
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
623+
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
624624
}
625625

626626
// Setup maximum payload lenght of the radio driver

src/mac/region/RegionKR920.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ bool RegionKR920TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
596596
// Setup the radio frequency
597597
Radio.SetChannel( NvmCtx.Channels[txConfig->Channel].Frequency );
598598

599-
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
599+
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
600600

601601
// Setup maximum payload lenght of the radio driver
602602
Radio.SetMaxPayloadLength( MODEM_LORA, txConfig->PktLen );

src/mac/region/RegionRU864.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,12 +588,12 @@ bool RegionRU864TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
588588
if( txConfig->Datarate == DR_7 )
589589
{ // High Speed FSK channel
590590
modem = MODEM_FSK;
591-
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 3000 );
591+
Radio.SetTxConfig( modem, phyTxPower, 25000, bandwidth, phyDr * 1000, 0, 5, false, true, 0, 0, false, 4000 );
592592
}
593593
else
594594
{
595595
modem = MODEM_LORA;
596-
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
596+
Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
597597
}
598598

599599
// Setup maximum payload lenght of the radio driver

src/mac/region/RegionUS915.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ bool RegionUS915TxConfig( TxConfigParams_t* txConfig, int8_t* txPower, TimerTime
726726
// Setup the radio frequency
727727
Radio.SetChannel( NvmCtx.Channels[txConfig->Channel].Frequency );
728728

729-
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 3000 );
729+
Radio.SetTxConfig( MODEM_LORA, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
730730

731731
// Setup maximum payload lenght of the radio driver
732732
Radio.SetMaxPayloadLength( MODEM_LORA, txConfig->PktLen );

0 commit comments

Comments
 (0)