Skip to content

ESP32-DevKitC with BG96#

Integrate your ESP32-based device with Quectel BG96 module to manage it via Coiote IoT DM.

Prerequisites#

  • An ESP32 device.
  • A BG96 module with internet connection (it is strongly recommended to have a BG96 with firmware version BG96MAR03A06M1G).
  • Installed ESP-IDF and dependencies (installation steps 1-4 from ESP32 official documentation). Supported ESP-IDF version is v4.4.
  • A user with access to the Coiote IoT Device Management platform.

Step 1: Prepare project#

  1. Create a project directory for the integration.
  2. Open a command line interface and run git clone https://github.com/AVSystem/Anjay-esp32-client --recursive.
  3. Run . $HOME/esp/esp-idf/export.sh and idf.py set-target esp32.
  4. Open the menuconfig with the idf.py menuconfig command, navigate to Component config -> anjay-esp32-client.
    • In Choose targeted development board, select ESP32-DevKitC and derivatives from the list of supported boards.
    • In Choose an interface, select External BG96 module.
    • In BG96 module configuration, specify the UART port, Tx pin and Rx pin for the BG96 module. Example port and pin numbers are provided in the screenshot below. BG96 UART example configuration
    • In Client options, provide device credentials and Server URI:
      • Endpoint name - your device endpoint name
      • Server URI - the address and port of your Coiote IoT DM installation, e.g. coaps://eu.iot.avsystem.cloud:5684
      • Security mode - the PSK security mode
      • PSK configuration - the PSK identity and PSK key
    • In the Connection configuration, set APN name to internet for the sake of this tutorial. However, APN name depends on your SIM card operator.
    • Press s on the keyboard to Save the configuration.

Step 2: Connect BG96 module to a ESP32-DevKitC#

  1. Connect the Tx, Rx and GND pins, respectively, to the ESP32-DevKitC pins selected in the previous step.

Step 3: Add device to Coiote IoT DM#

To connect your ESP32-DevKitC to the Coiote IoT Device Management platform, use your access to a Coiote IoT DM installation, or register at https://eu.iot.avsystem.cloud/ to get access.

To connect the board, log in to the platform and follow onboarding guide.

Step 4: Flash ESP32-DevKitC#

  1. Open the command line interface, go to your project directory, and run idf.py flash monitor.

Next steps#

If you want to develop your own LwM2M-enabled application based on ESP32, check Anjay-esp32-client and start prototyping!