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

US915 Limit channels #742

Closed
utkarshshah007 opened this issue May 14, 2019 · 2 comments
Closed

US915 Limit channels #742

utkarshshah007 opened this issue May 14, 2019 · 2 comments
Labels

Comments

@utkarshshah007
Copy link

utkarshshah007 commented May 14, 2019

Hey folks!

I'm new here and I'm trying to improve the join time for my node. I'm using an 8 channel gateway & TTN as my network server.

I'd like to limit the channels that the device tries to join on based on this: https://www.thethingsnetwork.org/docs/lorawan/frequency-plans.html#us902-928

I tried to do this like so (as I've seen in similar issues):

// Limiting to just 2nd subband of 8 channels
static uint16_t GatewayChannelsMask[6] = {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00};
mibReq.Type = MIB_CHANNELS_DEFAULT_MASK;
mibReq.Param.ChannelsDefaultMask = GatewayChannelsMask;
LoRaMacMibSetRequestConfirm( &mibReq );

mibReq.Type = MIB_CHANNELS_MASK;
mibReq.Param.ChannelsMask = GatewayChannelsMask;
LoRaMacMibSetRequestConfirm( &mibReq );

but it did not seem to work.

I don't quite understand how the ChannelsMask works, and I was wondering if someone can help me understand what I'm doing wrong.

@mluis1
Copy link
Contributor

mluis1 commented May 14, 2019

You are setting the channel mask for what they call 1st sub-band. That's why it isn't working.

Please note that you should only use this trick for debug purposes. If you keep this your end-device cannot be certified, as for LoRaWAN compliance all 64 channels must be used.
Please also note that the Join procedure algorithm has been updated in order to speed up the join procedure. Please refer to the latest regional parameters specification.

image

The correct way to do what you would like is shown below:

#if defined( REGION_US915 )
                // Enabling 2nd block of 8 channels (8-15) + channel 65
                uint16_t channelMask[] = { 0xFF00, 0x0000, 0x0000, 0x0000, 0x0002, 0x0000};
                mibReq.Type = MIB_CHANNELS_MASK;
                mibReq.Param.ChannelsMask = channelMask;
                LoRaMacMibSetRequestConfirm( &mibReq );
                mibReq.Type = MIB_CHANNELS_DEFAULT_MASK;
                mibReq.Param.ChannelsDefaultMask = channelMask;
                LoRaMacMibSetRequestConfirm( &mibReq );
#endif

@utkarshshah007
Copy link
Author

utkarshshah007 commented May 16, 2019

Thanks @mluis1! This helped a lot - join is much faster, and RSSI values are improved as well.

Which version of this library added the faster join procedure algorithm for all 64 channels?

I am currently using the latest version available at mbed: https://os.mbed.com/teams/Semtech/code/LoRaWAN-demo-72/
However, that appears to be several years old.

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

No branches or pull requests

2 participants