This Demo App is based on the console example from ESP-IDF, which can be found here relative to the ESP-IDF SDK root folder:
examples/system/console/advanced/
This application includes an option to send Memfault data over MQTT. This option requires a few extra pieces to set up. You can either follow the steps outlined here or use your own MQTT setup.
- Install a local installation of Cedalo by following the installation guide
- Login to Cedalo at http://localhost:8088
- Create a new client login for the device
- Ensure device client has the "client" role to allow publishing data
- Create a new client login for the Python service
- Ensure Python service client has "client" role to allow subscribing to data
- Modify the script found in Docs->Best Practices->MQTT
with Memfault with the the following:
- The service client login information previously created
- Connection info for your local broker
- Map of Memfault projects to project keys
- Start the service by running
python mqtt.py
- Make the following modifications to
main/app_memfault_transport_mqtt.c
:- Update
MEMFAULT_PROJECT
macro with your project's name - Update
s_mqtt_config
with your setup's IP address, and MQTT client username and password
- Update
- Clean your existing build with
idf.py fullclean && rm sdkconfig
- Set your target:
idf.py set-target <esp32_platform_name>
- Build your image:
idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.mqtt" build
- Flash to your device using
idf.py flash