I am trying to use minicom
to communicate with an ESP8266 Wifi chip using AT commands. I log into minicom
and I type command "AT". The normal answer of the chip would be to send "OK" back to minicom
. However, after typing "AT", once I type "Enter" the cursor goes back to the beginning of the line and nothing happens. It is as though the command had not been sent.
I log into minicom
with
sudo chmod a+rwx /dev/ttyUSB0
sudo minicom -D /dev/ttyUSB0 -b 115200
In the Arduino IDE Serial Monitor, I am able to communicate with the chip by setting baud = 115200 and "Both NL & CR". When sending command "AT", the chip sends back answer "OK". I am trying to reproduce the same in minicom
.
Any idea why the command doesn't get sent ?
Update
I saw in many minicom
tutorials that command prompt cmd>
should appear. Yet it does not appear on my screen. Maybe this is an indication that minicom
is only in "listening" mode, and not in "waiting for command from the user" mode ?
Moving the OP answer to an actual answer:
Ok so the trick seems to be to type a command in
minicom
(here the man page), then type Enter, then press CTRL + J.I found the following tip (related to the same issue in utility
screen
) in this ESP8266 quick start guide (here the datasheet):In other words, the ESP8266 expects to see CR-NL after each command. When typing "Enter" in the
minicom
window, it sends character Carriage-Return (CR). This is why my cursor goes back to the beginning of the line. Then by typing Ctrl-J, it sends the New-Line (NL, AKA LF) character. The cursor moves to the next line and the ESP8622 understands the instruction, thus sending back "OK" tominicom
.I still do not see the
cmd>
prompt inminicom
, but this is not an issue... Maybe this prompt does not appear in all versions ofminicom
(I am using 2.7).