Git Product home page Git Product logo

esp32-at's Introduction

Overview

libat_core.a is AT Command Core, and it is the core of AT command, including the default AT instruction set, the AT command parsing, execution and responding. The lib contains 4 kinds of command, such as AT+TEST=?, AT+TEST?, AT+TEST=โ€œabcโ€ and AT+TEST. It supports custom AT commands based on the lib and related APIs, and ones can also define input and output medium, like uart, spi, socket, bt, etc.

The demo is the AT command set based on uart. You can replace the uart driver with other drivers whichever you want to use. But you have to make some changes in at_task.c. In addition, you can add some custom AT commands in at_custom_cmd like AT+CIUPDATE if necessary.

More details are in documentation esp32_at_instruction_set_and_examples_en.pdf or esp32_at_instruction_set_and_examples_cn.pdf. And if you enable the ethernet commands, please refer to esp32_at_ethernet.md.

Hardware Introduction

The ESP32 Board sends AT commands through UART1 by default.

  • GPIO16 is RXD
  • GPIO17 is TXD
  • GPIO14 is RTS
  • GPIO15 is CTS

The debug log will output through UART0 by default, which TXD0 is GPIO1 and RXD0 is GPIO3, but user can change it in menuconfig if needed.

  • make menuconfig --> Component config --> ESP32-specific --> UART for console output

Notes: Please pay attention to conflict of the pin

  • If choose AT through HSPI, you can get the information of the hspi pin by make menuconfig --> Component config --> AT --> AT hspi settings
  • If enable AT ethernet support, you can get the information of the ethernet pin from ESP32_AT_Ethernet.md.

Compiling and flashing the project

Compiling the esp32-at is the same as compiling any other project based on the ESP-IDF:

  1. You can clone the project into an empty directory using command:
git clone --recursive https://github.com/espressif/esp32-at.git
  • Note the --recursive option! The esp32-at project already has an ESP-IDF as a submodule, which should be used to compile the project, in order to avoid any compatibility issues (e.g. compile failure or running problems, etc.).
  • If you have already cloned the esp32-at without this option, run another command to get all the submodules:
git submodule update --init --recursive
  1. rm sdkconfig to remove the old configuration.
  2. Set the latest default configuration by make defconfig.
  3. make menuconfig -> Serial flasher config to configure the serial port for downloading.
  4. make flash to compile the project and download it into the flash.
  • Or you can call make to compile it, and follow the printed instructions to download the bin files into flash by yourself.
  • make print_flash_cmd can be used to print the addresses of downloading.
  • More details are in the esp-idf README.
  1. make factory_bin to combine factory bin, by default, the factory bin is 4MB flash size, DIO flash mode and 40MHz flash speed. If you want use this command, you must fisrt run make print_flash_cmd | tail -n 1 > build/download.config to generate build/download.config.
  2. If the ESP32-AT bin fails to boot, and prints "ota data partition invalid", you should run make erase_flash to erase the entire flash.
  3. Since we updated the toolchain recently, it is not compatible with the old version. Please use the toolchain we provided in the esp32-at/esp-idf/docs/get-started/linux-setup.rst and esp32-at/esp-idf/docs/get-started/windows-setup.rst to build your ESP32 AT project.

esp32-at's People

Contributors

esp-coco avatar fayey avatar heyinling avatar wujiangang avatar xcguang avatar xiewenxiang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.