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

Class B uplink FMAC_CLASSB not set #480

Open
terrillmoore opened this issue Oct 18, 2019 · 0 comments
Open

Class B uplink FMAC_CLASSB not set #480

terrillmoore opened this issue Oct 18, 2019 · 0 comments
Assignees
Labels

Comments

@terrillmoore
Copy link
Member

terrillmoore commented Oct 18, 2019

the class B bit is not set in the uplink message, and therefore the server is still waiting for an uplink message (class A mode).

At line 1890 or so:

    LMIC.frame[OFF_DAT_FCT] = (LMIC.dnConf | LMIC.adrEnabled
                              | (sendAdrAckReq() ? FCT_ADRACKReq : 0)
                              | (end-OFF_DAT_OPTS));

Add here the setting of bit 4 (FCT_CLASSB), if OP_PINGABLE is set. Something like:

    LMIC.frame[OFF_DAT_FCT] = (LMIC.dnConf | LMIC.adrEnabled
                              | (sendAdrAckReq() ? FCT_ADRACKReq : 0)
#if !defined(DISABLE_PING)
                              | (LMIC.opmode & OP_PINGABLE) ? FCT_CLASSB : 0
#endif // ndef DISABLE_PING
                              | (end-OFF_DAT_OPTS));

That worked like a charm. The uplink packet is now marked as class b.

Originally posted by @sualko in #479 (comment)

@terrillmoore terrillmoore self-assigned this Oct 18, 2019
sualko added a commit to sualko/arduino-lmic that referenced this issue Oct 21, 2019
sualko added a commit to sualko/arduino-lmic that referenced this issue Oct 22, 2019
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

1 participant