Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACK not received in class C #1553

Open
vAnArhist opened this issue Jul 31, 2023 · 1 comment
Open

ACK not received in class C #1553

vAnArhist opened this issue Jul 31, 2023 · 1 comment

Comments

@vAnArhist
Copy link

vAnArhist commented Jul 31, 2023

Tested on HW: nrf52832+sx1262 module.
DIO1 used in interrupt mode, sx1262 used with TXCO, DIO3 as voltage source, DIO2 for TX/RX switch.

Tested stack version: v4.5.1, class C, US915 region
Network server: Comcast MachineQ server
LoraWAN gateway: Area8C
FW: no RTOS.

Facing issues with receiving ACK in confirmed messages mode.

Some words about our FW implementation:

  1. Node connects to NS, get Join response, sends empty packets to increase data rate to DR>=2. Our packet size is 121byte, so it is the reason why we need to increase DR.
  2. Node get UNIX timestamp from AS for internal use in FW.
  3. Node TX 2 packets every 5minutes with 5sec pause between them.
  4. All this time node samples data from ADC. Processing of LoRaMac events/radio interrupts execute in time when sampling is not done.

I have issue with receiving ACK from server for the second message, ACK for first message is ok.
I have IRQ_RX_TX_TIMEOUT for 2nd message generated before actual timeout for RX2 window (~3sec) passes.

Processing for ADC takes around ~520ms.
If i decrease this time to ~430ms ACK received, but not in all cases.

Questions:

  1. Can anyone describe what is IRQ_RX_TX_TIMEOUT signal and why it can be generated? From the DS i see:

When SymbNum is different from 0, the modem will wait for a total of SymbNum LoRa symbol to validate, or not, the correct detection of a LoRa packet. If the various states of the demodulator are not lock at this moment, the radio will generate the RxTimeout IRQ.

  1. I dont understand difference between symbol timeout and lora header timeout. IRQ_RX_TX_TIMEOUT, as I understand, is symbol timeout, but RX cannot be performed if symbol timeout occur, so I dont understand how RX window will work in class C than.
@vAnArhist vAnArhist reopened this Sep 12, 2023
@BottomUpTelemetry
Copy link

In the RadioSetRxConfig function located in the radio.c file, please insert the following line after line 647:

Before:

if( rxContinuous == true ) { symbTimeout = 0; }

After:

if( rxContinuous == true ) { symbTimeout = 0; } symbTimeout = 0;

In the function:
static void RxWindowSetup(TimerEvent_t *rxTimer, RxConfigParams_t *rxConfig)
located in the LoRaMac file,
make sure to use:
CRITICAL_SECTION_BEGIN();

at the beginning of the function and
CRITICAL_SECTION_END();

Example:

`
static void RxWindowSetup(TimerEvent_t *rxTimer, RxConfigParams_t *rxConfig)
{
CRITICAL_SECTION_BEGIN();
TimerStop(rxTimer);

// Ensure the radio is Idle
Radio.Standby();

if (RegionRxConfig(Nvm.MacGroup2.Region, rxConfig, (int8_t *)&MacCtx.McpsIndication.RxDatarate) == true)
{
	Radio.Rx(Nvm.MacGroup2.MacParams.MaxRxWindow);
	MacCtx.RxSlot = rxConfig->RxSlot;
}
CRITICAL_SECTION_END();

}

`

at the end of the function.

With these modifications, your issue should be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants