Skip to content

Commit e9a20cc

Browse files
PavelVPVcarlescufi
authored andcommitted
Bluetooth: Mesh: Restart timer after sending PDU to RPR Server
This commit fixes an issue where the RPR Client gets stuck after sending PDU to RPR Server (even with segmented flag), but doesn't hear anything back from the server. Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent 3a0fa86 commit e9a20cc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

subsys/bluetooth/mesh/rpr_cli.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ static void pdu_send_end(int err, void *cb_data)
405405

406406
link_closed(cli,
407407
BT_MESH_RPR_ERR_LINK_CLOSED_AS_CANNOT_SEND_PDU);
408+
return;
408409
}
410+
411+
k_work_reschedule(&cli->link.timeout, K_SECONDS(cli->link.time));
409412
}
410413

411414
static const struct bt_mesh_send_cb pdu_send_cb = {
@@ -465,8 +468,8 @@ static void link_closed(struct bt_mesh_rpr_cli *cli,
465468
.state = BT_MESH_RPR_LINK_IDLE,
466469
};
467470

468-
LOG_DBG("0x%04x: status: %u state: %u", srv.addr, link.status,
469-
link.state);
471+
LOG_DBG("0x%04x: status: %u state: %u rx: %u tx: %u", srv.addr, link.status,
472+
cli->link.state, cli->link.rx_pdu, cli->link.tx_pdu);
470473

471474
link_reset(cli);
472475

@@ -626,6 +629,7 @@ static int link_close(struct bt_mesh_rpr_cli *cli,
626629
link_reset(cli);
627630
}
628631

632+
k_work_reschedule(&cli->link.timeout, K_SECONDS(cli->link.time));
629633
return err;
630634
}
631635

0 commit comments

Comments
 (0)