espressif - modrpc/info GitHub Wiki

Table of Contents




ESP Hardware



Using ESP


 $ pip install pyserial
 $ python -m -v
 $ python -m /dev/ttyUSB0  



  • Lua-based shell



  • elf2image:
    • --chip esp8266 elf2image my_app.elf
    • flash mode
      • --flash_mode qio: quad flash I/O
      • --dual_mode dio: dual flash I/O
    • flash frequency: clock frequency for SPI flash interactions
      • -flash_freq [keep|40m|26m|20m|80m]
  • write_flash: Writing binaries to flash
    • --port /dev/ttyUSB0 write_flash --flash_mode qio --flash_size 32m 0x0 bootloader.bin 0x1000 my_app.bin
      • GPIO0를 GND로 해야 flash가 가능함 (two pins 쪽의 jumper setting -- NOT three-pins 쪽)
      • Flash 한번 할 때마다 power off/on
  • verify_flush:
    • verify_flash 0x40000 my_app.elf-0x40000.bin
  • Manually assembling a firmware image
    • --chip esp8266 make_image -f app.text.bin -a 0x40100000 -f -a 0x3ffe8000 -f app.rodata.bin -a 0x3ffe8c00 app.flash.bin
  • flash_id:
    • sudo --port /dev/ttyUSB0 --baud 115200 flash_id
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4014
Detected flash size: 1MB



  • 파란 LED가 깜빡이는 것은 UART rx/tx 가 일어나고 있다는 것
    • 부트 후 계속 깜빡이면 74880 baud로 terminal 연결 (esp8266은 74880으로 boot log를 보냄)

ESP Software


  • A bundle of utilities and device-level APIs for ESP8266/ESP32
  • Precompiled libraries and ready-to-compile driver libraries
  • NON-OS version or RTOS version
    • NON-OS SDK
      • Non-OS SDK API reference
      • Uses timers and callbacks as the main mthoeds for performing functionssuch as nested events and functions triggered by certain conditions.
      • espconn interface: add callbacks for network events
    • RTOS SDK
      • RTOS SDK API reference
      • Based on FreeRTOS -- multi-tasking OS
        • resource management
        • recycling operations
        • execution delays
        • inter-task messaging and synchronization
        • supports other task-oriented process design approaches
      • For networking, users directly use socket interface (no callback) in lwIP API.
      • cJSON library to make it easy to parse JSON packet

SDK Libaries

  • libairkiss.a:
  • libat.a:
  • libcrypto.a:
  • libdriver.a:
  • libwip.a, libwip_536.a:
  • libmain.a:
  • libmesh.a:
  • libnet80211.a:
  • libphy.a:
  • libpp.a:
  • libpwm.a:
  • libsmartconfig.a:
  • libssl.a:
  • libupgrade.a:
  • libupgrade.a:
  • libwpa.a, libwpa2.a:
  • libwps.a:


  • On top of ESP-SDK has AT processor (with a set of AT commands) to interact with ESP8266/ESP32


  • Non-OS Mesh API reference
  • ESP nodes can establish a network and forward packets. Allows a large number of nodes to connect to the internet without any change to router (typically routers have maximum limit of 32 nodes)


  • Implements SmartConfig technology to help connect ESP8266EX-devices to WiFi network through simple configuration on a smartphone


  • Allow devices to communicate without using Wi-Fi. Same 2.4GHz wireless connectivity often used in wireless mice.
  • Pairing between devices needed prior to communication. After pairing is done, connection is persistent, peer-to-peer, no handshake required.

Espressif IoT APP

Other Software



⚠️ ** Fallback** ⚠️