6

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 ?

  • 1
    The 'Update (Solved !)' section should really be submitted as an answer - you are allowed and in fact encouraged to answer your own questions on stack exchange. – AJMansfield May 22 '18 at 15:28
2

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):

Unfortunately the updated firmware versions require Carriage-Return-and-New-Line line endings and there appears to be no way to configure screen to send both with one key press. Instead, you need to press or Ctrl-M then follow that with Ctrl-J.

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" to minicom.

I still do not see the cmd> prompt in minicom, but this is not an issue... Maybe this prompt does not appear in all versions of minicom (I am using 2.7).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.