Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit fcfef93

Browse files
committed
esp32/lteppp: Don't send CR each time when invoking "lteppp_send_at_cmd"
@larox11 found this an when trying to send AT+CSIM commands longer than 500 bytes to the modem. As the buffer behind this method is only 127 bytes long and the strcmp was evaluated erroneous, this stopped users sending longer commands in several chunks.
1 parent 2037465 commit fcfef93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esp32/lte/lteppp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static bool lteppp_send_at_cmd_exp (const char *cmd, uint32_t timeout, const cha
658658
// uart_read_bytes(LTE_UART_ID, (uint8_t *)tmp_buf, sizeof(tmp_buf), 5 / portTICK_RATE_MS);
659659
// then send the command
660660
uart_write_bytes(LTE_UART_ID, cmd, cmd_len);
661-
if (strcmp(cmd, "+++")) {
661+
if (!strcmp(cmd, "+++")) {
662662
uart_write_bytes(LTE_UART_ID, "\r", 1);
663663
}
664664
uart_wait_tx_done(LTE_UART_ID, LTE_TRX_WAIT_MS(cmd_len) / portTICK_RATE_MS);

0 commit comments

Comments
 (0)