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

LoRaWAN: Terminate RX when receiving uplink messages #11241

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Changes from all commits
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
9 changes: 9 additions & 0 deletions features/lorawan/lorastack/mac/LoRaMac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,15 @@ void LoRaMac::on_radio_rx_done(const uint8_t *const payload, uint16_t size,
break;

default:
// This can happen e.g. if we happen to receive uplink of another device
// during the receive window. Block RX2 window since it can overlap with
// QOS TX and cause a mess.
tr_debug("RX unexpected mtype %u", mac_hdr.bits.mtype);
if (get_current_slot() == RX_SLOT_WIN_1) {
_lora_time.stop(_params.timers.rx_window2_timer);
}
_mcps_indication.status = LORAMAC_EVENT_INFO_STATUS_ADDRESS_FAIL;
_mcps_indication.pending = false;
break;
}
}
Expand Down