Friday, August 24, 2018

NodeMCU AT commands

Firmware's

ESP 8266 has few firmware options

  • AT+command (default)
  • NodeMCU
  • Custom Firmware (using the Arduino IDE)

In this tutorial we will flash AT FW with esptool and use Arduino Serial monitor to send AT commands

Connect NodeMCU and use Arduino serial monitor to send AT commands

  • Flash AT firmware
  • Connect with arduino
  • from arduino serial monitor send commands

Connect device to usb port

Note: in linux no additional driver need to be install, CP2102 is recognized without the need for installing drivers

  • dmesg output
usbserial: USB Serial support registered for cp210x cp210x 3-1:1.0: cp210x converter detected usb 3-1: cp210x converter now attached to ttyUSB0

Flush default firmware (AT support)

  • download default FW FW location
  • download flashing tool (esptool)

run esptool to flash FW

python esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ~/Downloads/v1111ATFirmware.bin

Usag and run.

  • Use Arduino IDE

  • Config arduino serial monitor

    • set baud rate: 115200
    • set Both NL & CR
  • Run AT commands(AT+)

AT OK AT+GMR AT version:0.25.0.0(Jun 5 2015 16:27:16) SDK version:1.1.1 Ai-Thinker Technology Co. Ltd. Jun 23 2015 23:23:50 OK

Reference

No comments: