Arm Mbed OS support forum

Adding ESP32 as a module

Hi,
I have trouble adding ESP32 module to an nRF52840 based system. What I’m trying to do is adding the ESP32 module as a network interface to mbed and communicate via WiFi. The ESP is connected via UART connection.

As a build target I use NRF52840_DK and I can build and run firmware on it. However, I don’t get the ESP32 module working.

What I did so far:

  1. Added esp32-driver library (GitHub - ARMmbed/esp32-driver) to project. From the build output I can see that the library is compiled.

  2. I configured esp32-driver library for my build target in mbed_lib.json to assign the ESP32 pins to the correct pins on nRF52840 in the “target_overrides” block.

  3. I added “target.components_add” : [“esp32”] to my target in the “target_overrides” block in mbed_app.json

However, I always get the following message in debug output: Error! No network interface found.

Does anybody have any clue how to debug what’s going wrong here?
I’m pretty new to mbed OS and chances are that I’m missing something fundamentally.

Thank you,
Dominik

Hi,

My guess is to add following line in your mbed_app.json.

"esp32.provide-default"                 : true,
1 Like

Thank you MACRUM! I got it to work.
Here’s the target_overrides block in mbed_app.json I had to modify:

"target_overrides": {
        "*": {
            "nsapi.default-wifi-security": "WPA_WPA2",
            "nsapi.default-wifi-ssid": "\"SSID\"",
            "nsapi.default-wifi-password": "\"PASSWORD\"",
            ...
        },
        "MY_TARGET": {
            "target.network-default-interface-type": "WIFI",
            "target.components_add" : ["esp32"],
            "esp32.provide-default": true
        }
    }
2 Likes