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

US/AU ADR processing causes assert #43

Closed
terrillmoore opened this issue Jan 1, 2018 · 0 comments
Closed

US/AU ADR processing causes assert #43

terrillmoore opened this issue Jan 1, 2018 · 0 comments

Comments

@terrillmoore
Copy link
Member

The Things Network recently enabled ADR for US and AU bandplans.

Unfortunately, this uncovers a bug in the LinkAdrReq processing, which causes an assert:

FAILURE .../arduino-lmic/src/lmic/lmic_us_like.c:122

Root cause: the ChMaskCntl values of 6 and 7 (especially 7) are not handled correctly. TTN sends (per the spec) 0x70 (7) and mask 0x0002 -- we are suposed to turn off all 125kHz channels, and then use the mask to turn on/off the specified 500kHz channels. We did the first, but used 7*16 == 96 as the base channel number for the 500 kHz channel.

While fixing this, code review showed that the code also doens't handle ChMaskCntl == 5 (which is effectively a subband on/off command).

I have patches tested for TTN. Need to do more testing with the RWC5020A to check the other subbands.

We probably should not assert when no 500kHz channel is enabled, but that's a different issue.

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