AT commands parser for ESP8266

Hello everyone,

ESP8266 with AT commands software from Espressif is now more stable than every, so I’m thinking to make a “strong” AT commands parser library for STM32 series of microcontrollers. If there well be an interest, I can do a generic library (like FATFS) to make usable on others microcontrollers too.

So I’m thinking about these commands:

  • Basic commands for settings up ESP module, including UART settings, Wifi name and more
  • Basic AT commands for setting up ESP mode (multi connection, STA mode, etc)
  • Basic AT commands for wifi manipulation (searching WIFI stations, connection to station)
  • AT commands for CLIENT connecting to web browser
  • AT commands for SERVER receiving web browser

Supported AT command SDK version would be at least 1.5.0 with dedicated generated .bin files for it.

Let me know your thoughts.


Library is available for download here.


Owner of this site. Also electronic enthusiasts, web developer, 3D printer fan, handball player and more. Big fan of STM32F4 devices. In anticipation of the new Discovery board for STM32F7 lines.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!
  • ZenMaster

    That would be quite awesome!

    • Library is ready, and posted on website, if you want it,

      • abhilash

        Can you provide me code for interfacing stm32f407 and esp 8266-01?

  • Vince Keiper

    I am about to write a driver for this IC for one of my projects that is using the STM32F429. I will be starting it within the next couple weeks. I would not mind sharing my work with you, maybe we could collaborate on the effort. This is a side project (non work related) so I could share my source code.

    • Well, Ive already started with development. Have some basic things like server enable, mux set, detecting connected/disconnected from network and getting IP.

      So if you dont mind, I would like to hear more about your coding plan. Please use email where we can talk more, privately.

      • Vince Keiper

        sure, my email address is

        The mile high view:
        Ultimate goal is a WiFi (tcp socket) to CANbus gateway.
        However, the CANbus portion is not part of this driver.

        I am looking to implement tcp socket client and server, in same driver and compile time macros to select perspective.
        I also need a basic web page, mainly for configuration and status monitoring.

      • Hashim

        I am about to start work on this..Want to update data to cloud. Could you share your present code with me to start with me.

  • Jiří Šrámek

    I have written a driver for this device (SDK 1.5) on STM32F4 Discovery which implements basic commands as well as AP/STA mode and working server (or client). Also, fully compatible with HAL. If you would like, I can share this code with you.

    • That wouod be great. have blocking commands or not? Send to my email:

      • Vaclav Zajic

        Hello, could you send it to my address I tried to look at but it is currently not accessible. Thanks, Vaclav

  • Murtaz Naqvi

    When it will be ready??

    • Technically it is ready almost, just I’m facing problems because ESP AT commands software is not stable yet.
      Sometimes, module just crashes without reason.

      • Murtaz Naqvi

        Can u plz send it to me i need it urgently plz

  • samit

    Can you provide a description of ESP8266 that- what the whole code provided by you is doing

    • Basically it can do everything you can do with AT commands from Espressif systems.
      Description found on link in main menu.

  • Mario Toma

    Hi Majerle,

    I downloaded the STM32Fxxx libraries have to operate a module of a ESP8266-01 with STM32F746G-DISCO board. But when I start the program and call the Init function (ESP8266_Init) then return “Device not connected” result.

    I connected the module D0 and D1 pin to the arduino device (PC6 and PC7). I’m using Pinpack 1 (USART6). I connected the ESP8266 reset pin to A0 pin (PA0), because I saw in your library that you use it for reset.

    Do you have any idea what is the problem? Did I connected incorrectly

    Thank you in advance for your help!

    Good day!


    • I’m sure you got garbage since you did not check for PLL configuration.

      • Mario Toma

        Maybe, but I think all ok, because the PLL_M = 25, PLL_N
        = 400 and PLL_P = 400 = 2, so the processor go to 200 MHz (HSE = 25 MHz) and
        all other work that way. I need to set something else in order to properly run
        the USART? Sorry, my English is not good?

      • Mario Toma

        Maybe, but I think all ok, because the PLL_M = 25, PLL_N
        = 400 and PLL_P = 400 = 2, so the processor go to 200 MHz (HSE = 25 MHz) and
        all other work that way. I need to set something else in order to properly run
        the USART? Sorry, my English is not good.

        • HSE_VALUE is set to? PLL_P = 400?

          Yes, your english is bad.

          • Mario Toma

            Excuse me, I’m Italian and I work in Budapest, but the English language has not yet been learned.
            Anyway, yes, it is set HSE_VALUE: (uint32_t) 25000000 in the system_stm32f7xx.c library.

          • So you are often in Slovenia 😉
            This could look ok. You can go to debug and check what is the actual frequency.

          • Mario Toma

            All right, I’ll try, thank you very much.
            If I can not then bother you again.
            Otherwise, I will go to Ljubljana for when I go to my parents, and Slovenia are very beautiful country! 🙂

  • GoBen

    hey tilen, your libs are always so good
    But when I used this library to get my ESP8266 module to work, it seems like something went wrong:
    here is the output (on my terminal):
    ESP8266 commands parser; Compiled: Dec 2 2016 11:11:08
    ESP Init error. Status: 1
    Problems trying to connect to network: 1
    Server mode is enabled. Try to connect to to see the magic
    Can you suggest me how to fixed this?

    • Version number, what example you used? Everything is relateed. What is your setup, etc.
      Software version on ESP8266. Maybe you did not check documentation for supported AT version from Espressif?

    • vm

      i am also getting the same problem. Do you find the solution to this ??

  • abhilash

    Can you provide code for interfacing ESP8266-01 and STM32F407?

  • vm

    Hello sir while using your AT commands parser for esp8266 on stm32f429 discovery board i am getting this as error on hyper terminal

    ESP8266 commands parser; Compiled: Jun 17 2017 17:31:16
    ESP Init error. Status: 1
    Problems trying to connect to network: 1

    kindly help sir how to solve this.
    i have checked the wiring connection they are correct.

    • Something is not correctly connected or baudrate is not maching. This is my first guess here.

      • vm

        when i checked the device on terminal i get AT+RST transmitted by stm32f429 disco board and i think device getting reset again and again.

        • At+GMR

          Hi, I also have this problem.
          I get the same results.
          Controller : STM32F302
          ESP: Wroom – 02 Module
          SW Version: AT version 1.3.0
          SDK Version: 2.0.0

          • It does not care about hardware. It is important that latest AT software is uploaded. AT2.1.0 is latest, not 1.3.0

          • vm

            Hello sir i think lots of people are getting this same problem, i think you should check the code once again sir. or help us something like what we should do now further to make code work.


          • Hello, so far only 2 of them are having this problem.. Device is getting reset because there is no response from device to STM32.

  • vipin mishra

    Hello Majerle,
    I have always used your library for STM32 projects and they are very good to develop any application,Thanks for all the post you have shared on various topics.

    Recently i am using your ESP8266-01 At command parser library with Nucleo 401 and i have changed all low level drivers and but i am unable to get any response from the ESP8266, it remains idle.
    I am using SDK Version 2.1.0 and AT version 1.4.0 ,it is the latest present in Espressif website .
    I have also used AT+CIUPDATE to update it using the server and i found all the 4 message
    +CIPUPDATE :1….4 and after that some gibberish value in between.. for all small letter it gives me gibberish value and in between i have found the SDK Version and other esp8266 related things in between of these gibberish message.

    But still i am not getting any response when i use the library ,it stucks at __IDLE(ESP);.

    Please let me know what i need to do to make work ESP8266-01 with STM32F401 or any other as i have STM32F407 board also.

    I am also attaching image of the Flash bin that i have used to update the ESP8266 Firmware.

  • sgtpepper

    Hi! I’m having trouble trying use the library.
    I have succesfully ported it to stm32f4 using Hal libraries built with Stm32CubeMX. I’m able to connect AP, Update the firmware of ESP and execute nearly all other commands. However, when trying to open TCP-connection, it never sends the command through UART. The last message in uart is CIPSTATUS which returns STATUS:2.

    I’m trying to debug and find the reason for this. Stacktrace is as follows: main->esp_conn_start->return_blocking->esp_waitready->esp_update->processthreads. This particular trace is at randomly paused moment, however it never exits the esp_waitready function.

    You have any ideas?

    • I would like to know more about your setup, RTOS/noRTOS, configuration, etc.

      • sgtpepper

        No RTOS, timeout is with SystickIRQ, reading is with usartIRQ. Other than that, I configured as in example ClientPT. No-async, singleconn.

  • Arun


    I have successfully tested the esp8266 in Keil with STM32F429ZI-Nucleo board,

    but I am trying to use Coocox CoIDE for our further development,

    I am using EXAMPLE_SERVER_PT (with out RTOS) and trying to ESP_INIT function

    But in CoIDE I am finding PT_THREAD is in continuous loop and not going to TM_UART_SEND code

    and ESP8266 not initalizing.

    I am using the Cube library generated from CoIDE and only added ESP and STM32 library

    Please help

    I have tested the UART of ESP8266 in the CoIDE project and ESP8266 is responding for commands successfully.

    Please help


    • gousebasha shaik

      Hi arun,
      I am getting confusion with connecting esp8266 module with stm32 nucleo.
      Please suggest with proper text.

      • Arun

        I have connected ESP8266 module with RX, TX to a UART channel and a GPIO PA4 or any other to RESET pin.
        These changes need to be done in esp8266_ll.c
        with the UART Interrupt Handler definition properly done.
        and the sample project works

        Please reply if any further details.

        • gousebasha shaik

          I am also used uart protocol, and I have connected esp8266 with stm32 Nucleo. But i dont have anu esp8266_II.c files.
          Please suggest me with proper code.

          • gousebasha shaik

            Can you please send me any link regarding library files esp8266.
            Or else mail me to this email id

  • Sahbi Lahmar

    Hello,I’m trying to cnnect the esp8266 module to my stm32f429I discovery board but it looks that the library is not more available when click on the link it appears a blank page can you help me please !

  • gousebasha shaik

    Hi Majerle,
    Here I am trying to connect esp8266 with stm32 Nucleo. And i used uart interface. I am not having esp8266 library files. Please suggest me with proper files and links.
    Thank you,