ESP32 AT commands work in py-miniterm, but not in other terminal programs

Dominykas Litvaitis
Posts: 2
Joined: Tue Mar 18, 2025 6:53 pm

ESP32 AT commands work in py-miniterm, but not in other terminal programs

Postby Dominykas Litvaitis » Tue Mar 18, 2025 7:07 pm

I have a ESP32E with AT commands enabled. When I connect to the ESP32 with pyserial-miniterm, I am able to get this code to work:

First example:

AT+CIPSTART="SSL","www.esp32.com",443
AT+CIPSEND=88

GET index.php HTTP/1.1
Host: www.esp32.com
Connection: close
Second example:

AT+CIPSTART="TCP","api.openweathermap.org",80
AT+CIPSEND=87

GET /data/2.5/weather?q=London,uk&APPID=fbd756d6387c660e650b533ff585c70e&units=metric
With those 2 examples, I get the HTTP data of the webpage and the weather data (second example). Miniterm EOL is CR+LF.

When I try Hercules program on PC, this works:

AT+CIPSTART="TCP","api.openweathermap.org",80$0D$0A
AT+CIPSEND=87$0D$0A
GET /data/2.5/weather?q=London,uk&APPID=fbd756d6387c660e650b533ff585c70e&units=metric$0D$0A
This on Hercules also works:

AT+CIPSTART="SSL","www.esp32.com",443$0D$0A
AT+CIPSEND=37$0D$0A
GET index.php$0D$0A
But in Hercules, I cant make this code work:

AT+CIPSTART="SSL","www.esp32.com",443
AT+CIPSEND=88

GET index.php HTTP/1.1
Host: www.esp32.com
Connection: close
I also tried with the $0D$0A at every line, still timeout.

I also tried Coolterm, this works:

AT+CIPSTART="TCP","api.openweathermap.org",80
AT+CIPSEND=87

GET /data/2.5/weather?q=London,uk&APPID=fbd756d6387c660e650b533ff585c70e&units=metric
But on Coolterm, this does not work:

AT+CIPSTART="SSL","www.esp32.com",443
AT+CIPSEND=84
GET index.php HTTP/1.1
Host: www.esp32.com
Connection: close
In coolterm, the whole situation:

AT+CIPSTART="SSL","www.esp32.com",443
CONNECT

OK
AT+CIPSEND=84

OK

>
Recv 84 bytes

SEND OK

+IPD,170:HTTP/1.1 408 Request Timeout
Date: Sun, 16 Mar 2025 11:09:39 GMT
Server: Apache
Content-Length: 221
Connection: close
Content-Type: text/html; charset=iso-8859-1



+IPD,221:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>408 Request Timeout</title>
</head><body>
<h1>Request Timeout</h1>
<p>Server timeout waiting for the HTTP request from the client.</p>
</body></html>

CLOSED
As you see, I dont get the data back. Coolterm EOL:0D 0A

All in all, I believe the problem is somewhere with the EOL characters and the length of the message. This is what I tried:

Trying multiple CIPSEND lengths to fit new characters, new EOL characters, so in the finale I always get "SEND OK".
Tried multiple programs, I can try more, but I see that the problem is not with the AT commands themselves.
I tried adding multiple $0D$0A to every line, on both programs and different combinations of $0D$0A, but still timeout.
So yeah, I just want to have an ESP32 WIFI module I could add to any board and be able to communicate/send commands to it with any MCU. That is why I want AT commands.

esp-at
Espressif staff
Espressif staff
Posts: 335
Joined: Mon May 09, 2022 3:00 am

Re: ESP32 AT commands work in py-miniterm, but not in other terminal programs

Postby esp-at » Thu Mar 20, 2025 9:01 am

Hi, i don't think it is the issue about esp-at. it seems to be somethings with serial tool.

As an aid to debugging, you can turn on AT logs to see what is happening.

Code: Select all

python build.py menuconfig > Component config > Log output > Info (Or above Info)
python build.py menuconfig > Component config > AT > Enable ESP-AT Debug
python build.py menuconfig > Component config > AT > Enable ESP-AT Debug > Logging the data sent from AT to MCU (AT ---> MCU)
python build.py menuconfig > Component config > AT > Enable ESP-AT Debug > Logging the data sent from AT to MCU (AT ---> MCU) > The maximum length of the data sent from AT to MCU to be logged > 8192
python build.py menuconfig > Component config > AT > Enable ESP-AT Debug > Logging the data received by AT from MCU (AT <---- MCU)
python build.py menuconfig > Component config > AT > Enable ESP-AT Debug > Logging the data received by AT from MCU (AT <---- MCU) > The maximum length of the data received by AT from MCU to be logged > 8192
The AT log port output should give more logs.

Who is online

Users browsing this forum: Bytespider and 1 guest