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

[WIP] Class B fixes #481

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lmic/lmic_eu868.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ ostime_t LMICeu868_nextTx(ostime_t now) {
#if !defined(DISABLE_BEACONS)
void LMICeu868_setBcnRxParams(void) {
LMIC.dataLen = 0;
LMIC.freq = LMIC.channelFreq[LMIC.bcnChnl] & ~(u4_t)3;
LMIC.freq = FREQ_BCN;
Copy link
Member

@terrillmoore terrillmoore Oct 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to implement MCMD_BeaconFreqReq at some point. When we do that, the FREQ_BCN can be overridden; so we need to get this from a data structure (eventually). We can introduce a new class B data structure to hold the beacon frequency and other eacon params.

BTW: we should remove CHNL_BCN altogether from lorabase.h; it should not be used to index LMIC.channels[], because those entries in LMIC.channels[] are used for other things and can't be safely used for the classB beacon.

Since we already have LMIC.ping.*, we could possibly add it there, or simply add LMIC.beacon.freq etc.

For the US, AU, and eventually CN470, we must deal with channel-roaming beacons; for that , we have to use LMIC.bcnChnl, but that is all done in the regional file. LMIC.bcnChnl can be moved into the "US-like" area of LMIC.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added first stage (static beacon frequency) for AS923, EU868, IN866 and KR920 as part of major changes for #208.

LMIC.rps = setIh(setNocrc(dndr2rps((dr_t)DR_BCN), 1), LEN_BCN);
}
#endif // !DISABLE_BEACONS
Expand Down