Skip to content

Commit 10c269b

Browse files
author
Kimmo Vaisanen
committed
Add some debug traces
1 parent f6decc0 commit 10c269b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

features/lorawan/LoRaWANStack.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ void LoRaWANStack::mcps_indication_handler(loramac_mcps_indication_t *mcps_indic
557557
{
558558
if (mcps_indication->status != LORAMAC_EVENT_INFO_STATUS_OK) {
559559
if (_callbacks.events) {
560+
tr_error("RX_ERROR: mcps_indication status = %d", mcps_indication->status);
560561
const int ret = _queue->call(_callbacks.events, RX_ERROR);
561562
MBED_ASSERT(ret != 0);
562563
(void)ret;
@@ -638,6 +639,7 @@ void LoRaWANStack::mcps_indication_handler(loramac_mcps_indication_t *mcps_indic
638639
// that we could retry a certain number of times if the uplink
639640
// failed for some reason
640641
if (_loramac.get_device_class() != CLASS_C && mcps_indication->fpending_status) {
642+
tr_debug("Pending bit set. Sending empty message to receive pending data...");
641643
handle_tx(mcps_indication->port, NULL, 0, MSG_CONFIRMED_FLAG, true);
642644
}
643645

@@ -647,6 +649,7 @@ void LoRaWANStack::mcps_indication_handler(loramac_mcps_indication_t *mcps_indic
647649
// but version 1.1.0 says that network SHALL not send any new
648650
// confirmed messages until ack has been sent
649651
if (_loramac.get_device_class() == CLASS_C && mcps_indication->type == MCPS_CONFIRMED) {
652+
tr_debug("Acknowledging confirmed message (class C)...");
650653
handle_tx(mcps_indication->port, NULL, 0, MSG_CONFIRMED_FLAG, true);
651654
}
652655
} else {

0 commit comments

Comments
 (0)