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

DL not received in Class C AS923-1 + Freq 923.600 #1581

Open
Adamzat opened this issue Oct 10, 2023 · 0 comments
Open

DL not received in Class C AS923-1 + Freq 923.600 #1581

Adamzat opened this issue Oct 10, 2023 · 0 comments

Comments

@Adamzat
Copy link

Adamzat commented Oct 10, 2023

Hi,
We are use using the LoraWan Stack v4.6.0. We have observed that DL do not operate when testing the device in region AS923-1 + Class C with some Network servers.

After investigation, I found that the Network server asks the device to change the RX2 frequency to 923.600 Mhz:
Mac command : 0905050220ee8c

MAC.Command.TxParamSetupReq
MAC.TxParamSetupReq.EIRP_DwellTime : 0x05
MAC.TxParamSetupReq.EIRP_DwellTime.DownlinkDwellTime : 0
MAC.TxParamSetupReq.EIRP_DwellTime.DownlinkDwellTime : No Limit
MAC.TxParamSetupReq.EIRP_DwellTime.UplinkDwellTime : 0
MAC.TxParamSetupReq.EIRP_DwellTime.UplinkDwellTime : No Limit
MAC.TxParamSetupReq.EIRP_DwellTime.MaxEIRP : 5
MAC.TxParamSetupReq.EIRP_DwellTime.MaxEIRP (dBm) : 16
MAC.Command.RXParamSetupReq
MAC.RXParamSetupReq.DLsettings : 0x02
MAC.RXParamSetupReq.DLsettings.RX1DRoffset : 0
MAC.RXParamSetupReq.DLsettings.RX2DataRate : 2
MAC.RXParamSetupReq.Frequency (Hz) : 923600000

The device responds OK to the request:
Mac: 090507

MAC.Command.TxParamSetupAns
MAC.Command.RXParamSetupAns
MAC.RXParamSetupAns.Status : 0x07
MAC.RXParamSetupAns.Status.ChannelACK : 1
MAC.RXParamSetupAns.Status.RX2DataRateACK : 1
MAC.RXParamSetupAns.Status.RX1DRoffsetACK : 1

But when downlink is sent to the device using the Frequency 923.600, the device does not respond and still using the default RX2 frequency (932.2).

After debugging, I observed that the device accepts the new Frequency but do not Apply it:

The Fix is to add the lines below to update the RxCFrequency value in "OpenContinuousRxCWindow":

MacCtx.RxWindowCConfig.Channel = MacCtx.Channel;
MacCtx.RxWindowCConfig.Frequency = Nvm.MacGroup2.MacParams.RxCChannel.Frequency;
MacCtx.RxWindowCConfig.DownlinkDwellTime = Nvm.MacGroup2.MacParams.DownlinkDwellTime;
<<<

///////////////////////////////////////////////////

static void OpenContinuousRxCWindow( void )
{
    // Update RxC parameters (if changed by the network)
    MacCtx.RxWindowCConfig.Channel = MacCtx.Channel;
    MacCtx.RxWindowCConfig.Frequency = Nvm.MacGroup2.MacParams.RxCChannel.Frequency;
    MacCtx.RxWindowCConfig.DownlinkDwellTime = Nvm.MacGroup2.MacParams.DownlinkDwellTime;

    
    // Compute RxC windows parameters
    RegionComputeRxWindowParameters( Nvm.MacGroup2.Region,
                                     Nvm.MacGroup2.MacParams.RxCChannel.Datarate,
                                     Nvm.MacGroup2.MacParams.MinRxSymbols,
                                     Nvm.MacGroup2.MacParams.SystemMaxRxError,
                                     &MacCtx.RxWindowCConfig );

    MacCtx.RxWindowCConfig.RxSlot = RX_SLOT_WIN_CLASS_C;

/////////////////////////////////////////////////

Can you please check if the fix is OK.

Thank you for your feedback.
Best regards.

Youssouf.

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

1 participant