include esp8266 shield in Zephyr project

Dear, I need to upload data to w website using nRF5340DK. I decided to use NodeMCU V3, which has ESP8266. The related queires are:

1. How to include and use esp8266 shiled  in existing Zephyr project ?

2. How to include HTTP support and related library to upload dat using POST command ?

  • Dear Gulzar,

    1. In your project's CMakeLists.txt, add this line: set(SHIELD esp_8266_arduino) .

    The order of the lines is of importance. Your file will look something like this:

    # SPDX-License-Identifier: Apache-2.0
    
    cmake_minimum_required(VERSION 3.20.0)
    
    set(SHIELD esp_8266_arduino)
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(lvgl)
    
    FILE(GLOB app_sources src/*.c)
    target_sources(app PRIVATE ${app_sources})

    More documentation for the ESP8266 shield.

    Please see the note:

    "Sometimes boards declare standard headers like Arduino R3 but not define all connections. Make sure that the board you are using have all definitions to avoid build errors."

    I have not checked whether your board deviates from the standard.

    In your project's prj.con you probably need to add the following configs. I have not yet tested this myself:

    WIFI=y
    NETWORKING=y

    2. Are you planning to use AT commands to communicate with ESP8266?

    Best regards,

    Håkon

  • Dear, I tried to add the  WIFI=y  and ETWORKING=y in Proj.conf file. But, when CMake is started, the errors are there as shwon in attached image.  

  • Hi Gulzar,

    Please have a look at the wifi sample found in zephyr/samples/net/wifi. This sample is mentioned in the documentation of the shield.

    Regarding WIFI=y and NETWORKING=y, this should have been CONFIG_WIFI=y and CONFIG_NETWORKING=y. These configs are already included in the already mentioned wifi sample.

    Best regards,

    Håkon

Related