Skip to content

An ESP32 CMake based project for gathering data from sensors and send them over to IoT hub to which certificate authentication had been performed. Currently only over Wi-Fi.

Notifications You must be signed in to change notification settings

cima/cima-esp32-azure

Repository files navigation

HW info

Board info

Sesnsor info

SW info

Development Environment

Prerequisities

Install toolchain and libraries

  1. Clone this project somewhere e.g. ./cima-esp32-azure/
  2. Create separate ESP toolchain and libraries folder e.g. ./ESP/
    mkdir ./ESP/
    cd ./ESP/
  1. Clone ESP-IDF to folder from step 2. e.g. ./ESP/esp-idf/
    git clone -b release/v4.0 --recursive https://github.com/espressif/esp-idf.git
  1. Clone ESP-Azure to folder from step 2. e.g. ./ESP/esp-azure/
    git clone --recursive https://github.com/espressif/esp-azure.git
    git submodule update --init --recursive
  1. Clone ESP-IoT-solution from fork cima/esp-iot-solution to folder from step 2. e.g. ./ESP/esp-iot-solution/
    git clone -b feature/ssd1306_generic --recursive https://github.com/cima/esp-iot-solution.git
  1. get Boost via Version 1.71.0 and unpack it to folder from step 2. E.g. ./ESP/boost_1_71_0/

  2. ESP 32 toolchain v4.0 (incl. gcc, cmake, ninja) -- Windows Download esp-idf-tools-setup-2.3.exe see Standard Setup of Toolchain for Windows for more details a. Select your preinstalled GIT and Python b. When asked whether to download or use ESP-IDF select Use an existing ESP-IDF directory an navigate to the folder from step 3. c. When you asked Select Destination Location you can also point to folder from step 2 to have all the toolchain at one place.

  3. Update file init_cmd.bat in this project (from step 1) so the first variable ESP_TOOLCHAIN_DIR contains the absolute prefix of your toolchain directory.

  4. Fisrt build

    init_cmd.bat
    idf.py build

Development

Build & Flash

    idf.py -p COM5 flash

STDOUT over serial line over USB

  1. Plug your Lily GO Oled to USB
  2. Open Putty
  • Connection Type: serial
  • Serial Line COM5 (Based on where your board appears the number can differ)
  • Speed 115200

Wi-Fi Networks, Certificates

  • (./filesystem/connectivity/wifi.json) populate with wi-fi networks where your ESP will operate
  • (./filesystem/connectivity/azure.json) populate with your azure account adresses

TODO: Certificates

  • (./filesystem/identity/)

Dependencies details

ESP 4.0 (beta 2)

    git clone -b release/v4.0 --recursive https://github.com/espressif/esp-idf.git

Azure IoT SDK C for ESP

    git clone --recursive https://github.com/espressif/esp-azure.git
    git submodule update --init --recursive

and define environment variable named AZURE_SDK_C_PATH pointing to the above cloned directory.

BOOST

Misc

Adafruit drivers

Use ESP IoT Solution clone it with all submodules

    git clone --recursive https://github.com/espressif/esp-iot-solution.git
    git submodule update --init --recursive

and define environment variable named IOT_SOLUTION_PATH pointing to the above cloned directory.

In (./CMakeLists.txt) we use a little dirty trick where we only define and use those drives we care of because the rest is highly incompatible with ESP-IDF 4.0.

Deprecated

Arduino like

  • clone with submodules https://github.com/espressif/esp-azure to c:/Users/z608328/AppData/Local/Arduino15/packages/esp32/hardware/esp32/1.0.1/libraries/esp-azure/
  • Adafruit drivers for Arduino
    • Patch adafruit driver

About

An ESP32 CMake based project for gathering data from sensors and send them over to IoT hub to which certificate authentication had been performed. Currently only over Wi-Fi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages