espressif / esp-mdf

Espressif Mesh Development Framework, limited maintain, recommend to use https://github.com/espressif/esp-mesh-lite
Other
774 stars 253 forks source link

ESP-WIFI-MESH Development Framework [中文]

Documentation Status

ESP-MDF, or Espressif Mesh Development Framework, is a development framework for ESP-WIFI-MESH, a networking protocol built on top of the Wi-Fi protocol. ESP-MDF is based on the ESP32 chip.

Matters need attention

  1. This version of MDF is based on the IDF master branch and is not recommended for product development. If you need a stable version of MDF, please use branch release/v1.0.
  2. ESP-MDF master branch already supports ESP32S2, but some example can not build and run on ESP32S2 now. We will support these in the future. They are:
    • function_demo/mconfig
    • development_kit/buddy
    • development_kit/button
    • development_kit/light
    • development_kit/sense
    • wireless_debug

Overview

ESP-MDF is based on the ESP-WIFI-MESH protocol stack to facilitate your development of ESP-WIFI-MESH. ESP-MDF provides the following features:

Framework

ESP-MDF consists of Utils, Components and Examples (see the below figure). Utils is the encapsulation and third-party library of ESP-IDF APIs. Components are the ESP-MDF functional modules that use Utils APIs. Examples are the ESP-WIFI-MESH solutions based on the Components.

You first need to read ESP-WIFI-MESH Communication Protocol and ESP-MDF Programming Guide and research and learn about ESP-WIFI-MESH through the ESP32-MeshKit development kit. Secondly, based on Function demo for your project development, when you can encounter problems in development, you can first go to BBS and Issues to find out if a similar problem already exists. If there is no similar problem, you can also ask directly on the website.

Development Boards

ESP32-MeshKit Development board

ESP32-MeshKit offers a complete ESP-WIFI-MESH Lighting Solution (see the below figure), complemented by ESP-Mesh App (iOS version and Android) for research, development and better understanding of ESP-WIFI-MESH.

ESP32-MeshKit Light

ESP32-MeshKit Sense

ESP32-Buddy Development board

ESP32-Buddy is a development board specifically designed to test the development of ESP-WIFI-MESH. With its small size and USB power input, the board can be conveniently used for testing a large number of devices and measure distances between them.

Quick Start

This section provides the steps for quick start with your development of ESP-MDF applications. For more details, please refer to ESP-IDF Get Started.

The directory ~/esp will be used further to install the compiling toolchain, ESP-MDF and demo programs. You can use another directory, but make sure to modify the commands accordingly.

  1. Setup Toolchain: please set up according to your PC's operating system (Windows, Linux or Mac OS). If you use linux, you can use this commands.

    git clone -b v4.3.1 --recursive https://github.com/espressif/esp-idf.git
    cd ~/esp/esp-idf
    ./install.sh
    . ./export.sh
  2. Get ESP-MDF:

    git clone --recursive https://github.com/espressif/esp-mdf.git

    If you clone without the --recursive option, please navigate to the esp-mdf directory and run the command git submodule update --init

  3. Set up ESP-MDF Path: Toolchain uses the environment variable MDF_PATH to access ESP-MDF. The setup of this variable is similar to that of the variable IDF_PATH. Please refer to Add IDF_PATH & idf.py PATH to User Profile. If you use linux, you can use this commands.

    cd ~/esp/esp-mdf
    export MDF_PATH=~/esp/esp-mdf
  4. Start a Project: The word project refers to the communication example between two ESP-WIFI-MESH devices.

    cp -r $MDF_PATH/examples/get-started/ .
    cd  get-started/
  5. Build and Flash: For the rest, just keep the default configuration untouched.

    idf.py menuconfig
    idf.py -p [port] -b [baudrate] erase_flash flash
  6. Monitor/Debugging: If you want to exit the monitor, please use the shortcut key Ctrl+].

    idf.py monitor
  7. Update ESP-MDF:

    cd ~/esp/esp-mdf
    git pull
    git submodule update --init --recursive

ESP-WIFI-MESH Highlights

Related Documentation