Skip to content

Not sure if LMIC is responding to MAC request from gateway #737

Closed
@chansheunglong

Description

@chansheunglong

In my program I set the data to be sent using "LMIC_setTxData2" and run "os_runloop_once()" until "LMIC.opmode & OP_TXRXPEND" return true. I can see my data (highlighted in yellow) being sent to the gateway. It was all working great but recently I discovered the gateway is sending a downlink to my device (highlighted in pink) every time. Which indicates my device should respond to that? Since I am seeing
Screenshot 2021-05-25 171554

I thought the MAC command will be processed during the TX event, so my device basically goto sleep after "LMIC.opmode & OP_TXRXPEND == true". I suspect this is the issue since I am not running "os_runloop_once()" all the time. Am I stopping at the wrong flag or I am missing some flag that I also need to wait?

To understand the issue I have, I print out "LMIC.pendMacLen" and the data in "LMIC.pendMacData[]", they are:
0x06 0xFF 0x06 0x07 0x03 0x03 0x06

I try "LMIC_sendAlive()" with the intention of sending the pending data to the gateway but the function return immediately and I cannot see the payload arriving at the gateway.

What should I do to make LMIC send the pending MAC response to the gateway and correctly process it?

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions