Skip to content

Commit d239cae

Browse files
committed
applications: serial_lte_modem: Drop AT responsed to closed DLCI
If DLCI channel for AT commands has been closed, avoid sending data to the pipe. Channel is resumed once remote end connects to the DLCI channel. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
1 parent 4c623e6 commit d239cae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

applications/serial_lte_modem/src/slm_cmux.c

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ static void init_dlci(size_t dlci_idx, uint16_t recv_buf_size,
114114

115115
static int cmux_write_at_channel(const uint8_t *data, size_t len)
116116
{
117+
if (cmux.dlcis[cmux.at_channel].instance.state != MODEM_CMUX_DLCI_STATE_OPEN) {
118+
return 0;
119+
}
120+
117121
int ret = modem_pipe_transmit(cmux.dlcis[cmux.at_channel].pipe, data, len);
118122

119123
if (ret != len) {

0 commit comments

Comments
 (0)