The ESP FreeRTOS CoreMQTT is based on coreMQTT and enables users to connect their ESP32 based devices to any MQTT broker. It provides some examples which can help understand most common use cases.
You will basically just need a development host and an ESP32 development board to get started.
This project is to be used with Espressif's IoT Development Framework, ESP IDF. Follow these steps to get started:
- Setup ESP IDF development environment by following the steps here.
- In a separate folder, clone the esp-freertos-coremqtt project as follows (please note the --recursive option, which is required to clone the various git submodules required by esp-freertos-coremqtt)
$ git clone --recursive https://github.com/espressif/esp-freertos-coremqtt.git
Note that if you ever change the branch or the git head of either esp-idf or esp-freertos-coremqtt, ensure that all the submodules of the git repo are in sync by executing
git submodule update --init --recursive
To monitor activity on your ESP device, run:
$ make monitor
-
Some common problems can be fixed by disabling the firewall.
-
You can try with the followings, if your build fails:
$ git submodule update --init --recursive
- Check the compiler version and verify that it is the correct one for your ESP IDF version.
- Check if the IDF_PATH is set correctly
- Clean the project with
make clean
and if required, usingrm -rf build sdkconfig sdkconfig.old