Giter VIP home page Giter VIP logo

esp-mdf's Introduction

ESP-WIFI-MESH Development Framework [中文]

Documentation Status

ESP-MDF, or Espressif Mesh Development Framework, is a development framework for ESP-WIFI-MESH, a networking protocol built on top of the Wi-Fi protocol. ESP-MDF is based on the ESP32 chip.

Matters need attention

  1. This version of MDF is based on the IDF master branch and is not recommended for product development. If you need a stable version of MDF, please use branch release/v1.0.
  2. ESP-MDF master branch already supports ESP32S2, but some example can not build and run on ESP32S2 now. We will support these in the future. They are:
    • function_demo/mconfig
    • development_kit/buddy
    • development_kit/button
    • development_kit/light
    • development_kit/sense
    • wireless_debug

Overview

ESP-MDF is based on the ESP-WIFI-MESH protocol stack to facilitate your development of ESP-WIFI-MESH. ESP-MDF provides the following features:

  • Fast network configuration: In addition to manual configuration with the network configuration apps, such as ESP-WIFI-MESH App or similar third-party apps, ESP-MDF offers a chained way of network configuration, during which devices autonomously and quickly establish a network, and form a greater coverage area.

  • Stable upgrade: The upgrading process has become more efficient with such features as automatic retransmission of failed fragments, data compression, reverting to an earlier version, firmware check, etc.

  • Efficient debugging: Various debugging approaches are supported, such as wireless transmission of logs and wireless debugging, debugging through a command terminal, etc.

  • LAN control: Network can be controlled by an app, sensor, etc.

  • Various application demos: It offers comprehensive solutions based on ESP-WIFI-MESH in the areas of lighting, etc.

Framework

ESP-MDF consists of Utils, Components and Examples (see the below figure). Utils is the encapsulation and third-party library of ESP-IDF APIs. Components are the ESP-MDF functional modules that use Utils APIs. Examples are the ESP-WIFI-MESH solutions based on the Components.

  • Utils

    • Third Party: the third-party items

      • Driver: drivers for different devices, such as frequently used buttons and LEDs
      • Miniz: lossless, high performance data compression library
      • Aliyun: Aliyun IoT kit
    • Transmission: the way of data transmission between devices

      • Mwifi: adds to ESP-WIFI-MESH the retransmission filter, data compression, fragmented transmission, and P2P multicast features
      • Mespnow: adds to ESP-NOW the retransmission filter, Cyclic Redundancy Check (CRC), and data fragmentation features
    • Mcommon: modules shared by all ESP-MDF components

      • Event loop: deals with ESP-MDF events
      • Error Check: manages ESP-MDF's code errors
      • Memory Management: Memory Management for ESP-MDF
      • Information Storage: Store configuration information in flash
  • Components:

  • Examples:

    • Function demo: Example of use of each function module

      • Mwifi Example: An example of common networking methods: no router, no router. First develop based on this example, then add distribution, upgrade, wireless test and other functions based on it.
      • Mupgrade Example: Upgrade example of the device
      • Mconfig Example: Example of network configuration of the device
      • Mcommon Examples: Common Module Example, Event Processing Memory Management Example of Using Information Store
    • Debug: Performance Testing and Debugging Tools

      • Console Test: Test the ESP-WIFI-MESH throughput, network configuration, and packet delay by entering commands through the serial port.
      • Wireless Debug: ESP-MDF debugging via wireless
    • Development Kit: ESP32-MeshKit usage example for research and understanding of ESP-WIFI-MESH

      • ESP32-MeshKit-Light: Smart lighting solution with ESP-WIFI-MESH functioning as the master network. The kit consists of light bulbs with integrated ESP32 chips. Support BLE + ESP-MDF for BLE gateway, ibeacon and BLE scanning
      • ESP32-MeshKit-Sense: Development board, specifically designed for applications where ESP-WIFI-MESH is in Light-sleep or Deep-sleep mode. The board provides solutions for:
        • Monitoring the power consumption of MeshKit peripherals
        • Controlling MeshKit peripherals based on the data from multiple onboard sensors.
      • ESP32-MeshKit-Button: Smart button solution, tailored for ESP-WIFI-MESH applications with ultra-low power consumption. The device wakes up only for a short time when the buttons are pressed and transmits packets to ESP-WIFI-MESH devices via ESP-NOW.
    • Cloud Platform: ESP-MDF docking cloud platform

      • Aliyun Linkkit: Example of ESP-MDF access to Alibaba Cloud platform
      • AWS: ESP-MDF Access AWS Platform Example

Develop with ESP-MDF

You first need to read ESP-WIFI-MESH Communication Protocol and ESP-MDF Programming Guide and research and learn about ESP-WIFI-MESH through the ESP32-MeshKit development kit. Secondly, based on Function demo for your project development, when you can encounter problems in development, you can first go to BBS and Issues to find out if a similar problem already exists. If there is no similar problem, you can also ask directly on the website.

Development Boards

ESP32-MeshKit Development board

ESP32-MeshKit offers a complete ESP-WIFI-MESH Lighting Solution (see the below figure), complemented by ESP-Mesh App (iOS version and Android) for research, development and better understanding of ESP-WIFI-MESH.

ESP32-MeshKit Light

ESP32-MeshKit Sense

  • Products:
    • ESP32-MeshKit-Light: The RGBCW smart lights that show control results visually. They can be used to test network configuration time, response speed, stability performance, and measure distance, etc.

    • ESP32-MeshKit-Sense: This kit is equipped with a light sensor as well as a temperature & humidity sensor. It can measure power consumption and develop low power applications. The kit may also be used with ESP-Prog for firmware downloading and debugging.

    • ESP32-MeshKit-Button: Serves as an on/off controller, ready for the development of low power applications. It can be used with ESP-Prog for firmware downloading and debugging.

ESP32-Buddy Development board

ESP32-Buddy is a development board specifically designed to test the development of ESP-WIFI-MESH. With its small size and USB power input, the board can be conveniently used for testing a large number of devices and measure distances between them.

  • Functions:
    • 16 MB flash: stores logs
    • OLED screen: displays information about the device, such as its layer, connection status, etc.
    • LED: indicates the board's status
    • Temperature & humidity sensor: collects environmental parameters

Quick Start

This section provides the steps for quick start with your development of ESP-MDF applications. For more details, please refer to ESP-IDF Get Started.

The directory ~/esp will be used further to install the compiling toolchain, ESP-MDF and demo programs. You can use another directory, but make sure to modify the commands accordingly.

  1. Setup Toolchain: please set up according to your PC's operating system (Windows, Linux or Mac OS). If you use linux, you can use this commands.

    git clone -b v4.3.1 --recursive https://github.com/espressif/esp-idf.git
    cd ~/esp/esp-idf
    ./install.sh
    . ./export.sh
  2. Get ESP-MDF:

    git clone --recursive https://github.com/espressif/esp-mdf.git

    If you clone without the --recursive option, please navigate to the esp-mdf directory and run the command git submodule update --init

  3. Set up ESP-MDF Path: Toolchain uses the environment variable MDF_PATH to access ESP-MDF. The setup of this variable is similar to that of the variable IDF_PATH. Please refer to Add IDF_PATH & idf.py PATH to User Profile. If you use linux, you can use this commands.

    cd ~/esp/esp-mdf
    export MDF_PATH=~/esp/esp-mdf
  4. Start a Project: The word project refers to the communication example between two ESP-WIFI-MESH devices.

    cp -r $MDF_PATH/examples/get-started/ .
    cd  get-started/
  5. Build and Flash: For the rest, just keep the default configuration untouched.

    idf.py menuconfig
    idf.py -p [port] -b [baudrate] erase_flash flash
  6. Monitor/Debugging: If you want to exit the monitor, please use the shortcut key Ctrl+].

    idf.py monitor
  7. Update ESP-MDF:

    cd ~/esp/esp-mdf
    git pull
    git submodule update --init --recursive

ESP-WIFI-MESH Highlights

  • Easy setup: ESP-WIFI-MESH expands the original Wi-Fi hotspot range to the reach of the most distant node in the mesh cloud. Such a network is automatically formed, self-healing and self-organizing. It saves the efforts of laying cables. All you need to do is configure the router password.

  • Gateway free: The decentralized structure of ESP-WIFI-MESH with the absence of a gateway precludes the overall network breakdown if one single node fails. Even if there is a single ESP-WIFI-MESH device, the network still works as usual.

  • Safer transmission: Both the data link layer and the application layer can be encrypted.

  • More reliable transmission: The transmission and data flow control between two devices are more reliable. Also, unicast, multicast and broadcast transmissions are supported.

  • Large network capacity: ESP-WIFI-MESH takes the form of a tree topology, so one single device can connect to 10 devices at maximum, and an entire network can have over 1,000 nodes.

  • Wider transmission coverage: The transmission distance between two devices is 30 m through walls, and 200 m without any obstacles in between (relevant to ESP32-DevKitC).

    • Smart Home: Even if there are only three to five devices in your home, they can form a network and communicate with one another through walls.
    • Street light: If ESP-WIFI-MESH is used for the street lighting scenario, two long-distance devices can communicate with each other.
  • High transmission speed: For Wi-Fi transmission, the speed can reach up to 10 Mbps.

    • Environment Control System: Directly transfers the raw data collected by sensors and analyzes mass data for calibration of algorithms, thereby improving sensors' accuracy.
    • Background Music System: Both audio and video transmissions are supported.
  • Simultaneously run Wi-Fi and BLE protocol stacks: ESP32 chips can run both Wi-Fi and BLE protocol stacks side by side and use ESP-WIFI-MESH as the main network to transmit data, receive BLE probe beacon, send BLE broadcasts and connect BLE devices.

    • Items tracing: Monitors the BLE or Wi-Fi data packets from a device at multiple selected spots.
    • Pedestrian counting: Through monitoring Wi-Fi probe request frames.
    • Indoor positioning: Each device functions as a Beacon AP, continuously sending Bluetooth signal to the surroundings. The network can analyze a device's signal intensity and calculate its current position.
    • Product promotion: Sends real-time product information and promotions through iBeacon.
    • Bluetooth gateway: With each device serving as a Bluetooth gateway, traditional Bluetooth devices can also be connected to an ESP-WIFI-MESH network.

Related Documentation

  • For ESP-MDF related documents, please go to ESP-MDF Programming Guide.
  • ESP-WIFI-MESH is the basic wireless communication protocol for ESP-MDF.
  • ESP-IDF Programming Guide describes Espressif's IoT development framework.
  • To report a bug or request a function, please go to Issues on GitHub to submit them. Before submitting an issue, please check if it has already been covered.
  • If you want to contribute ESP-MDF related codes, please refer to Code Contribution Guide.
  • To visit ESP32 official forum, please go to ESP32 BBS.
  • For the hardware documents related to ESP32-MeshKit, please visit Espressif Website.
  • ESP32-MeshKit-Light purchase link: Taobao.
  • ESP32-Buddy purchase link: Coming soon.

esp-mdf's People

Contributors

arnaud-oechslin avatar bartoszkubiak avatar costaud avatar esp-lqq avatar esphuifeng avatar fjaviervera avatar infiniteyuan avatar jacobmealey avatar krzychb avatar natashali-espressif avatar projectgus avatar qdlmcfresh avatar sam-espressif avatar sgrrzhf avatar skywxfang avatar wujiangang avatar ydesp avatar zhanzhaocheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-mdf's Issues

mwifi_write阻塞时间长

根节点断电后,在子节点产生MDF_EVENT_MWIFI_PARENT_DISCONNECTED事件之前调用mwifi_write(NULL, &data_type, msg_buf, msg_len, false);发送数据会阻塞很长一段时间。

esp_http_client_cleanup in C++ compilation, raises an exception and leaves the opened socket hung

Environment

  • Development Kit: [none]
  • Kit version (for WroverKit/PicoKit/DevKitC): []
  • Core (if using chip or module): [ESP-WROOM32]
  • MDF version (git rev-parse --short HEAD to get the commit id.): f028311
  • Development Env: [Make]
  • Operating System: [Windows]
  • Power Supply: [USB]

Problem Description

Building MUPGRADE example at example/function_demo/mupgrade using C++ compilation, has different behaviour than compiling using ANSI C.

In this case, functions esp_http_client_cleanup raises an exception and leaves the opened socket in an unknown state.

Due to this issue, http server gets blocked.

Expected Behavior

This function should close the opened socket and release all allocated resources properly.

Actual Behavior

Steps to repropduce

  1. Change mupgrade_example.c to be compiled as C++ code. So rename it as mupgrade_example.cpp
  2. Append extern "C" block on app_main
extern "C" {
void app_main(){
....
}
}
  1. Build the example make all and generates mupgrade.bin
  2. Rename upgrade.bin as hello-world.bin and uploads to the http server. Doing that we will update the board with the same firmware, and then it will try to update itself continuosly.
  3. Flash the board make flash monitor
  4. Once started, it connects to http server, downloads hello-world.bin
  5. But after executing esp_http_client_cleanup an exception is raised and opened socket with the server gets hung.

Debug Logs

Next logs shows the http connection establishment and first packets download:

I (17611) mesh: [scan]new scanning time:600ms
W (17611) wifi: [beacon]new interval:300ms
I (17614) mesh: <nvs>write layer:1
I (17614) [mwifi, 65]: Parent is connected
I (17617) [mupgrade_example, 186]: MDF_EVENT_PARENT_CONNECTED
I (17625) [mupgrade_example, 38]: ROOT read task is running
I (17626) [mupgrade_example, 69]: NODE read task is running
I (18325) event: sta ip: 192.168.254.34, mask: 255.255.255.0, gw: 192.168.254.231
I (18326) [mupgrade_example, 198]: MDF_EVENT_MWIFI_ROOT_GOT_IP
I (18329) [mupgrade_example, 112]: Setting remote link: http://192.168.254.65:8000/hello-world.bin
I (18340) [mupgrade_example, 118]: Open HTTP connection: http://192.168.254.65:8000/hello-world.bin
I (18595) [mupgrade_root, 54]: Running partition, label: ota_1, type: 0x0, subtype: 0x11, address: 0x150000
I (18598) [mupgrade_root, 56]: Update partition, label: ota_0, type: 0x0, subtype: 0x10, address: 0x10000
I (19901) [mupgrade_example, 140]: Writing to flash 1456 bytes
I (19913) [mupgrade_example, 140]: Writing to flash 1456 bytes
..... continue downloading packets.....

Next logs shows the end of the downloading process. And later, the socket closing, where the exception is raised:

I (31364) [mupgrade_example, 140]: Writing to flash 1456 bytes
I (31377) [mupgrade_example, 140]: Writing to flash 1456 bytes
I (31385) [mupgrade_example, 140]: Writing to flash 48 bytes
I (31387) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2b674 (177780) map
I (31539) esp_image: segment 1: paddr=0x0003b69c vaddr=0x3ff80000 size=0x00000 (     0)
I (31540) esp_image: segment 2: paddr=0x0003b6a4 vaddr=0x3ff80000 size=0x00000 (     0)
I (31547) esp_image: segment 3: paddr=0x0003b6ac vaddr=0x3ffb0000 size=0x02d78 ( 11640)
I (31565) esp_image: segment 4: paddr=0x0003e42c vaddr=0x3ffb2d78 size=0x00000 (     0)
I (31566) esp_image: segment 5: paddr=0x0003e434 vaddr=0x40080000 size=0x00400 (  1024)
0x40080000: _WindowOverflow4 at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/freertos/xtensa_vectors.S:1685

I (31574) esp_image: segment 6: paddr=0x0003e83c vaddr=0x40080400 size=0x017d4 (  6100)
I (31587) esp_image: segment 7: paddr=0x00040018 vaddr=0x400d0018 size=0xbd738 (775992) map
0x400d0018: _stext at ??:?

I (32228) esp_image: segment 8: paddr=0x000fd758 vaddr=0x40081bd4 size=0x0f464 ( 62564)
0x40081bd4: timer_overflow_happened at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/esp32/esp_timer_esp32.c:340
 (inlined by) esp_timer_impl_set_alarm at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/esp32/esp_timer_esp32.c:228

I (32284) esp_image: segment 9: paddr=0x0010cbc4 vaddr=0x400c0000 size=0x00000 (     0)
I (32285) esp_image: segment 10: paddr=0x0010cbcc vaddr=0x50000000 size=0x00000 (     0)
I (32292) esp_image: segment 11: paddr=0x0010cbd4 vaddr=0x50000000 size=0x00000 (     0)
I (32302) [mupgrade_example, 144]: Connection closed, all data received
I (32307) [mupgrade_example, 153]: The service download firmware is complete, Spend time: 13s
I (35319) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2b674 (177780) map
I (35471) esp_image: segment 1: paddr=0x0003b69c vaddr=0x3ff80000 size=0x00000 (     0)
I (35472) esp_image: segment 2: paddr=0x0003b6a4 vaddr=0x3ff80000 size=0x00000 (     0)
I (35478) esp_image: segment 3: paddr=0x0003b6ac vaddr=0x3ffb0000 size=0x02d78 ( 11640)
I (35496) esp_image: segment 4: paddr=0x0003e42c vaddr=0x3ffb2d78 size=0x00000 (     0)
I (35499) esp_image: segment 5: paddr=0x0003e434 vaddr=0x40080000 size=0x00400 (  1024)
0x40080000: _WindowOverflow4 at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/freertos/xtensa_vectors.S:1685

I (35508) esp_image: segment 6: paddr=0x0003e83c vaddr=0x40080400 size=0x017d4 (  6100)
I (35520) esp_image: segment 7: paddr=0x00040018 vaddr=0x400d0018 size=0xbd738 (775992) map
0x400d0018: _stext at ??:?

I (36156) esp_image: segment 8: paddr=0x000fd758 vaddr=0x40081bd4 size=0x0f464 ( 62564)
0x40081bd4: timer_overflow_happened at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/esp32/esp_timer_esp32.c:340
 (inlined by) esp_timer_impl_set_alarm at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/esp32/esp_timer_esp32.c:228

I (36207) esp_image: segment 9: paddr=0x0010cbc4 vaddr=0x400c0000 size=0x00000 (     0)
I (36208) esp_image: segment 10: paddr=0x0010cbcc vaddr=0x50000000 size=0x00000 (     0)
I (36215) esp_image: segment 11: paddr=0x0010cbd4 vaddr=0x50000000 size=0x00000 (     0)
I (36278) [mupgrade_node, 68]: MESH_ROOT update finish
I (36281) [mupgrade_example, 161]: Firmware is sent to the device to complete, Spend time: 3s
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x4015d1ac  PS      : 0x00060130  A0      : 0x80163dbc  A1      : 0x3ffbf140
0x4015d1ac: sys_arch_mbox_tryfetch at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c:444

A2      : 0x3ffd8058  A3      : 0x3ffbf170  A4      : 0x3ffb3664  A5      : 0x00000000
A6      : 0x3ffbe414  A7      : 0x00000001  A8      : 0x00820018  A9      : 0x3ffbf120
A10     : 0x00000000  A11     : 0x3ffbf170  A12     : 0x00000000  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00060023  SAR     : 0x00000019  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00820018  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff

Backtrace: 0x4015d1ac:0x3ffbf140 0x40163db9:0x3ffbf170 0x40163e59:0x3ffbf1a0 0x401503a5:0x3ffbf1c0 0x4008f101:0x3ffbf1f0
0x4015d1ac: sys_arch_mbox_tryfetch at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c:444

0x40163db9: netconn_drain at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/api/api_msg.c:1644 (discriminator 6)

0x40163e59: lwip_netconn_do_delconn at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/api/api_msg.c:1644 (discriminator 6)

0x401503a5: tcpip_thread at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/api/tcpip.c:483

0x4008f101: vPortTaskWrapper at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/freertos/port.c:403

After rebooting, the new updated firmware is loaded. As this new firmware is the same, it tries to connect again with the server, but as the server is blocked due to the unclosed opened socket, a new exception is raised and board is rebooted over and over.

This condition repeats until server is rebooted.

Next logs, shows new exception after reboot, trying to connect with the blocked server:

I (10015) mesh: [SCAN:13/13+x+]rc[128][30:ae:a4:05:7c:5d,-45], self[30:ae:a4:05:7c:5c,-45,reason:0,votes:1,idle][mine:1,voter:1(1.00)percent:0.90][128,1,30:ae:a4:05:7c:5d]

I (10031) mesh: <nvs>write layer:0
W (10033) wifi: [beacon]interval:100ms
I (10037) mesh: [DONE]connect to router:Invitado, channel:6, rssi:-45, 00:23:5d:8d:da:50[layer:0, assoc:0], my_vote_num:1/voter_num:1, rc[30:ae:a4:05:7c:5d/-45]
I (16485) wifi: new:<6,1>, old:<6,0>, ap:<6,1>, sta:<6,0>, prof:6
I (17473) wifi: state: init -> auth (b0)
I (17480) wifi: state: auth -> assoc (0)
I (17492) wifi: state: assoc -> run (10)
I (17512) wifi: connected with Invitado, channel 6, bssid = 00:23:5d:8d:da:50
I (17517) wifi: pm start, type: 0

I (17521) mesh: [scan]new scanning time:600ms
W (17522) wifi: [beacon]new interval:300ms
I (17525) mesh: <nvs>write layer:1
I (17525) [mwifi, 65]: Parent is connected
I (17527) [mupgrade_example, 186]: MDF_EVENT_PARENT_CONNECTED
I (17534) [mupgrade_example, 69]: NODE read task is running
I (17533) [mupgrade_example, 38]: ROOT read task is running
I (18350) event: sta ip: 192.168.254.34, mask: 255.255.255.0, gw: 192.168.254.231
I (18350) [mupgrade_example, 198]: MDF_EVENT_MWIFI_ROOT_GOT_IP
I (18354) [mupgrade_example, 112]: Setting remote link: http://192.168.254.65:8000/hello-world.bin
I (18365) [mupgrade_example, 118]: Open HTTP connection: http://192.168.254.65:8000/hello-world.bin
I (18445) [mupgrade_root, 54]: Running partition, label: ota_0, type: 0x0, subtype: 0x10, address: 0x10000
I (18447) [mupgrade_root, 56]: Update partition, label: ota_1, type: 0x0, subtype: 0x11, address: 0x150000
I (20081) wifi: state: run -> init (2c0)
I (20082) wifi: pm stop, total sleep time: 0 us / 2564832 us

I (20083) wifi: new:<6,0>, old:<6,1>, ap:<6,1>, sta:<6,0>, prof:6
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x4015d135  PS      : 0x00060d30  A0      : 0x80163130  A1      : 0x3ffbeff0
0x4015d135: sys_mbox_trypost at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c:444

A2      : 0x3ffd8044  A3      : 0x00000000  A4      : 0x00000001  A5      : 0x3ffb9408
A6      : 0x00000036  A7      : 0x00000006  A8      : 0x00000010  A9      : 0x3ffbefb0
A10     : 0x00000001  A11     : 0x3ffbeff0  A12     : 0x00000000  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000018  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000010  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff

Backtrace: 0x4015d135:0x3ffbeff0 0x4016312d:0x3ffbf020 0x40154a41:0x3ffbf040 0x40154a51:0x3ffbf070 0x40154b2f:0x3ffbf090 0x401550a8:0x3ffbf0b0 0x40151413:0x3ffbf0d0 0x4015145f:0x3f
fbf110 0x400eeeb0:0x3ffbf130 0x400eeed1:0x3ffbf170 0x400ee75a:0x3ffbf190 0x401503a5:0x3ffbf1b0 0x4008f101:0x3ffbf1e0
0x4015d135: sys_mbox_trypost at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c:444

0x4016312d: err_tcp at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/api/api_msg.c:1644 (discriminator 6)

0x40154a41: tcp_abandon at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/core/tcp.c:1765

0x40154a51: tcp_abort at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/core/tcp.c:1765

0x40154b2f: tcp_netif_ip_addr_changed_pcblist at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/core/tcp.c:1765

0x401550a8: tcp_netif_ip_addr_changed at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/core/tcp.c:2116

0x40151413: netif_set_ipaddr at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/core/netif.c:211

0x4015145f: netif_set_addr at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/core/netif.c:211

0x400eeeb0: tcpip_adapter_down at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/tcpip_adapter/tcpip_adapter_lwip.c:1092

0x400eeed1: tcpip_adapter_down_api at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/tcpip_adapter/tcpip_adapter_lwip.c:1092

0x400ee75a: tcpip_adapter_api_cb at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/tcpip_adapter/tcpip_adapter_lwip.c:1092

0x401503a5: tcpip_thread at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/lwip/lwip/src/api/tcpip.c:483

0x4008f101: vPortTaskWrapper at C:/Users/raulm/Programas/ESP-MDF/esp-idf/components/freertos/port.c:403


I (20168) esp_core_dump: Save core dump to flash...
D (20173) esp_core_dump: Current task EXIT/PC/PS/A0/SP 8015d3a0 4015d135 60d30 80163130 3ffbeff0
D (20182) esp_core_dump: Stack len = 828 (3ffbef30 3ffbf26c)
D (20188) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60830 80083af8 3ffd3100
D (20196) esp_core_dump: Stack len = 1288 (3ffd3040 3ffd3548)
D (20202) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4000bff0 60930 8008e2ec 3ffd7610
D (20210) esp_core_dump: Stack len = 800 (3ffd7550 3ffd7870)
D (20216) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4018b286 60130 800d2a59 3ffbbdd0
D (20224) esp_core_dump: Stack len = 416 (3ffbbd10 3ffbbeb0)
D (20230) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 40090220 60230 80090313 3ffbcb40
D (20238) esp_core_dump: Stack len = 420 (3ffbca80 3ffbcc24)
D (20244) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60030 80083af8 3ffca570
D (20252) esp_core_dump: Stack len = 512 (3ffca4b0 3ffca6b0)
D (20258) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60030 80083af8 3ffcc300
D (20266) esp_core_dump: Stack len = 724 (3ffcc240 3ffcc514)
D (20271) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60030 80083af8 3ffccf10
D (20280) esp_core_dump: Stack len = 568 (3ffcce50 3ffcd088)
D (20285) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60030 80083af8 3ffce230
D (20293) esp_core_dump: Stack len = 508 (3ffce170 3ffce36c)
D (20299) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60030 80083af8 3ffd44f0
D (20307) esp_core_dump: Stack len = 796 (3ffd4430 3ffd474c)
D (20313) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60230 80083af8 3ffd5510
D (20321) esp_core_dump: Stack len = 768 (3ffd5450 3ffd5750)
D (20327) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60c30 800d4182 3ffbded0
D (20335) esp_core_dump: Stack len = 444 (3ffbde10 3ffbdfcc)
D (20341) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60b30 80083af8 3ffc1c00
D (20349) esp_core_dump: Stack len = 492 (3ffc1b40 3ffc1d2c)
D (20355) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60130 800d219b 3ffafc20
D (20363) esp_core_dump: Stack len = 420 (3ffafb60 3ffafd04)
D (20369) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60330 8015d0b4 3ffc03e0
D (20377) esp_core_dump: Stack len = 724 (3ffc0320 3ffc05f4)
D (20383) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60b30 80083af8 3ffc94a0
D (20391) esp_core_dump: Stack len = 504 (3ffc93e0 3ffc95d8)
D (20396) esp_core_dump: Task EXIT/PC/PS/A0/SP 40081e78 4008f9f5 60e30 80081813 3ffba4c0
D (20405) esp_core_dump: Stack len = 428 (3ffba400 3ffba5ac)
D (20410) esp_core_dump: Core dump len = 17048 (17 0)
D (20643) esp_core_dump: Dump task 3ffbf274
D (20648) esp_core_dump: Dump task 3ffd3550
D (20655) esp_core_dump: Dump task 3ffbb1a0
D (20659) esp_core_dump: Dump task 3ffbbeb8
D (20663) esp_core_dump: Dump task 3ffbcc2c
D (20666) esp_core_dump: Dump task 3ffca6b8
D (20670) esp_core_dump: Dump task 3ffcc51c
D (20674) esp_core_dump: Dump task 3ffcd090
D (20678) esp_core_dump: Dump task 3ffce374
D (20681) esp_core_dump: Dump task 3ffbb55c
D (20686) esp_core_dump: Dump task 3ffbb6cc
D (20691) esp_core_dump: Dump task 3ffbdfd4
D (20694) esp_core_dump: Dump task 3ffc1d34
D (20698) esp_core_dump: Dump task 3ffafd0c
D (20701) esp_core_dump: Dump task 3ffc05fc
D (20705) esp_core_dump: Dump task 3ffc95e0
D (20709) esp_core_dump: Dump task 3ffba5b4
D (20712) esp_core_dump: Data from flash:
D (20713) esp_core_dump: 429c
D (20716) esp_core_dump: 1
D (20719) esp_core_dump: 11
D (20722) esp_core_dump: 16c
D (20724) esp_core_dump: Dump data CRC = 0xf6ad19e8
I (20729) esp_core_dump: Core dump has been saved to flash.
Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee

关于时钟同步问题

我希望把ESP32的MESH网络用在一种多个设备的控制系统之中,因此需要网络里每个节点能协同动作。
显然,由于MESH网络个节点直接通信延迟的不确定性,仅仅通过MESH网络进行直接动作命令的传递,实际上无法实现各个节点的精确动作协同。
因此,我们想了解,ESP32的MESH框架中,是否存在一种高精度的同步时钟技术。使得我们可以在命令下发到各个节点之后,能指定动作执行的时间,这样也就间接实现多设备之间的动作协同。

MESH ID

Finally you have done mesh, And been digging it till three days and funcionality is great..
There is one thing i need to ask is the mesh network will run without a router suppose there is no router avaible than mesh will work?
i realise there is special thing like mesh_id for it so the question is it's encrypted mesh_id and what if the same two same mesh_id network established around each other

Possible typo for mutex handle in mwifi.c

In the following line (I might be mistaken but) I think it is a typo since SemaphoreHandle_t is actually a pointer and there is no need to define a pointer to pointer here.

static SemaphoreHandle_t *s_mwifi_send_lock = NULL;

I don't believe this is affecting the execution in any way but I am just highlighting it to be considered for fixing (if it is really an issue).

Default MWIFI mesh event handler hides mesh event information to application level event handlers

Environment

  • Development Kit: [none]
  • Kit version (for WroverKit/PicoKit/DevKitC): []
  • Core (if using chip or module): [ESP-WROOM32]
  • MDF version (git rev-parse --short HEAD to get the commit id.): 0c64172
  • Development Env: [Make|Eclipse]
  • Operating System: [Windows]
  • Power Supply: [USB]

Problem Description

Default mwifi event handler static void esp_mesh_event_cb(mesh_event_t event) hides important information about the event when it forwards to application level event handlers:

At mwifi.c line 128 the event handler forwards the event to upper handlers at application level, as shown below:

mdf_event_loop_send(event.id, NULL);

As you can see the second argument is NULL, so event information is hidden to those upper handlers at app level.

Expected Behavior

Event information should be forwarded, replacing:

mdf_event_loop_send(event.id, NULL);

With the event information:

mdf_event_loop_send(event.id, &event.info);

Steps to reproduce

  1. Let's follow this example https://github.com/espressif/esp-mdf/blob/master/examples/function_demo/mwifi/main/mwifi_example.c
  2. At line 336 starts the application level event handler static mdf_err_t event_loop_cb(mdf_event_loop_t event, void *ctx){...
  3. Now we add a switch case to check child nodes disconnections, for example at line 357 we add this code:
       case MDF_EVENT_MWIFI_CHILD_DISCONNECTED:
            MDF_LOGI("Child is disconnected");
            break;
  1. But as event information is hidden we cannot handle which child (mac address) has been disconnected.
  2. With the proposed modification, we can get mac address of the disconnected child through this piece of code:
       case MDF_EVENT_MWIFI_CHILD_DISCONNECTED:
            mesh_event_info_t* event_info = (mesh_event_info_t*)ctx;            
            MDF_LOGI("Disconnected Child with mac: " MACSTR, MAC2STR(event_info->child_disconnected.mac));
            break;

Related stuff

As event information defined in file esp_mesh.h includes different event information:

/**
 * @brief Mesh event information
 */
typedef union {
    mesh_event_channel_switch_t channel_switch;            /**< channel switch */
    mesh_event_child_connected_t child_connected;          /**< child connected */
    mesh_event_child_disconnected_t child_disconnected;    /**< child disconnected */
    mesh_event_routing_table_change_t routing_table;       /**< routing table change */
    mesh_event_connected_t connected;                      /**< parent connected */
    mesh_event_disconnected_t disconnected;                /**< parent disconnected */
    mesh_event_no_parent_found_t no_parent;                /**< no parent found */
    mesh_event_layer_change_t layer_change;                /**< layer change */
    mesh_event_toDS_state_t toDS_state;                    /**< toDS state, devices shall check this state firstly before trying to send packets to
                                                                external IP network. This state indicates right now whether the root is capable of sending
                                                                packets out. If not, devices had better to wait until this state changes to be
                                                                MESH_TODS_REACHABLE. */
    mesh_event_vote_started_t vote_started;                /**< vote started */
    mesh_event_root_got_ip_t got_ip;                       /**< root obtains IP address */
    mesh_event_root_address_t root_addr;                   /**< root address */
    mesh_event_root_switch_req_t switch_req;               /**< root switch request */
    mesh_event_root_conflict_t root_conflict;              /**< other powerful root */
    mesh_event_root_fixed_t root_fixed;                    /**< fixed root */
    mesh_event_scan_done_t scan_done;                      /**< scan done */
    mesh_event_network_state_t network_state;              /**< network state, such as whether current mesh network has a root. */
    mesh_event_find_network_t find_network;                /**< network found that can join */
    mesh_event_router_switch_t router_switch;              /**< new router information */
} mesh_event_info_t;

... this will allow to have higher control of the handled mesh event at application level.

esp-mesh 项目协助

尊敬的乐鑫技术大咖你好,感谢百忙之中处理我们的疑问
我们目前正在探索你们的esp-mdf软件包,可以肯定是它在建立ESP-MESH 时功能更加完善强大,毕竟它是在esp-idf之上进行的封装,但是通过初步的了解,感觉esp-mdf项目文件的的布局显得过于干瘪,
代码量比较大,而且作为一个新推行的技术,说明性的文件太少太不详细,将严重影响它的使用和普及,我相信这也不符合乐鑫的初衷。我在esp-mdf\components 目录底下找到了
大量的代码,却鲜有说明他们如何使用,使用某种功能时会涉及到哪些组件,而在esp-mdf/examples 之下的例子也没有详细的评测步骤!
然而相比之下esp-idf/examples/mesh 之下的实例却容易理解很多。然而你们的文件似乎指引着如果使用乐鑫的MESH 功能应该使用esp-mdf软件包
1> 我们的项目目的是使用乐鑫的MESH功能来实现智能家居控制系统的数据传输,我们有自己的服务器和交互协议
2> 我们的困惑是实现这一项目目的应该用esp-idf还是esp-mdf? 实现步骤是怎样的?应该研读那些文件和代码?这些文件的研读顺序是怎样的?(目前已经基于esp-idf 做过一些简单的测试)

请给予迅速支持,我们的项目正在进行之中,我们已经向我们的国外客户推介了你们的技术方案.

mwifi example: Server gets broken messages

Environment

  • Development Kit: ESP32-DevKitC
  • Kit version (for WroverKit/PicoKit/DevKitC): v1
  • Core (if using chip or module): ESP-WROOM32
  • MDF version (git rev-parse --short HEAD to get the commit id.):
    f028311
  • Development Env: Make
  • Operating System: Arch Linux
  • Power Supply: USB

Problem Description

I've just changed the period of delay in node_write_task to 500ms and sometimes my server which is running on laptop gets wrong messages.
It gets this:

{"addr":"84:0d:8e:0d:33:60","data":{"seq":9,"layer":2,"status":0}}}

instead of this:

{"addr":"84:0d:8e:0d:33:60","data":{"seq":9,"layer":2,"status":0}}

extra closing bracket is added for some reason. Mesh network consists of 3 devices placed pretty close to each other(but the problem happened even on the network with 2 nodes placed at around 10 meters from each other).
Sometimes wrong message goes away and comes back when I move nodes.

Expected Behavior

MDF does not produce wrong messages or drops them by checksum.

Actual Behavior

Wrong messages are happening.

Steps to repropduce

  1. change period of delay in node_write_task in mwifi example
  2. upload program
  3. test

invalid static ip

Hi
I am build a test application with ESP32 MDF in order to get familiar with the API. A configure a single node with a fixed WiFi network. The device can connect to wifi, but a always get the error:"invalid static ip"

Here goes my log:

I (15327) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1
I (16317) wifi: state: init -> auth (b0)
I (16322) wifi: state: auth -> assoc (0)
I (16328) wifi: state: assoc -> run (10)
I (16364) wifi: connected with Skynet, channel 1
I (16365) wifi: pm start, type: 0

E (16366) event: invalid static ip <---------------------------
W (16367) wifi: [beacon]new interval:300ms
I (16370) mdf_wifi_mesh: [esp_mesh_event_cb, 70]:esp_mesh_event_cb event.id: 7
I (16377) mdf_wifi_mesh: [esp_mesh_event_cb, 74]:wifi connected
I (16386) mdf_wifi_mesh: [esp_mesh_event_cb, 70]:esp_mesh_event_cb event.id: 14
I (18242) mdf_wifi_mesh: [esp_mesh_event_cb, 70]:esp_mesh_event_cb event.id: 17
I (18242) mdf_wifi_mesh: [esp_mesh_event_cb, 131]:wifi get ip
I (18246) event: sta ip: 192.168.0.8, mask: 255.255.255.0, gw: 192.168.0.1

Is there a way to eliminate the error?
BR Gilberto

wifi mesh

What is the difference between MDF and mesh of example in IDF?
Is the mesh same between 8266 and 32,can they communicate with each other in mesh?

mesh_assoc_t define

In print_system_info_timercb(), It get mesh_assoc using esp_wifi_vnd_mesh_get().
But there is no mesh_assoc_t define.
Where is mesh_assoc_t define?

static void print_system_info_timercb(void *timer)
{
    uint8_t primary                 = 0;
    wifi_second_chan_t second       = 0;
    mesh_addr_t parent_bssid        = {0};
    uint8_t sta_mac[MWIFI_ADDR_LEN] = {0};
    mesh_assoc_t mesh_assoc         = {0x0};
    wifi_sta_list_t wifi_sta_list   = {0x0};

    esp_wifi_get_mac(ESP_IF_WIFI_STA, sta_mac);
    esp_wifi_ap_get_sta_list(&wifi_sta_list);
    esp_wifi_get_channel(&primary, &second);
    esp_wifi_vnd_mesh_get(&mesh_assoc);
    esp_mesh_get_parent_bssid(&parent_bssid);

    MDF_LOGI("System information, channel: %d, layer: %d, self mac: " MACSTR ", parent bssid: " MACSTR
             ", parent rssi: %d, node num: %d, free heap: %u", primary,
             esp_mesh_get_layer(), MAC2STR(sta_mac), MAC2STR(parent_bssid.addr),
             mesh_assoc.rssi, esp_mesh_get_total_node_num(), esp_get_free_heap_size());

Looking for change LED active status

Hi,
I'm running example/development kit/light on my ESP32 custom LED board. My LED is driven by low logic (LED shall light at 0 logic control). ESP light example using active high to turn on LED. Could you let me know where is place in the code that I can change logic output of light driver.

Error with Mlink when answering an HTTP req in a pvTimer callback

After some investigation, I've found an issue in MLink HTTP server...

the "mlink_connection_add" function starts a timer which fires up another method when timeout is reached.
In this callback, HTTP responses are not working anymore, no matter which API we use :

  • sockfd is seen as closed when trying to write though it to answer HTTP req
  • when we call httpd_resp_set_type for instance, we get an "ESP_ERR_HTTPD_INVALID_REQ" as ret value.

After digging a bit, I've found this is related to the httpd_valid_req function in httpd_parse.c. httpd_os_thread_handle() == hd->hd_td.handle almost always return false in such case... Looks like callback is done through another "thread" which does not have access to that "handle" and does not have the ability to use the sockfd somehow.

I'm available for any question.

Broadcasting and in-mesh comm

Hi,
I was really surprised by your work on the mesh network framework. Until now I was using PainlessMesh, but it lacks some advanced features.
As I went with your MDF, I can't get the mesh elements to talk with each other without an app and this is vital to my project cause I need to broadcast and send messages from esp to esp.
Could you implement those features?

设置app配网后重启不能正常组网是怎么回事

仿照light例子 做了一个手机配网,然后将配网信息保存到esp32模组中,但是首次使用app配网是,模组能很快的连接网络设置信道,但是模组重启后,信道一直在扫描。下面是监控信息。
`I (30) boot: ESP-IDF v3.3-beta1-506-gebdcbe8c6-dirty 2nd stage bootloader
I (31) boot: compile time 18:06:07
I (32) boot: Enabling RNG early entropy source...
I (37) boot: SPI Speed : 40MHz
I (41) boot: SPI Mode : DIO
I (45) boot: SPI Flash Size : 4MB
I (50) boot: Partition Table:
I (53) boot: ## Label Usage Type ST Offset Length
I (60) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (68) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (75) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (83) boot: 3 factory factory app 00 00 00010000 00140000
I (90) boot: 4 ota_0 OTA app 00 10 00150000 00140000
I (98) boot: 5 ota_1 OTA app 00 11 00290000 00140000
I (105) boot: 6 coredump Unknown data 01 03 003d0000 00010000
I (113) boot: 7 reserved Unknown data 01 fe 003e0000 00020000
I (120) boot: End of partition table
I (125) boot: Defaulting to factory image
I (129) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x38128 (229672) map
I (219) esp_image: segment 1: paddr=0x00048150 vaddr=0x3ffbdb60 size=0x03150 ( 12624) load
I (224) esp_image: segment 2: paddr=0x0004b2a8 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at C:/msys32/home/Administrator/esp/esp-mdf/esp-idf/components/freertos/xtensa_vectors.S:1779

I (226) esp_image: segment 3: paddr=0x0004b6b0 vaddr=0x40080400 size=0x04960 ( 18784) load
I (242) esp_image: segment 4: paddr=0x00050018 vaddr=0x400d0018 size=0xe90fc (954620) map
0x400d0018: _flash_cache_start at ??:?

I (577) esp_image: segment 5: paddr=0x0013911c vaddr=0x40084d60 size=0x129e0 ( 76256) load
0x40084d60: ld_sniff_cntl_offset_adjust at ??:?

I (623) boot: Loaded app from partition at offset 0x10000
I (623) boot: Disabling RNG early entropy source...
I (623) cpu_start: Pro cpu up.
I (627) cpu_start: Application information:
I (632) cpu_start: Project name: mwifi
I (637) cpu_start: App version: 1
I (641) cpu_start: Compile time: Mar 23 2019 18:06:36
I (647) cpu_start: ELF file SHA256: ef16027bf6cc7d09...
I (653) cpu_start: ESP-IDF: v3.3-beta1-506-gebdcbe8c6-dirty
I (660) cpu_start: Single core mode
I (665) heap_init: Initializing. RAM available for dynamic allocation:
I (672) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (678) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (684) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (690) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (696) heap_init: At 3FFC9298 len 00016D68 (91 KiB): DRAM
I (702) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
I (708) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
I (715) heap_init: At 40097740 len 000088C0 (34 KiB): IRAM
I (721) cpu_start: Pro cpu start user code
I (68) esp_core_dump_flash: Init core dump to flash
I (68) esp_core_dump_flash: Found partition 'coredump' @ 3d0000 65536 bytes
E (70) esp_core_dump_common: Failed to mmap core dump data (260)!
I (77) cpu_start: Starting scheduler on PRO CPU.
I (453) wifi: wifi driver task: 3ffcd414, prio:23, stack:3584, core=0
I (454) wifi: wifi firmware version: 955b7af
I (454) wifi: config NVS flash: enabled
I (456) wifi: config nano formating: disabled
I (460) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (470) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (488) wifi: Init dynamic tx buffer num: 32
I (488) wifi: Init data frame dynamic rx buffer num: 32
I (488) wifi: Init management frame dynamic rx buffer num: 32
I (494) wifi: Init management short buffer num: 32
I (499) wifi: Init static rx buffer size: 1600
I (503) wifi: Init static rx buffer num: 10
I (507) wifi: Init dynamic rx buffer num: 32
I (512) wifi: Set ps type: 0

I (597) phy: phy_version: 4100, 6fa5e27, Jan 25 2019, 17:02:06, 0, 0
I (599) wifi: mode : sta (30:ae:a4:1b:04:fc)
I (601) ESPNOW: espnow [version: 1.0] init
I (601) [mwifi_examples, 704]: event_loop_cb, event: 8449
I (3350) [mconfig_chain, 348]: Generate RSA public and private keys
I (3350) wifi: ic_enable_sniffer
I (3418) [mwifi_examples, 842]: BLE name: MESH_04fc
I (3487) [mwifi_examples, 850]: save succ**
I (3488) [mwifi_examples, 858]: mconfig, ssid: ONENET, password: ASDFasdf, mesh_id: 0c:4b:54:02:4d:b7
I (3493) [mwifi_examples, 862]: mconfig, ssid: ONENET, password: ASDFasdf, mesh_id: 0c:4b:54:02:4d:b7
I (3503) [mwifi, 136]: esp-mdf version: 0c64172-dirty
W (3508) wifi: [beacon]new interval:100ms
I (3513) wifi: mode : sta (30:ae:a4:1b:04:fc) + softAP (30:ae:a4:1b:04:fd)
I (3520) wifi: Init max length of beacon: 752/752
I (3524) wifi: Init max length of beacon: 752/752
I (3530) mesh: read layer:0
W (3532) wifi: [beacon]interval:100ms
I (4545) wifi: Set ps type: 0

I (4549) wifi: mode : sta (30:ae:a4:1b:04:fc)
I (4552) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x1, need_scan_router:0x0, look_for_nwk_count:1
I (4554) [mwifi, 97]: MESH is started
I (4556) [mwifi_examples, 704]: event_loop_cb, event: 0
I (4562) [mwifi_examples, 708]: MESH is started
I (4635) [mwifi_examples, 609]: NODE task is running
I (4636) [mwifi_examples, 565]: Note read task is running
I (4637) SHT30: temp:27.30 C

I (4640) SHT30: hum:29.88 %RH


MASTER READ SENSOR( BH1750 )


data_h: 00
data_l: 8c
sensor val: 116.67 [Lux]
I (4855) mesh: [FIND][ch:13]AP:4, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (4856) mesh: [FIND:1]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (4863) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x1, look_for_nwk_count:2
I (4993) mesh: [FIND][ch:13]AP:0, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (4994) mesh: [FIND:2]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (5002) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x0, look_for_nwk_count:3
I (5313) mesh: [FIND][ch:13]AP:8, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (5313) mesh: [FIND:3]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (5321) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x1, look_for_nwk_count:4
I (5451) mesh: [FIND][ch:13]AP:0, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (5452) mesh: [FIND:4]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (5460) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x0, look_for_nwk_count:5
I (5771) mesh: [FIND][ch:13]AP:9, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (5771) mesh: [FIND:5]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (5779) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x1, look_for_nwk_count:6
I (5909) mesh: [FIND][ch:13]AP:0, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (5909) mesh: [FIND:6]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (5918) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x0, look_for_nwk_count:7
I (6228) mesh: [FIND][ch:13]AP:9, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (6229) mesh: [FIND:7]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (6236) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x1, look_for_nwk_count:8
I (6367) mesh: [FIND][ch:13]AP:0, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (6368) mesh: [FIND:8]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (6376) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x0, look_for_nwk_count:9
I (6687) mesh: [FIND][ch:13]AP:8, otherID:0, MAP:0, idle:0, candidate:0, root:0[0c:4b:54:02:4d:b7]
I (6687) mesh: [FIND:9]fail to find a network, channel:0, cfg<channel:13, router:ONENET, 0c:4b:54:02:4d:b7>

I (6695) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x1, look_for_nwk_count:10
I (6739) SHT30: temp:27.32 C

I (6739) SHT30: hum:29.66 %RH


MASTER READ SENSOR( BH1750 )


`
我的程序中是这样写的:仿照light 读取内存中保存的配置信息,判断为MDF_OK后直接用保存信息配网

` if (mdf_info_load("init_config", &init_config, sizeof(mwifi_init_config_t)) == MDF_OK && mdf_info_load("ap_config", &ap_config, sizeof(mwifi_config_t)) == MDF_OK) {

    MDF_LOGI("********save succ**********");
 
    
     MDF_LOGI("mconfig, ssid: %s, password: %s, mesh_id: " MACSTR,
             ap_config.router_ssid, ap_config.router_password,
             MAC2STR(ap_config.mesh_id));

     MDF_LOGI("mconfig, ssid: %s, password: %s, mesh_id: " MACSTR,
             ap_config.router_ssid, ap_config.router_password,
             MAC2STR(ap_config.mesh_id));

  MDF_ERROR_ASSERT(esp_bt_controller_mem_release(ESP_BT_MODE_BLE));

/**
 * @brief Enable ESP-MESH network

 */
MDF_ERROR_ASSERT(mwifi_init(&init_config));
MDF_ERROR_ASSERT(mwifi_set_config(&ap_config));
MDF_ERROR_ASSERT(mwifi_start());
} else {
     MDF_ERROR_ASSERT(get_network_config(&init_config, &ap_config));
      MDF_LOGI("mconfig, ssid: %s, password: %s, mesh_id: " MACSTR,
             ap_config.router_ssid, ap_config.router_password,
             MAC2STR(ap_config.mesh_id));

    MDF_ERROR_ASSERT(esp_bt_controller_mem_release(ESP_BT_MODE_BLE));

/**
 * @brief Enable ESP-MESH network

 */


    MDF_ERROR_ASSERT(mwifi_init(&init_config));
    MDF_ERROR_ASSERT(mwifi_set_config(&ap_config));
    MDF_ERROR_ASSERT(mwifi_start());
}`

How to use esp_mesh_waive_root not working

playing with this esp_mesh_waive_root and i don't know how its working because the esp32 which is nearest to router getting vote 1.00 but its not changing to root . and the esp32 which is far from router but previously was root stays root.
do we have to switch it manually ? or anything else ?

mupgrade example doesn't work when http server uses Transfer-Encoding:chunked

Environment

  • Development Kit: [none]
  • Kit version (for WroverKit/PicoKit/DevKitC): []
  • Core (if using chip or module): [ESP-WROOM32]
  • MDF version: f028311
  • Development Env: [Make]
  • Operating System: [Windows]
  • Power Supply: [USB]

Problem Description

Trying to update firmware via mupgrade, from an http server with Transfer-Encoding chunked results in this error:

D (28670) HTTP_CLIENT: http_on_chunk_complete
D (28674) HTTP_CLIENT: content_length = -1
E (28685) [mupgrade_root, 43]: <MDF_ERR_INVALID_ARG> !(size > 0)

Expected Behavior

It should download binary file from http server normally, handling chunked Transfer-Encoding.

Actual Behavior

Steps to repropduce

Fetching headers from http server with instruction:

total_size = esp_http_client_fetch_headers(client);

results in: total_size = 0

Then at mupgrade_root.c line 43 fails checking size value:

mdf_err_t mupgrade_firmware_init(const char *name, size_t size)
{
    MDF_PARAM_CHECK(name);
    MDF_PARAM_CHECK(size > 0);       //<---- THIS CHECKING FAILS

Code to reproduce this issue

You can reproduce this issue, hosting the binary file in a google.sites repository like this:

https://sites.google.com/site/username/hello-world.bin

Debug Logs

D (28571) HTTP_CLIENT: on_message_begin
D (28572) HTTP_CLIENT: HEADER=Content-Type:text/html; charset=UTF-8
D (28572) HTTP_CLIENT: HEADER=X-Frame-Options:SAMEORIGIN
D (28576) HTTP_CLIENT: HEADER=X-Robots-Tag:noarchive
D (28581) HTTP_CLIENT: HEADER=Cache-Control:no-cache, no-store, max-age=0, must-revalidate
D (28589) HTTP_CLIENT: HEADER=Pragma:no-cache
D (28594) HTTP_CLIENT: HEADER=Expires:Mon, 01 Jan 1990 00:00:00 GMT
D (28600) HTTP_CLIENT: HEADER=Date:Tue, 29 Jan 2019 09:31:34 GMT
D (28606) HTTP_CLIENT: HEADER=Last-Modified:Thu, 24 Jan 2019 12:46:13 GMT
D (28613) HTTP_CLIENT: HEADER=Location:https://sites.google.com/site/username/hello-world.bin
D (28623) HTTP_CLIENT: HEADER=X-Content-Type-Options:nosniff
D (28629) HTTP_CLIENT: HEADER=X-XSS-Protection:1; mode=block
D (28635) HTTP_CLIENT: HEADER=Server:GSE
D (28639) HTTP_CLIENT: HEADER=Alt-Svc:quic=
D (28643) HTTP_CLIENT: HEADER=Accept-Ranges:none
D (28648) HTTP_CLIENT: HEADER=Vary:Accept-Encoding
D (28653) HTTP_CLIENT: HEADER=Transfer-Encoding:chunked
D (28658) HTTP_CLIENT: http_on_headers_complete, status=302, offset=621, nread=621
D (28666) HTTP_CLIENT: http_on_body 259
D (28670) HTTP_CLIENT: http_on_chunk_complete
D (28674) HTTP_CLIENT: content_length = -1
E (28685) [mupgrade_root, 43]: <MDF_ERR_INVALID_ARG> !(size > 0)

Not Discover in Phone

image

This image is the message in the make monitor. The esp32 cannot be discovered in Phone.
This program is the light_bulb example.

子节点发往根节点的数据阻塞时间过长

将网络中的若干个子节点断电,在根节点产生MDF_EVENT_MWIFI_ROUTING_TABLE_REMOVE事件之前,其他子节点调用 mwifi_write(NULL, &data_type, msg_buf, msg_len, false); 发送给根节点的数据根节点收不到,根节点产生MDF_EVENT_MWIFI_ROUTING_TABLE_REMOVE事件后,之前子节点发送的数据一下子全收到了。

mupgrade使用文件名做断点续传判断的方式存在问题

在mupgrade_status中,即mupgrade_node文件的第50行,使用bin文件名作为断点续传的判断在实际使用中出现问题。
复现步骤:

  1. 根节点进行批量升级,当子节点开始升级并且未升级完成时将根节点断电。
    2.更换bin文件,文件名一样但是文件大小不一样(重新编译后生成的)。
    3.根节点进行批量升级。子节点无法升级成功,需要擦除后才行。

建议采用MD5代替文件名进行判断

根节点能否不连接路由器wifi,而是使用eth与外网通信

你好,在实际应用中现场只提供eth的接入方式没有wifi,我在尝试让根节点通过eth连接外网而不是wifi,实际测试发现使用eth后虽然可以和外网通信但是子节点无法连接上根节点,根节点一直产生MDF_EVENT_MWIFI_PARENT_DISCONNECTED事件,这应该怎么解决?谢谢。

How to setup mesh to repeat wifi

Hi, been searching around and it is a bit unclear. Perhaps this is easy, or not supported/possible.
I have tested mdf wifi and have nodes communicating, can send status 1 to them and so on. But I can not connect with phone/laptop to nodes wifi, only to the router.

Is there some setting I am missing to make the wifi access point with same SSID/pass available from mesh nodes some distance away from router?

MDF examples compilation as C++ code fails

Environment

  • Development Kit: [none]
  • Kit version (for WroverKit/PicoKit/DevKitC): []
  • Core (if using chip or module): [ESP-WROOM32]
  • MDF version (git rev-parse --short HEAD to get the commit id.): 7fe8393
  • Development Env: [Make]
  • Operating System: [Windows]
  • Power Supply: [USB]

Problem Description

Trying to compile any example in folder esp-mdf/examples/ as C++ code raises multiple compilation errors in mwifi.h due to ' __builtin_types_compatible_p' gnu extension.

Expected Behavior

No compilation errors should be raised.

Actual Behavior

Multiple errors of this kind: "ESP-MDF/components/mwifi/include/mwifi.h:499:68: error: expected primary-expression before 'char' + __builtin_types_compatible_p(typeof(data), char **) *...."

Steps to reproduce

This is the reproduction of trying to compile esp-mdf/examples/function_demo/mwifi example as C++ code:

  1. Rename file esp-mdf/examples/function_demo/mwifi/main/mwifi_example.c as mwifi_example.cpp
  2. Modify mwifi_example.cpp app_main function as follows, to be C++ compatible:
...
extern "C" {
void app_main(void);
}
void app_main(){
  ....
  ....
}

The rest of the file is not changed at all.

  1. Change component.mk file, adding -fpermissive this C++ flag to convert some errors into warnings and enabling gnu extensions support through -std=gnu++11 flag:
CPPFLAGS := -std=gnu++11 -fpermissive
  1. Build example with command:
make -j8 all

Compilation output with errors:

$ make -j8 all
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/Users/user1/Programas/ESP-MDF/esp-idf\requirements.txt are satisfied.
CXX build/main/mwifi_example.o
In file included from C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_common.h:59:0,
                 from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:25:
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'void tcp_client_write_task(void*)':
C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_mem.h:111:12: warning: invalid conversion from 'void*' to 'char*' [-fpermissive]
         ptr; \
            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:36:21: note: in expansion of macro 'MDF_CALLOC'
     char *data    = MDF_CALLOC(1, MWIFI_PAYLOAD_LEN);
                     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:39:44: warning: missing initializer for member 'mwifi_data_type_t::upgrade' [-Wmissing-field-initializers]
     mwifi_data_type_t data_type      = {0x0};
                                            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:39:44: warning: missing initializer for member 'mwifi_data_type_t::communicate' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:39:44: warning: missing initializer for member 'mwifi_data_type_t::reserved' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:39:44: warning: missing initializer for member 'mwifi_data_type_t::protocol' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:39:44: warning: missing initializer for member 'mwifi_data_type_t::custom' [-Wmissing-field-initializers]
In file included from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:26:0:
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:497:52: error: expected primary-expression before 'typeof'
                       __builtin_types_compatible_p(typeof(data), char *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                    ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:497:66: error: expected primary-expression before 'char'
                       __builtin_types_compatible_p(typeof(data), char *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                  ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:497:72: error: '__builtin_types_compatible_p' was not declared in this scope
                       __builtin_types_compatible_p(typeof(data), char *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                        ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:498:54: error: expected primary-expression before 'typeof'
                       + __builtin_types_compatible_p(typeof(data), uint8_t *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                      ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:498:76: error: expected primary-expression before '*' token
                       + __builtin_types_compatible_p(typeof(data), uint8_t *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:498:77: error: expected primary-expression before ')' token
                       + __builtin_types_compatible_p(typeof(data), uint8_t *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                             ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:499:54: error: expected primary-expression before 'typeof'
                       + __builtin_types_compatible_p(typeof(data), char **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL \
                                                      ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:499:68: error: expected primary-expression before 'char'
                       + __builtin_types_compatible_p(typeof(data), char **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL \
                                                                    ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:500:54: error: expected primary-expression before 'typeof'
                       + __builtin_types_compatible_p(typeof(data), uint8_t **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL)
                                                      ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:500:76: error: expected primary-expression before '*' token
                       + __builtin_types_compatible_p(typeof(data), uint8_t **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL)
                                                                            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:500:78: error: expected primary-expression before ')' token
                       + __builtin_types_compatible_p(typeof(data), uint8_t **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL)
                                                                              ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:50:15: note: in expansion of macro 'mwifi_root_read'
         ret = mwifi_root_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'int socket_tcp_client_create(const char*, uint16_t)':
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:84:9: error: expected primary-expression before '.' token
         .sin_addr.s_addr = inet_addr(ip),
         ^
In file included from C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_common.h:59:0,
                 from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:25:
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'void tcp_client_read_task(void*)':
C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_mem.h:89:12: warning: invalid conversion from 'void*' to 'char*' [-fpermissive]
         ptr; \
            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:107:21: note: in expansion of macro 'MDF_MALLOC'
     char *data    = MDF_MALLOC(MWIFI_PAYLOAD_LEN);
                     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:110:45: warning: missing initializer for member 'mwifi_data_type_t::upgrade' [-Wmissing-field-initializers]
     mwifi_data_type_t data_type       = {0x0};
                                             ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:110:45: warning: missing initializer for member 'mwifi_data_type_t::communicate' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:110:45: warning: missing initializer for member 'mwifi_data_type_t::reserved' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:110:45: warning: missing initializer for member 'mwifi_data_type_t::protocol' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:110:45: warning: missing initializer for member 'mwifi_data_type_t::custom' [-Wmissing-field-initializers]
In file included from C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_common.h:59:0,
                 from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:25:
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'void node_read_task(void*)':
C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_mem.h:89:12: warning: invalid conversion from 'void*' to 'char*' [-fpermissive]
         ptr; \
            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:193:21: note: in expansion of macro 'MDF_MALLOC'
     char *data    = MDF_MALLOC(MWIFI_PAYLOAD_LEN);
                     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:195:44: warning: missing initializer for member 'mwifi_data_type_t::upgrade' [-Wmissing-field-initializers]
     mwifi_data_type_t data_type      = {0x0};
                                            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:195:44: warning: missing initializer for member 'mwifi_data_type_t::communicate' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:195:44: warning: missing initializer for member 'mwifi_data_type_t::reserved' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:195:44: warning: missing initializer for member 'mwifi_data_type_t::protocol' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:195:44: warning: missing initializer for member 'mwifi_data_type_t::custom' [-Wmissing-field-initializers]
In file included from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:26:0:
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:429:47: error: expected primary-expression before 'typeof'
                  __builtin_types_compatible_p(typeof(data), char *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                               ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:429:61: error: expected primary-expression before 'char'
                  __builtin_types_compatible_p(typeof(data), char *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                             ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:429:67: error: '__builtin_types_compatible_p' was not declared in this scope
                  __builtin_types_compatible_p(typeof(data), char *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                   ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:430:49: error: expected primary-expression before 'typeof'
                  + __builtin_types_compatible_p(typeof(data), uint8_t *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                 ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:430:71: error: expected primary-expression before '*' token
                  + __builtin_types_compatible_p(typeof(data), uint8_t *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                       ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:430:72: error: expected primary-expression before ')' token
                  + __builtin_types_compatible_p(typeof(data), uint8_t *) * MLINK_DATA_MEMORY_MALLOC_EXTERNAL \
                                                                        ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:431:49: error: expected primary-expression before 'typeof'
                  + __builtin_types_compatible_p(typeof(data), char **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL \
                                                 ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:431:63: error: expected primary-expression before 'char'
                  + __builtin_types_compatible_p(typeof(data), char **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL \
                                                               ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:432:49: error: expected primary-expression before 'typeof'
                  + __builtin_types_compatible_p(typeof(data), uint8_t **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL)
                                                 ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:432:71: error: expected primary-expression before '*' token
                  + __builtin_types_compatible_p(typeof(data), uint8_t **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL)
                                                                       ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:432:73: error: expected primary-expression before ')' token
                  + __builtin_types_compatible_p(typeof(data), uint8_t **) * MLINK_DATA_MEMORY_MALLOC_INTERNAL)
                                                                         ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:208:15: note: in expansion of macro 'mwifi_read'
         ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
               ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:223:59: warning: invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
         gpio_set_level(CONFIG_LED_GPIO_NUM, pSub->valueint);
                                                           ^
In file included from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/esp32/include/esp_sleep.h:19:0,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/esp32/include/esp_system.h:21,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/freertos/include/freertos/portable.h:126,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
                 from C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_common.h:36,
                 from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:25:
C:/Users/user1/Programas/ESP-MDF/esp-idf/components/driver/include/driver/gpio.h:315:11: note:   initializing argument 1 of 'esp_err_t gpio_set_level(gpio_num_t, uint32_t)'
 esp_err_t gpio_set_level(gpio_num_t gpio_num, uint32_t level);
           ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'void node_write_task(void*)':
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:240:44: warning: missing initializer for member 'mwifi_data_type_t::upgrade' [-Wmissing-field-initializers]
     mwifi_data_type_t data_type      = {0x0};
                                            ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:240:44: warning: missing initializer for member 'mwifi_data_type_t::communicate' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:240:44: warning: missing initializer for member 'mwifi_data_type_t::reserved' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:240:44: warning: missing initializer for member 'mwifi_data_type_t::protocol' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:240:44: warning: missing initializer for member 'mwifi_data_type_t::custom' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:251:90: warning: invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
                         count++, esp_mesh_get_layer(), gpio_get_level(CONFIG_LED_GPIO_NUM));
                                                                                          ^
In file included from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/esp32/include/esp_sleep.h:19:0,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/esp32/include/esp_system.h:21,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/freertos/include/freertos/portable.h:126,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
                 from C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_common.h:36,
                 from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:25:
C:/Users/user1/Programas/ESP-MDF/esp-idf/components/driver/include/driver/gpio.h:329:5: note:   initializing argument 1 of 'int gpio_get_level(gpio_num_t)'
 int gpio_get_level(gpio_num_t gpio_num);
     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'void print_system_info_timercb(void*)':
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:272:39: warning: invalid conversion from 'int' to 'wifi_second_chan_t' [-fpermissive]
     wifi_second_chan_t second       = 0;
                                       ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::len' [-Wmissing-field-initializers]
     mesh_assoc_t mesh_assoc         = {0x0};
                                           ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::oui' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::type' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::encrypted' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::version' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::mesh_type' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::mesh_id' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::layer_cap' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::layer' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::assoc_cap' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::assoc' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::leaf_cap' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::leaf_assoc' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::root_cap' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::self_cap' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::layer2_cap' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::scan_ap_num' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::rssi' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::router_rssi' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::flag' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::rc_addr' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::rc_rssi' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::vote_addr' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::vote_rssi' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::vote_ttl' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::votes' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::my_votes' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::reason' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::child' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:275:43: warning: missing initializer for member 'mesh_assoc_t::toDS' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_info_t::rssi' [-Wmissing-field-initializers]
     wifi_sta_list_t wifi_sta_list   = {0x0};
                                           ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_info_t::phy_11b' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_info_t::phy_11g' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_info_t::phy_11n' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_info_t::phy_lr' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_info_t::reserved' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:276:43: warning: missing initializer for member 'wifi_sta_list_t::num' [-Wmissing-field-initializers]
In file included from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:26:0:
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp: In function 'void app_main()':
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:175:5: sorry, unimplemented: non-trivial designated initializers not supported
     };
     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:385:33: note: in expansion of macro 'MWIFI_INIT_CONFIG_DEFAULT'
     mwifi_init_config_t cfg   = MWIFI_INIT_CONFIG_DEFAULT();
                                 ^
C:/Users/user1/Programas/ESP-MDF/components/mwifi/include/mwifi.h:175:5: sorry, unimplemented: non-trivial designated initializers not supported
     };
     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:385:33: note: in expansion of macro 'MWIFI_INIT_CONFIG_DEFAULT'
     mwifi_init_config_t cfg   = MWIFI_INIT_CONFIG_DEFAULT();
                                 ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: error: C99 designator 'router_ssid' outside aggregate initializer
     };
     ^
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: error: C99 designator 'router_password' outside aggregate initializer
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: error: C99 designator 'mesh_id' outside aggregate initializer
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: error: C99 designator 'mesh_password' outside aggregate initializer
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: sorry, unimplemented: non-trivial designated initializers not supported
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: sorry, unimplemented: non-trivial designated initializers not supported
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: warning: missing initializer for member 'mwifi_config_t::mesh_password' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: warning: missing initializer for member 'mwifi_config_t::mesh_type' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: warning: missing initializer for member 'mwifi_config_t::channel' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: warning: missing initializer for member 'mwifi_config_t::channel_switch_disable' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:391:5: warning: missing initializer for member 'mwifi_config_t::router_switch_disable' [-Wmissing-field-initializers]
C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:400:67: warning: invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
     gpio_set_direction(CONFIG_LED_GPIO_NUM, GPIO_MODE_INPUT_OUTPUT);
                                                                   ^
In file included from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/esp32/include/esp_sleep.h:19:0,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/esp32/include/esp_system.h:21,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/freertos/include/freertos/portable.h:126,
                 from C:/Users/user1/Programas/ESP-MDF/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
                 from C:/Users/user1/Programas/ESP-MDF/components/mcommon/include/mdf_common.h:36,
                 from C:/Users/user1/workspace/iot/ESP32/mwifi_demo/main/mwifi_example.cpp:25:
C:/Users/user1/Programas/ESP-MDF/esp-idf/components/driver/include/driver/gpio.h:344:11: note:   initializing argument 1 of 'esp_err_t gpio_set_direction(gpio_num_t, gpio_mode_t)'
 esp_err_t gpio_set_direction(gpio_num_t gpio_num, gpio_mode_t mode);
           ^
make[1]: *** [/C/Users/user1/Programas/ESP-MDF/esp-idf/make/component_wrapper.mk:292: mwifi_example.o] Error 1
CC build/smartconfig_ack/smartconfig_ack.o
CC build/sdmmc/sdmmc_sd.o
make: *** [/C/Users/user1/Programas/ESP-MDF/esp-idf/make/project.mk:527: component-main-build] Error 2
make: *** Se espera a que terminen otras tareas....
CC build/soc/esp32/rtc_clk.o
CC build/sdmmc/sdmmc_cmd.o
CC build/spi_flash/flash_ops.o
CC build/spiffs/esp_spiffs.o
CC build/soc/esp32/rtc_time.o
CC build/sdmmc/sdmmc_mmc.o
AR build/smartconfig_ack/libsmartconfig_ack.a
CC build/spi_flash/cache_utils.o
CC build/sdmmc/sdmmc_common.o
CC build/spi_flash/spi_flash_rom_patch.o
CC build/spiffs/spiffs_api.o
CC build/soc/esp32/rtc_sleep.o
CC build/sdmmc/sdmmc_io.o
CC build/spi_flash/partition.o
CC build/sdmmc/sdmmc_init.o
CC build/soc/esp32/gpio_periph.o
CC build/spiffs/spiffs/src/spiffs_hydrogen.o
CC build/soc/esp32/rtc_clk_init.o
fatal: No es un repositorio git (ni ninguno de los directorios superiores): .git
Project do not have git repo, it needs to get PROJECT_VER from `git describe` command.
App "mwifi_demo" version: ""
CC build/soc/esp32/spi_periph.o
CC build/spi_flash/flash_mmap.o
CC build/soc/esp32/rtc_init.o
CC build/soc/esp32/sdio_slave_periph.o
CC build/app_update/esp_app_desc.o
AR build/sdmmc/libsdmmc.a
CC build/spiffs/spiffs/src/spiffs_check.o
CC build/soc/esp32/rtc_wdt.o
CC build/soc/esp32/sdmmc_periph.o
CC build/soc/esp32/cpu_util.o
CC build/soc/esp32/rtc_periph.o
AR build/app_update/libapp_update.a
CC build/soc/esp32/rtc_pm.o
CC build/soc/esp32/soc_memory_layout.o
AR build/spi_flash/libspi_flash.a
CC build/soc/src//memory_layout_utils.o
CC build/spiffs/spiffs/src/spiffs_nucleus.o
CC build/spiffs/spiffs/src/spiffs_gc.o
CC build/spiffs/spiffs/src/spiffs_cache.o
AR build/soc/libsoc.a
AR build/spiffs/libspiffs.a

sdkconfig content:

# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#
CONFIG_IDF_TARGET="esp32"

#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="/C/Python27/python.exe"
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y

#
# Application manager
#
CONFIG_APP_COMPILE_TIME_DATE=y

#
# Bootloader config
#
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=
CONFIG_LOG_BOOTLOADER_LEVEL_ERROR=
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y
CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=
CONFIG_LOG_BOOTLOADER_LEVEL=3
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V=
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
CONFIG_BOOTLOADER_FACTORY_RESET=
CONFIG_BOOTLOADER_APP_TEST=
CONFIG_BOOTLOADER_WDT_ENABLE=y
CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE=
CONFIG_BOOTLOADER_WDT_TIME_MS=9000

#
# Security features
#
CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT=
CONFIG_SECURE_BOOT_ENABLED=
CONFIG_FLASH_ENCRYPTION_ENABLED=

#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="COM6"
CONFIG_ESPTOOLPY_BAUD_115200B=y
CONFIG_ESPTOOLPY_BAUD_230400B=
CONFIG_ESPTOOLPY_BAUD_921600B=
CONFIG_ESPTOOLPY_BAUD_2MB=
CONFIG_ESPTOOLPY_BAUD_OTHER=
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=115200
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_FLASHMODE_QIO=
CONFIG_FLASHMODE_QOUT=
CONFIG_FLASHMODE_DIO=y
CONFIG_FLASHMODE_DOUT=
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ_26M=
CONFIG_ESPTOOLPY_FLASHFREQ_20M=
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
CONFIG_ESPTOOLPY_BEFORE_NORESET=
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
CONFIG_ESPTOOLPY_AFTER_NORESET=
CONFIG_ESPTOOLPY_AFTER="hard_reset"
CONFIG_MONITOR_BAUD_9600B=
CONFIG_MONITOR_BAUD_57600B=
CONFIG_MONITOR_BAUD_115200B=y
CONFIG_MONITOR_BAUD_230400B=
CONFIG_MONITOR_BAUD_921600B=
CONFIG_MONITOR_BAUD_2MB=
CONFIG_MONITOR_BAUD_OTHER=
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_MONITOR_BAUD=115200

#
# Example Configuration
#
CONFIG_ROUTER_SSID="Invitado"
CONFIG_ROUTER_PASSWORD="11FF00DECA"
CONFIG_MESH_ID="123456"
CONFIG_MESH_PASSWORD="MESH_PASSWORD"
CONFIG_LED_GPIO_NUM=25
CONFIG_SERVER_IP="192.168.0.1"
CONFIG_SERVER_PORT=8070

#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=
CONFIG_PARTITION_TABLE_TWO_OTA=
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y

#
# Compiler options
#
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
CONFIG_OPTIMIZATION_LEVEL_RELEASE=
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=
CONFIG_CXX_EXCEPTIONS=
CONFIG_STACK_CHECK_NONE=y
CONFIG_STACK_CHECK_NORM=
CONFIG_STACK_CHECK_STRONG=
CONFIG_STACK_CHECK_ALL=
CONFIG_STACK_CHECK=
CONFIG_WARN_WRITE_STRINGS=
CONFIG_DISABLE_GCC8_WARNINGS=

#
# Component config
#

#
# Application Level Tracing
#
CONFIG_ESP32_APPTRACE_DEST_TRAX=
CONFIG_ESP32_APPTRACE_DEST_NONE=y
CONFIG_ESP32_APPTRACE_ENABLE=
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
CONFIG_AWS_IOT_SDK=

#
# Bluetooth
#
CONFIG_BT_ENABLED=
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
CONFIG_BT_RESERVE_DRAM=0

#
# Driver configurations
#

#
# ADC configuration
#
CONFIG_ADC_FORCE_XPD_FSM=
CONFIG_ADC2_DISABLE_DAC=y

#
# SPI configuration
#
CONFIG_SPI_MASTER_IN_IRAM=
CONFIG_SPI_MASTER_ISR_IN_IRAM=y
CONFIG_SPI_SLAVE_IN_IRAM=
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y

#
# ESP32-specific
#
CONFIG_IDF_TARGET_ESP32=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_80=
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
CONFIG_SPIRAM_SUPPORT=
CONFIG_MEMMAP_TRACEMEM=
CONFIG_MEMMAP_TRACEMEM_TWOBANKS=
CONFIG_ESP32_TRAX=
CONFIG_TRACEMEM_RESERVE_DRAM=0x0

#
# Core dump
#
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y
CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=
CONFIG_ESP32_ENABLE_COREDUMP=y
CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64
CONFIG_TWO_UNIVERSAL_MAC_ADDRESS=
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304
CONFIG_MAIN_TASK_STACK_SIZE=3584
CONFIG_IPC_TASK_STACK_SIZE=1024
CONFIG_TIMER_TASK_STACK_SIZE=4096
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
CONFIG_NEWLIB_NANO_FORMAT=
CONFIG_CONSOLE_UART_DEFAULT=y
CONFIG_CONSOLE_UART_CUSTOM=
CONFIG_CONSOLE_UART_NONE=
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=115200
CONFIG_ULP_COPROC_ENABLED=
CONFIG_ULP_COPROC_RESERVE_MEM=0
CONFIG_ESP32_PANIC_PRINT_HALT=
CONFIG_ESP32_PANIC_PRINT_REBOOT=y
CONFIG_ESP32_PANIC_SILENT_REBOOT=
CONFIG_ESP32_PANIC_GDBSTUB=
CONFIG_ESP32_DEBUG_OCDAWARE=y
CONFIG_ESP32_DEBUG_STUBS_ENABLE=y
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=300
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_PANIC=y
CONFIG_TASK_WDT_TIMEOUT_S=10
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_BROWNOUT_DET=y
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
CONFIG_BROWNOUT_DET_LVL_SEL_1=
CONFIG_BROWNOUT_DET_LVL_SEL_2=
CONFIG_BROWNOUT_DET_LVL_SEL_3=
CONFIG_BROWNOUT_DET_LVL_SEL_4=
CONFIG_BROWNOUT_DET_LVL_SEL_5=
CONFIG_BROWNOUT_DET_LVL_SEL_6=
CONFIG_BROWNOUT_DET_LVL_SEL_7=
CONFIG_BROWNOUT_DET_LVL=0
CONFIG_REDUCE_PHY_TX_POWER=y
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
CONFIG_ESP32_TIME_SYSCALL_USE_RTC=
CONFIG_ESP32_TIME_SYSCALL_USE_FRC1=
CONFIG_ESP32_TIME_SYSCALL_USE_NONE=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256=
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
CONFIG_ESP32_XTAL_FREQ_40=y
CONFIG_ESP32_XTAL_FREQ_26=
CONFIG_ESP32_XTAL_FREQ_AUTO=
CONFIG_ESP32_XTAL_FREQ=40
CONFIG_DISABLE_BASIC_ROM_CONSOLE=
CONFIG_NO_BLOBS=
CONFIG_ESP_TIMER_PROFILING=
CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS=
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
CONFIG_ESP32_RTCDATA_IN_FAST_MEM=

#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_CSI_ENABLED=
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=6
CONFIG_ESP32_WIFI_NVS_ENABLED=y
CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE=

#
# PHY
#
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION=
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20

#
# Power Management
#
CONFIG_PM_ENABLE=

#
# ADC-Calibration
#
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
CONFIG_ADC_CAL_LUT_ENABLE=y

#
# Event Loop Library
#
CONFIG_EVENT_LOOP_PROFILING=

#
# ESP HTTP client
#
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y

#
# HTTP Server
#
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
CONFIG_HTTPD_MAX_URI_LEN=512

#
# Ethernet
#
CONFIG_DMA_RX_BUF_NUM=10
CONFIG_DMA_TX_BUF_NUM=10
CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE=y
CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000
CONFIG_EMAC_TASK_PRIORITY=20
CONFIG_EMAC_TASK_STACK_SIZE=3072

#
# FAT Filesystem support
#
CONFIG_FATFS_CODEPAGE_DYNAMIC=
CONFIG_FATFS_CODEPAGE_437=y
CONFIG_FATFS_CODEPAGE_720=
CONFIG_FATFS_CODEPAGE_737=
CONFIG_FATFS_CODEPAGE_771=
CONFIG_FATFS_CODEPAGE_775=
CONFIG_FATFS_CODEPAGE_850=
CONFIG_FATFS_CODEPAGE_852=
CONFIG_FATFS_CODEPAGE_855=
CONFIG_FATFS_CODEPAGE_857=
CONFIG_FATFS_CODEPAGE_860=
CONFIG_FATFS_CODEPAGE_861=
CONFIG_FATFS_CODEPAGE_862=
CONFIG_FATFS_CODEPAGE_863=
CONFIG_FATFS_CODEPAGE_864=
CONFIG_FATFS_CODEPAGE_865=
CONFIG_FATFS_CODEPAGE_866=
CONFIG_FATFS_CODEPAGE_869=
CONFIG_FATFS_CODEPAGE_932=
CONFIG_FATFS_CODEPAGE_936=
CONFIG_FATFS_CODEPAGE_949=
CONFIG_FATFS_CODEPAGE_950=
CONFIG_FATFS_CODEPAGE=437
CONFIG_FATFS_LFN_NONE=y
CONFIG_FATFS_LFN_HEAP=
CONFIG_FATFS_LFN_STACK=
CONFIG_FATFS_FS_LOCK=0
CONFIG_FATFS_TIMEOUT_MS=10000
CONFIG_FATFS_PER_FILE_CACHE=y

#
# Modbus configuration
#
CONFIG_MB_UART_RXD=22
CONFIG_MB_UART_TXD=23
CONFIG_MB_UART_RTS=18
CONFIG_MB_QUEUE_LENGTH=20
CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048
CONFIG_MB_SERIAL_BUF_SIZE=256
CONFIG_MB_SERIAL_TASK_PRIO=10
CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=
CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
CONFIG_MB_CONTROLLER_STACK_SIZE=4096
CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
CONFIG_MB_TIMER_PORT_ENABLED=y
CONFIG_MB_TIMER_GROUP=0
CONFIG_MB_TIMER_INDEX=0

#
# FreeRTOS
#
CONFIG_FREERTOS_UNICORE=y
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
CONFIG_FREERTOS_CORETIMER_0=y
CONFIG_FREERTOS_CORETIMER_1=
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=
CONFIG_FREERTOS_ASSERT_DISABLE=
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536
CONFIG_FREERTOS_ISR_STACKSIZE=1536
CONFIG_FREERTOS_LEGACY_HOOKS=
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
CONFIG_SUPPORT_STATIC_ALLOCATION=
CONFIG_TIMER_TASK_PRIORITY=1
CONFIG_TIMER_TASK_STACK_DEPTH=3072
CONFIG_TIMER_QUEUE_LENGTH=10
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y
CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=
CONFIG_FREERTOS_DEBUG_INTERNALS=
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y

#
# Heap memory debugging
#
CONFIG_HEAP_POISONING_DISABLED=y
CONFIG_HEAP_POISONING_LIGHT=
CONFIG_HEAP_POISONING_COMPREHENSIVE=
CONFIG_HEAP_TRACING=

#
# libsodium
#
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y

#
# Log output
#
CONFIG_LOG_DEFAULT_LEVEL_NONE=
CONFIG_LOG_DEFAULT_LEVEL_ERROR=
CONFIG_LOG_DEFAULT_LEVEL_WARN=
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_COLORS=y

#
# LWIP
#
CONFIG_L2_TO_L3_COPY=
CONFIG_LWIP_IRAM_OPTIMIZATION=
CONFIG_LWIP_MAX_SOCKETS=10
CONFIG_USE_ONLY_LWIP_SELECT=
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
CONFIG_LWIP_SO_RCVBUF=
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_IP_FRAG=
CONFIG_LWIP_IP_REASSEMBLY=
CONFIG_LWIP_STATS=
CONFIG_LWIP_ETHARP_TRUST_IP_MAC=
CONFIG_ESP_GRATUITOUS_ARP=y
CONFIG_GARP_TMR_INTERVAL=60
CONFIG_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
CONFIG_LWIP_DHCP_RESTORE_LAST_IP=

#
# DHCP server
#
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
CONFIG_LWIP_AUTOIP=
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8

#
# TCP
#
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1436
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=5744
CONFIG_TCP_WND_DEFAULT=5744
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES=
CONFIG_TCP_OVERSIZE_MSS=y
CONFIG_TCP_OVERSIZE_QUARTER_MSS=
CONFIG_TCP_OVERSIZE_DISABLE=

#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=3072
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
CONFIG_TCPIP_TASK_AFFINITY_CPU0=
CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF
CONFIG_PPP_SUPPORT=

#
# ICMP
#
CONFIG_LWIP_MULTICAST_PING=
CONFIG_LWIP_BROADCAST_PING=

#
# LWIP RAW API
#
CONFIG_LWIP_MAX_RAW_PCBS=16

#
# mbedTLS
#
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=
CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC=
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=
CONFIG_MBEDTLS_DEBUG=
CONFIG_MBEDTLS_HARDWARE_AES=y
CONFIG_MBEDTLS_HARDWARE_MPI=
CONFIG_MBEDTLS_HARDWARE_SHA=
CONFIG_MBEDTLS_HAVE_TIME=y
CONFIG_MBEDTLS_HAVE_TIME_DATE=
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
CONFIG_MBEDTLS_TLS_SERVER_ONLY=
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=
CONFIG_MBEDTLS_TLS_DISABLED=
CONFIG_MBEDTLS_TLS_SERVER=y
CONFIG_MBEDTLS_TLS_CLIENT=y
CONFIG_MBEDTLS_TLS_ENABLED=y

#
# TLS Key Exchange Methods
#
CONFIG_MBEDTLS_PSK_MODES=
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
CONFIG_MBEDTLS_SSL_PROTO_SSL3=
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=
CONFIG_MBEDTLS_SSL_ALPN=y
CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y

#
# Symmetric Ciphers
#
CONFIG_MBEDTLS_AES_C=y
CONFIG_MBEDTLS_CAMELLIA_C=
CONFIG_MBEDTLS_DES_C=
CONFIG_MBEDTLS_RC4_DISABLED=y
CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT=
CONFIG_MBEDTLS_RC4_ENABLED=
CONFIG_MBEDTLS_BLOWFISH_C=
CONFIG_MBEDTLS_XTEA_C=
CONFIG_MBEDTLS_CCM_C=y
CONFIG_MBEDTLS_GCM_C=y
CONFIG_MBEDTLS_RIPEMD160_C=

#
# Certificates
#
CONFIG_MBEDTLS_PEM_PARSE_C=y
CONFIG_MBEDTLS_PEM_WRITE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y

#
# MDF Mcommon
#
CONFIG_MDF_TASK_DEFAULT_PRIOTY=6
CONFIG_MDF_TASK_PINNED_TO_CORE=0
CONFIG_MDF_MEM_DEBUG=y
CONFIG_MDF_ERR_TO_NAME_LOOKUP=y
CONFIG_MDF_LOG_LEVEL_NONE=
CONFIG_MDF_LOG_LEVEL_ERROR=
CONFIG_MDF_LOG_LEVEL_WARN=
CONFIG_MDF_LOG_LEVEL_INFO=
CONFIG_MDF_LOG_LEVEL_DEBUG=y
CONFIG_MDF_LOG_LEVEL_VERBOSE=
CONFIG_MDF_LOG_LEVEL=4

#
# MDF Mconfig
#
CONFIG_MCONFIG_WHITELIST_ENABLE=y
CONFIG_MCONFIG_WHITELIST_SECURITY_ENABLE=
CONFIG_MCONFIG_CHAIN_LMK="lmk1234567890123"

#
# mDNS
#
CONFIG_MDNS_MAX_SERVICES=10

#
# MDF Mespnow
#
CONFIG_MESPNOW_RETRANSMIT_NUM=3
CONFIG_MESPNOW_DEFAULT_PMK="pmk1234567890123"
CONFIG_MESPNOW_LOG_LEVEL=2

#
# ESP-MQTT Configurations
#
CONFIG_MQTT_PROTOCOL_311=y
CONFIG_MQTT_TRANSPORT_SSL=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
CONFIG_MQTT_USE_CUSTOM_CONFIG=
CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED=
CONFIG_MQTT_CUSTOM_OUTBOX=

#
# MDF Mupgrade
#
CONFIG_MUPGRADE_RETRY_COUNT=10
CONFIG_MUPGRADE_WAIT_RESPONSE_TIMEOUT=3000
CONFIG_MUPGRADE_STATUS_REPORT_INTERVAL=10
CONFIG_MUPGRADE_FIRMWARE_CHECK=
CONFIG_MUPGRADE_VERSION_FALLBACK_RESTART=y
CONFIG_MUPGRADE_RESTART_COUNT=10
CONFIG_MUPGRADE_RESTART_TIMEOUT=5000
CONFIG_MUPGRADE_VERSION_FALLBACK_FACTORY=y

#
# MDF Mwifi
#

#
# Root config
#
CONFIG_MWIFI_VOTE_PERCENTAGE=90
CONFIG_MWIFI_VOTE_MAX_COUNT=15
CONFIG_MWIFI_BACKOFF_RSSI=-78
CONFIG_MWIFI_SCAN_MINI_COUNT=10
CONFIG_MWIFI_ROOT_HEALING_MS=6000
CONFIG_MWIFI_ROOT_CONFLICTS_ENABLE=

#
# Capacity config
#
CONFIG_MWIFI_CAPACITY_NUM=256
CONFIG_MWIFI_MAX_LAYER=16
CONFIG_MWIFI_MAX_CONNECTION=6

#
# Stability config
#
CONFIG_MWIFI_ASSOC_EXPIRE_MS=30000
CONFIG_MWIFI_BEACON_INTERVAL_MS=100
CONFIG_MWIFI_PASSIVE_SCAN_MS=300
CONFIG_MWIFI_MONITOR_DURATION_MS=60000
CONFIG_MWIFI_CNX_RSSI=-120
CONFIG_MWIFI_SELECT_RSSI=-78
CONFIG_MWIFI_SWITCH_RSSI=-78
CONFIG_MWIFI_ATTEMPT_COUNT=60
CONFIG_MWIFI_MONITOR_IE_COUNT=10

#
# Transmission config
#
CONFIG_MWIFI_XON_QSIZE=64
CONFIG_MWIFI_RETRANSMIT_ENABLE=y
CONFIG_MWIFI_DATA_DROP_ENABLE=y

#
# NVS
#

#
# OpenSSL
#
CONFIG_OPENSSL_DEBUG=
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
CONFIG_OPENSSL_ASSERT_EXIT=

#
# PThreads
#
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
CONFIG_PTHREAD_STACK_MIN=768
CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1
CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"

#
# SPI Flash driver
#
CONFIG_SPI_FLASH_VERIFY_WRITE=
CONFIG_SPI_FLASH_ENABLE_COUNTERS=
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS=
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED=

#
# SPIFFS Configuration
#
CONFIG_SPIFFS_MAX_PARTITIONS=3

#
# SPIFFS Cache Configuration
#
CONFIG_SPIFFS_CACHE=y
CONFIG_SPIFFS_CACHE_WR=y
CONFIG_SPIFFS_CACHE_STATS=
CONFIG_SPIFFS_PAGE_CHECK=y
CONFIG_SPIFFS_GC_MAX_RUNS=10
CONFIG_SPIFFS_GC_STATS=
CONFIG_SPIFFS_PAGE_SIZE=256
CONFIG_SPIFFS_OBJ_NAME_LEN=32
CONFIG_SPIFFS_USE_MAGIC=y
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
CONFIG_SPIFFS_META_LENGTH=4
CONFIG_SPIFFS_USE_MTIME=y

#
# Debug Configuration
#
CONFIG_SPIFFS_DBG=
CONFIG_SPIFFS_API_DBG=
CONFIG_SPIFFS_GC_DBG=
CONFIG_SPIFFS_CACHE_DBG=
CONFIG_SPIFFS_CHECK_DBG=
CONFIG_SPIFFS_TEST_VISUALISATION=

#
# TCP/IP Adapter
#
CONFIG_IP_LOST_TIMER_INTERVAL=120
CONFIG_TCPIP_LWIP=y

#
# Unity unit testing library
#
CONFIG_UNITY_ENABLE_FLOAT=y
CONFIG_UNITY_ENABLE_DOUBLE=y
CONFIG_UNITY_ENABLE_COLOR=
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
CONFIG_UNITY_ENABLE_FIXTURE=

#
# Virtual file system
#
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_SUPPORT_TERMIOS=y

#
# Wear Levelling
#
CONFIG_WL_SECTOR_SIZE_512=
CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096

Mesh with arduino

Hello Guys,

I'm new with esp-mdf and I would like to know if is possible to use it on arduino IDE.

Thanks,

mdf报错是什么原因

我使用的是window7系统,按照说明书下载并配置了msys2环境,在git clone时,因为**国内原因导致下载不了,所以直接下载github上的zip压缩包 解压运行。下载到的zip压缩包里 ``esp-idf文件夹是空的,所以我在github上也下载了3.1.2版本的esp-idf,通过配置后可以正常编译烧写esp-idf内的例子。但是到esp-mdf下编译get-start例子时,报错如下:

make menuconfig

fatal: 不是一个 git 仓库(或者任何父目录):.git
C:/msys32/home/Administrator/esp/esp-mdf/project.mk:9: C:/msys32/home/Administrator/esp/esp-mdf/esp-idf/make/project.mk: No such file or directory
make: *** 没有规则可制作目标“C:/msys32/home/Administrator/esp/esp-mdf/esp-idf/make/project.mk”。 停止。
`

WindowOverflow and ESP_CORE_DUMP Error

Environment

  • Development Kit: [ESP32-DevKitC]
  • Kit version (for WroverKit/PicoKit/DevKitC): [v1]
  • Core (if using chip or module): [ESP-WROOM32]
  • MDF version (git rev-parse --short HEAD to get the commit id.): f028311
    //bd6ea4393c7d2f059fc4decc70f1ec3eb3597268
  • Development Env: [VS Code]
  • Operating System: [Windows]
  • Power Supply: [USB]

Problem Description

0x40080000: _WindowOverflow4 at C:/msys32/home/FrancisJeralyn/esp/esp-mdf/esp-idf/components/freertos/xtensa_vectors.S:1685

0x4008c4ac: coex_bt_high_prio at /home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/bt_bb.c:402

E (254) esp_core_dump: Failed to mmap core dump data (260)!

capture1

capture2

This is the "get_started" example program.

Checking for errors in mwifi init

When I initialize mwifi with a wrong configuration, in my case a wrong wifi password, the system aborts with an error message and reboots. This results in a boot loop as the wifi password was previously stored in flash.

I believe the problem is here:

ESP_ERROR_CHECK(esp_mesh_start());

Since esp_mesh_start() is wrapped in an ESP_ERROR_CHECK, there seems to be nothing I can do to capture the error. I think it would be wise to return the error from mwifi_start() so that I can handle that error properly.

Is there something I can do to fix this?

ldgen fails due to bug in included IDF version

Environment

  • MDF version: 7fe8393
  • Development Env: [Eclipse]
  • Operating System: [Windows]

Problem Description

MDF get_startet project does not compile with current MDF / IDF provided.
This issue has been fixed with espressif/esp-idf@d3938c8
See: espressif/esp-idf#2812

Is it possible to update to this IDF commit without breaking MDF?
Replacing only the /esp-mdf/esp-idf/make/ldgen.mk file resolves this issue for now.

Expected Behavior

Eclipse can Build example program

Actual Behavior

Generating esp32.common.ld fails due to wrong paths.

Steps to repropduce

  1. setup Toolchain
  2. clone latest MDF
  3. setup Eclipse Project
  4. hit "Build"

Debug Logs

Generating esp32.common.ld
python /home/admin/esp/esp-mdf/esp-idf/tools/ldgen/ldgen.py --input          /home/admin/esp/esp-mdf/esp-idf/components/esp32/ld/esp32.common.ld.in --config        /c/Users/admin/Documents/ConstellationLightDisplays/mdfMesh/sdkconfig --fragments      /home/admin/esp/esp-mdf/esp-idf/components/app_trace/linker.lf           /home/admin/esp/esp-mdf/esp-idf/components/esp32/ld/esp32_fragments.lf /home/admin/esp/esp-mdf/esp-idf/components/esp32/linker.lf       /home/admin/esp/esp-mdf/esp-idf/components/esp_ringbuf/linker.lf     /home/admin/esp/esp-mdf/esp-idf/components/freertos/linker.lf /home/admin/esp/esp-mdf/esp-idf/components/heap/linker.lf                            /home/admin/esp/esp-mdf/esp-idf/components/soc/linker.lf /home/admin/esp/esp-mdf/esp-idf/components/spi_flash/linker.lf          /home/admin/esp/esp-mdf/esp-idf/components/xtensa-debug-module/linker.lf --output         /c/Users/admin/Documents/ConstellationLightDisplays/mdfMesh/build/esp32/esp32.common.ld --sections      /c/Users/admin/Documents/ConstellationLightDisplays/mdfMesh/build/ldgen.section_infos --kconfig       /home/admin/esp/esp-mdf/esp-idf/Kconfig --env           "COMPONENT_KCONFIGS=/home/admin/esp/esp-mdf/esp-idf/components/app_trace/Kconfig   /home/admin/esp/esp-mdf/esp-idf/components/aws_iot/Kconfig   /home/admin/esp/esp-mdf/esp-idf/components/bt/Kconfig    /home/admin/esp/esp-mdf/esp-idf/components/driver/Kconfig  /home/admin/esp/esp-mdf/esp-idf/components/esp32/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/esp_adc_cal/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/esp_event/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/esp_http_client/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/esp_http_server/Kconfig     /home/admin/esp/esp-mdf/esp-idf/components/ethernet/Kconfig  /home/admin/esp/esp-mdf/esp-idf/components/fatfs/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/freemodbus/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/freertos/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/heap/Kconfig    /home/admin/esp/esp-mdf/esp-idf/components/libsodium/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/log/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/lwip/Kconfig  /home/admin/esp/esp-mdf/esp-idf/components/mbedtls/Kconfig C:\\msys32\\home\\admin\\esp\\esp-mdf/components/mcommon/Kconfig C:\\msys32\\home\\admin\\esp\\esp-mdf/components/mconfig/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/mdns/Kconfig C:\\msys32\\home\\admin\\esp\\esp-mdf/components/mespnow/Kconfig    /home/admin/esp/esp-mdf/esp-idf/components/mqtt/Kconfig C:\\msys32\\home\\admin\\esp\\esp-mdf/components/mupgrade/Kconfig C:\\msys32\\home\\admin\\esp\\esp-mdf/components/mwifi/Kconfig   /home/admin/esp/esp-mdf/esp-idf/components/nvs_flash/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/openssl/Kconfig    /home/admin/esp/esp-mdf/esp-idf/components/pthread/Kconfig    /home/admin/esp/esp-mdf/esp-idf/components/spi_flash/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/spiffs/Kconfig  /home/admin/esp/esp-mdf/esp-idf/components/tcpip_adapter/Kconfig  /home/admin/esp/esp-mdf/esp-idf/components/unity/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/vfs/Kconfig /home/admin/esp/esp-mdf/esp-idf/components/wear_levelling/Kconfig   " --env           "COMPONENT_KCONFIGS_PROJBUILD= /home/admin/esp/esp-mdf/esp-idf/components/app_update/Kconfig.projbuild   /home/admin/esp/esp-mdf/esp-idf/components/bootloader/Kconfig.projbuild                /home/admin/esp/esp-mdf/esp-idf/components/esptool_py/Kconfig.projbuild             /c/Users/admin/Documents/ConstellationLightDisplays/mdfMesh/main/Kconfig.projbuild                /home/admin/esp/esp-mdf/esp-idf/components/partition_table/Kconfig.projbuild                 " --env           "IDF_CMAKE=n"
Traceback (most recent call last):
  File "C:/msys32/home/admin/esp/esp-mdf/esp-idf/tools/ldgen/ldgen.py", line 114, in <module>
    main()
  File "C:/msys32/home/admin/esp/esp-mdf/esp-idf/tools/ldgen/ldgen.py", line 98, in main
    sdkconfig = SDKConfig(kconfig_file, config_file, args.env)
  File "C:/msys32/home/admin/esp/esp-mdf/esp-idf/tools/ldgen/sdkconfig.py", line 54, in __init__
    self.config = kconfiglib.Kconfig(kconfig_file.name)
  File "C:\msys32\home\admin\esp\esp-mdf\esp-idf\tools\kconfig_new/kconfiglib.py", line 653, in __init__
    self.top_node)  # prev_node
  File "C:\msys32\home\admin\esp\esp-mdf\esp-idf\tools\kconfig_new/kconfiglib.py", line 1546, in _parse_block
    self._enter_file(sourced_file)
  File "C:\msys32\home\admin\esp\esp-mdf\esp-idf\tools\kconfig_new/kconfiglib.py", line 1130, in _enter_file
    .format(self._filename, self._linenr, e.message))
IOError: C:/msys32/home/admin/esp/esp-mdf/esp-idf/Kconfig:59: Could not open '/home/admin/esp/esp-mdf/esp-idf/components/app_update/Kconfig.projbuild' (ENOENT: No such file or directory). Perhaps the $srctree environment variable (which was unset) is set incorrectly. Note that the current value of $srctree is saved when the Kconfig instance is created (for consistency and to cleanly separate instances). Also note that e.g. $FOO in a 'source' statement does not refer to the environment variable FOO, but rather to the Kconfig Symbol FOO (which would commonly have 'option env="FOO"' in its definition).
make: *** [/home/admin/esp/esp-mdf/esp-idf/components/esp32/Makefile.projbuild:51: /c/Users/admin/Documents/ConstellationLightDisplays/mdfMesh/build/esp32/esp32.common.ld] Error 1

App与Esp32本地http通信问题

App与Esp32本地http通信问题

当App快速操作时,Esp32会打印 httpd: httpd_accept_conn: error in accept (23)
httpd: httpd_server: error accepting new connection

你们没有提供iOS的SDK,所以是我自己写的demo。主要是想问你们客户端如何操作断开之前的连接

MWIFI panic and reboots ESP32 chip

While testing esp_32 starting guide with the getting-started code snippet, I get an issue while initializing MWifi instead of having it working properly (I would like to add that ESP-MDF worked two months ago when I followed this guide (https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_mesh.html#mesh-writing-mesh-application). It does not work anymore on the latest master (As of Dec 29th, 2018, I can provide more info about this case if asked 😄) :

`I (378) wifi: wifi driver task: 3ffb892c, prio:23, stack:3584, core=0
I (378) wifi: wifi firmware version: 328353e
I (378) wifi: config NVS flash: enabled
I (378) wifi: config nano formating: disabled
I (388) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (398) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (428) wifi: Init dynamic tx buffer num: 32
I (428) wifi: Init data frame dynamic rx buffer num: 32
I (428) wifi: Init management frame dynamic rx buffer num: 32
I (428) wifi: Init static rx buffer size: 1600
I (438) wifi: Init static rx buffer num: 10
I (438) wifi: Init dynamic rx buffer num: 32
I (448) wifi: Set ps type: 0

I (518) phy: phy_version: 4000, b6198fa, Sep 3 2018, 15:11:06, 0, 0
I (518) wifi: mode : sta (30:ae:a4:8d:d0:14)
I (518) [mwifi, 134]: esp-mdf version: cf1817d
W (528) wifi: [beacon]interval:100ms
I (528) wifi: mode : sta (30:ae:a4:8d:d0:14) + softAP (30:ae:a4:8d:d0:15)
I (538) wifi: Init max length of beacon: 752/752
I (538) wifi: Init max length of beacon: 752/752
W (548) wifi: [beacon]interval:100ms
W (548) wifi: password convert fail

ESP_ERROR_CHECK failed: esp_err_t 0xb (ERROR) at 0x4008c34c
0x4008c34c: _esp_error_check_failed at /home/user/esp/esp-mdf/esp-idf/components/esp32/panic.c:685

file: "/home/user/esp/esp-mdf/components/mwifi/mwifi.c" line 293
func: mwifi_start
expression: esp_mesh_set_config(&mesh_config)

Backtrace: 0x4008bf0c:0x3ffb1b10 0x4008c34f:0x3ffb1b30 0x400d3a8c:0x3ffb1b50 0x400d3174:0x3ffb1c60 0x400d11ce:0x3ffb1d60 0x4008e521:0x3ffb1d80
0x4008bf0c: invoke_abort at /home/user/esp/esp-mdf/esp-idf/components/esp32/panic.c:680

0x4008c34f: _esp_error_check_failed at /home/user/esp/esp-mdf/esp-idf/components/esp32/panic.c:686

0x400d3a8c: mwifi_start at /home/user/esp/esp-mdf/components/mwifi/mwifi.c:364

0x400d3174: app_main at /home/user/esp/ESP32_Network/main/main.c:98

0x400d11ce: main_task at /home/user/esp/esp-mdf/esp-idf/components/esp32/cpu_start.c:514

0x4008e521: vPortTaskWrapper at /home/user/esp/esp-mdf/esp-idf/components/freertos/port.c:403

Rebooting...
`

Thanks !

Esp32 与手机通信

你好,我想问下,刷新获取多个设备状态时(post请求get_status),设备返回的数据是什么格式的,如何处理。一个设备是json格式。多个设备就不是了

Max mwifi payload is 4095 bytes

The max mwifi payload is 4095 bytes, however, since the mwifi layer supports fragmenting, it should be possible to allow larger payloads

The problem is this line:

uint32_t total_size : 12; /**< Total length of the packet */

The total_size field in the payload header is only 12 bits, so it cannot store a number larger than 4095. I tried enlarging this field to 16 bits and a larger payload of 10985 bytes was happily sent in 8 packets.

I am not sure just enlarging the field would cause no other issues (hence no PR). I am not familiar enough with C to be confident about that

Part of the packet is lost when specifying wait_ticks other than portMAX_DELAY for mwifi_root_read()

First of all I have tested and traced this issue for mwifi_root_read() but I believe it goes to mwifi_read() function as well.

To reproduce the issue, let the node send a large buffer that will span over multiple payloads (e.g. 4000 bytes) to the root with some delay between transmissions (e.g. 15 seconds), and let the root read the buffer with timeout other than portMAX_DELAY (e.g. 20 seconds).

The root will start showing the warning message:
Part of the packet is lost, expect_seq: 0, recv_seq: 2

To be honest, I couldn't wait to receive a fix and as per my efforts to trace the issue, it seems like it is related to the following code block:

wait_ticks = (wait_ticks == portMAX_DELAY) ? portMAX_DELAY :
xTaskGetTickCount() - start_ticks < wait_ticks ?
wait_ticks - (xTaskGetTickCount() - start_ticks) : 0;

The calculation of the remaining waiting time does not reset the variable start_ticks to current tick count (xTaskGetTickCount()) after updating wait_ticks at the beginning of each iteration.

Meshkit-Sense example

Why was the meshkit-example removed from master? Will there be a new example in the future on how to build a basic mesh with sensor readings?

Latency

What would be the latency when playing audio over the mesh network?

在mdf一个例子中引入其他功能头文件 一直报错

我在mwifi例子中想改成手机配网,而不是设置固定wifi和密码。所以我在mwifi中移植了mconfig中的配网方式,我将mconfig所需的头文件,在mwifi的main.c中引用了,但是一直报错,引用的头文件里的函数undefined,所以我去mdf的components目录里找到对于的c文件拷贝到mwif下的main目录了。编译的时候又报错误

`In file included from C:/msys32/home/Administrator/esp/esp-mdf/components/mconfi g/include/mconfig_blufi.h:32:0,
from C:/msys32/home/Administrator/esp/esp-mdf/components/mcommo n/include/mdf_common.h:66,
from C:/msys32/home/Administrator/esp/esp-mdf/components/mconfi g/include/mconfig_queue.h:28,
from C:/msys32/home/Administrator/esp/mwifi/main/mconfig_queue. c:25:
C:/msys32/home/Administrator/esp/esp-mdf/components/mconfig/include/mconfig_chai n.h:99:38: error: unknown type name 'mconfig_data_t'
mdf_err_t mconfig_chain_master(const mconfig_data_t *config, TickType_t duratio n_ticks);
^
make[1]: *** [/home/Administrator/esp/esp-mdf/esp-idf/make/component_wrapper.mk: 290:mconfig_queue.o] 错误 1
make: *** [C:/msys32/home/Administrator/esp/esp-mdf/esp-idf/make/project.mk:551 :component-main-build] 错误 2

`
我想问下,这个错误怎么解决。mdf的一般编程步骤或者工程框架是怎样的,直接在main中include其他功能头文件为啥不行。期待您的解答 谢谢!

节点间通讯问题

利用mwifi包通讯,各节点与服务器通讯正常,为了实现节点间点对点通讯,将发送地址和接收地址改为同一个地址,例如,一个模块动MAC地址是{0x24,0x0a,0xc4,0xc1,0x1e,0x08},另一个是{0x9c,0xa6,0x15,0x1d,0x3d,0x41},两个模块分别烧录不同MAC地址,进行通讯验证,结果模块收不到另一个模块发出动数据,请问是什么原因?

static void node_read_task(void *arg)
{
mdf_err_t ret = MDF_OK;
cJSON *pJson = NULL;
cJSON *pSub = NULL;
char *data = MDF_MALLOC(MWIFI_PAYLOAD_LEN);
size_t size = MWIFI_PAYLOAD_LEN;
mwifi_data_type_t data_type = {0x0};
//uint8_t src_addr[MWIFI_ADDR_LEN] = {0x0};
//uint8_t src_addr[MWIFI_ADDR_LEN]={0x24,0x0a,0xc4,0xc0,0xfc,0x70};
// uint8_t src_addr[MWIFI_ADDR_LEN]={0x24,0x0a,0xc4,0xc1,0x1e,0x08};
uint8_t src_addr[MWIFI_ADDR_LEN]={0x9c,0xa6,0x15,0x1d,0x3d,0x41};
MDF_LOGI("Note read task is running");
for (;;) {
if (!mwifi_is_connected()) {
vTaskDelay(500 / portTICK_RATE_MS);
continue;
}
size = MWIFI_PAYLOAD_LEN;
memset(data, 0, MWIFI_PAYLOAD_LEN);
//src_addr = {0x24,0x0a,0xc4,0xc0,0xfc,0x70};
ret = mwifi_read(src_addr, &data_type, data, &size, portMAX_DELAY);
printf("倒计%s秒\n",data);
// uart_write_bytes(UART_NUM_1, (const char *) data , size);
MDF_ERROR_CONTINUE(ret != MDF_OK, "<%s> mwifi_read", mdf_err_to_name(ret));
MDF_LOGD("Node receive1: " MACSTR ", size: %d, data: %s", MAC2STR(src_addr), size, data);

    pJson = cJSON_Parse(data);
    MDF_ERROR_CONTINUE(!pJson, "cJSON_Parse, data format error, data: %s", data);

    pSub = cJSON_GetObjectItem(pJson, "status");

    if (!pSub) {
        MDF_LOGW("cJSON_GetObjectItem, Destination address not set");
        cJSON_Delete(pJson);
        continue;
    }

    gpio_set_level(CONFIG_LED_GPIO_NUM, pSub->valueint);

    cJSON_Delete(pJson);
}

MDF_LOGW("Note read task is exit");

MDF_FREE(data);
vTaskDelete(NULL);

}

static void node_write_task(void *arg)
{
mdf_err_t ret = MDF_OK;
int count = 0;
size_t size = 0;
char *data = NULL;
mwifi_data_type_t data_type = {0x0};

//const uint8_t *dest_addrs={0x24,0x0a,0xc4,0xc1,0x1e,0x08};
//const uint8_t *dest_addrs[MWIFI_ADDR_LEN]= {0x24,0x0a,0xc4,0xc0,0xfc,0x70};
// const uint8_t *dest_addrs[MWIFI_ADDR_LEN]= {0x24,0x0a,0xc4,0xc1,0x1e,0x08};
const uint8_t *dest_addrs[MWIFI_ADDR_LEN]= {0x9c,0xa6,0x15,0x1d,0x3d,0x41};

MDF_LOGI("NODE task is running1");

for (;;) {
    if (!mwifi_is_connected()) {
        vTaskDelay(500 / portTICK_RATE_MS);
        continue;
    }

    size = asprintf(&data, "{\"seq1\":%d,\"layer\":%d,\"status\":%d}",
                    count++, esp_mesh_get_layer(), gpio_get_level(CONFIG_LED_GPIO_NUM));

    MDF_LOGD("Node send2, size: %d, data: %s", size, data);
    ret = mwifi_write(dest_addrs, &data_type, data, size, true);
    MDF_FREE(data);
    MDF_ERROR_CONTINUE(ret != MDF_OK, "<%s> mwifi_writedongjie", mdf_err_to_name(ret));

    vTaskDelay(1000/ portTICK_RATE_MS);
}

MDF_LOGW("NODE task is exit");

vTaskDelete(NULL);

}

A panic occurs on the route device side

I tried esp-mdf/examples/get-started.

A panic occurs on the route device side.

Wha worng??

I (29) boot: ESP-IDF v3.3-dev-264-g8a69ffc36 2nd stage bootloader
I (30) boot: compile time 13:15:10
I (30) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed      : 40MHz
I (40) boot: SPI Mode       : DIO
I (44) boot: SPI Flash Size : 4MB
I (48) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (66) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (74) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (81) boot:  3 factory          factory app      00 00 00010000 00140000
I (88) boot:  4 ota_0            OTA app          00 10 00150000 00140000
I (96) boot:  5 ota_1            OTA app          00 11 00290000 00140000
I (103) boot:  6 coredump         Unknown data     01 03 003d0000 00010000
I (111) boot:  7 reserved         Unknown data     01 fe 003e0000 00020000
I (119) boot: End of partition table
I (123) boot: Defaulting to factory image
I (127) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1f3a8 (127912) map
I (181) esp_image: segment 1: paddr=0x0002f3d0 vaddr=0x3ffb0000 size=0x00c40 (  3136) load
I (183) esp_image: segment 2: paddr=0x00030018 vaddr=0x400d0018 size=0x91a84 (596612) map
0x400d0018: _stext at ??:?

I (397) esp_image: segment 3: paddr=0x000c1aa4 vaddr=0x3ffb0c40 size=0x01d60 (  7520) load
I (400) esp_image: segment 4: paddr=0x000c380c vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at /home/robotics/esp-mdf/esp-idf/components/freertos/xtensa_vectors.S:1779

I (404) esp_image: segment 5: paddr=0x000c3c14 vaddr=0x40080400 size=0x10ce0 ( 68832) load
I (451) boot: Loaded app from partition at offset 0x10000
I (451) boot: Disabling RNG early entropy source...
I (452) cpu_start: Pro cpu up.
I (455) cpu_start: Single core mode
I (460) heap_init: Initializing. RAM available for dynamic allocation:
I (467) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (473) heap_init: At 3FFB9528 len 00026AD8 (154 KiB): DRAM
I (479) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
I (485) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
I (491) heap_init: At 400910E0 len 0000EF20 (59 KiB): IRAM
I (498) cpu_start: Pro cpu start user code
I (180) cpu_start: Starting scheduler on PRO CPU.
I (206) wifi: wifi driver task: 3ffc17d8, prio:23, stack:3584, core=0
I (206) wifi: wifi firmware version: 0bff4fb
I (207) wifi: config NVS flash: enabled
I (209) wifi: config nano formating: disabled
I (213) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (222) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (239) wifi: Init dynamic tx buffer num: 32
I (240) wifi: Init data frame dynamic rx buffer num: 32
I (241) wifi: Init management frame dynamic rx buffer num: 32
I (247) wifi: Init static rx buffer size: 1600
I (251) wifi: Init static rx buffer num: 10
I (254) wifi: Init dynamic rx buffer num: 32
I (259) wifi: Set ps type: 0

I (321) phy: phy_version: 4008, c9ae59f, Jan 25 2019, 16:54:06, 0, 0
I (322) wifi: mode : sta (30:ae:a4:ca:e1:40)
I (324) [mwifi, 138]: esp-mdf version: 268f292-dirty
W (326) wifi: [beacon]interval:100ms
I (330) wifi: mode : sta (30:ae:a4:ca:e1:40) + softAP (30:ae:a4:ca:e1:41)
I (338) wifi: Init max length of beacon: 752/752
I (341) wifi: Init max length of beacon: 752/752
I (348) mesh: [IO]disable self-organizing<reconnect>
W (350) wifi: [beacon]interval:100ms
I (353) mesh: [CONFIG]invalid router settings, ssid_len:0, ssid:, bssid:00:00:00:00:00:00
I (1356) wifi: Set ps type: 0

I (1361) mesh: [MANUAL]designated as root and router is not set
I (1361) [mwifi, 98]: MESH is started
I (1362) [get_started, 199]: event_loop_cb, event: 0
I (1366) [get_started, 203]: MESH is started
I (1372) [get_started, 40]: Root is running
I (2562) wifi: n:13 2, o:13 0, ap:13 2, sta:0 0, prof:13
I (2563) wifi: station: 3c:71:bf:94:66:9c join, AID=1, bgn, 40D
I (2566) [mwifi, 116]: Routing table is changed by adding newly joined children add_num: 1, total_num: 2
I (2572) [get_started, 199]: event_loop_cb, event: 5
I (2577) [get_started, 199]: event_loop_cb, event: 3
I (3059) mesh: 1009[xrsp:1]the asked:7, max window:4, force to increase/decrease(up) xseqno:1 for child 3c:71:bf:94:66:9c, xrsp_seqno:4, heap:177388
I (3069) mesh: 1163[recv]cidx[0]3c:71:bf:94:66:9c, xseqno duplicate check failure, new xseqno:7, in:1, out:1, pending:0
I (3072) mesh: 1172[recv]cidx[0]3c:71:bf:94:66:9c xseqno loss, current/new:0/7, in:1, out:1, pending:0
I (3082) [get_started, 52]: Root receive, addr: 3c:71:bf:94:66:9c, size: 15, data: (6) Hello root!
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d5635  PS      : 0x00060730  A0      : 0x800d2eec  A1      : 0x3ffd46f0
0x400d5635: mwifi_root_write at /home/robotics/esp-mdf/components/mwifi/mwifi.c:917 (discriminator 1)

A2      : 0x00000000  A3      : 0x00000004  A4      : 0x00000000  A5      : 0x00000000
A6      : 0x0000000f  A7      : 0x00000000  A8      : 0x800d562f  A9      : 0x3ffd46d0
A10     : 0x00000c13  A11     : 0x000000bf  A12     : 0x00000005  A13     : 0x3ffd472c
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000010  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x4000c349  LEND    : 0x4000c36b  LCOUNT  : 0xffffffff

Backtrace: 0x400d5635:0x3ffd46f0 0x400d2ee9:0x3ffd4780 0x4008b719:0x3ffd47d0
0x400d5635: mwifi_root_write at /home/robotics/esp-mdf/components/mwifi/mwifi.c:917 (discriminator 1)

0x400d2ee9: root_task at /home/robotics/esp-mdf/examples/get-started/main/get_started.c:55 (discriminator 1)

0x4008b719: vPortTaskWrapper at /home/robotics/esp-mdf/esp-idf/components/freertos/port.c:403


Rebooting...
ets Jun  8 2016 00:22:57

mwifi报告一处疑似bug

在使用mwifi_root_write( )函数进行广播时,发现广播多几次后MDF会打印“The buffer space of the memory record is full”警告,故进入函数查找原因,发现mwifi.c line 903 - 904:
tmp_addrs = MDF_MALLOC(addrs_num * sizeof(mesh_addr_t));
ESP_ERROR_CHECK(esp_mesh_get_routing_table((mesh_addr_t *)addrs_list,addrs_num * sizeof(mesh_addr_t), (int *)&addrs_num));
按网络内节点数量大小申请heap memery给tmp_addrs待使用,应该是用来填装数据发送目标mac地址列表的,但是实际获取时却使用了形参指针addrs_list,感觉应该是手快打错了;而函数内收尾时对tmp_addrs进行释放:MDF_FREE(tmp_addrs);,addrs_list便一直占用内存,导致内存泄露。
我把其中关键几处addrs_list改为tmp_addrs后,警告便没有再出现,想问一下这样修改对不对,会不会产生不良后果。

CMake Error

hello i cant build it,the error blow

CMake Error at D:/Espressif/esp/esp-mdf/esp-idf/tools/cmake/project.cmake:57 (id
f_set_global_variables):
Unknown CMake command "idf_set_global_variables".
Call Stack (most recent call first):
CMakeLists.txt:20 (project)

Selecting an appropriate wifi router?

Problem: 100 ESP32s robots communicating over wifi 10 times a second.

ESP32 mesh uses 2.4 Ghz signal so am wondering what the best practice might be for choosing a router? I am assuming that a dual band or tri band would make no sense. I am also wondering if it is actually better to choose multiple lower cost routers to support this amount of connections?

Light example: White color ?

Not a bug, just wanted to know what is the right way of doing a RGBW lamp:

https://hackaday.io/project/163672-esp32-meshkit-unexpensive-rgb-led-panels

Started a project in Hackaday to make your own ESP-Mesh lamp and I'm using just the RGB PWM outputs. I though it would be possible to combine all Red, Green and Blue to make white, but I think white has it's own channel right :

11 | GPIO23 | O | PWM_BR output control
12 | GPIO19 | O | PWM_CT output control

My question is, should white be connected to GPIO19 ? Or what would be the best option to modify this and make it work with normal RGB Leds ?
Sorry if it's not such an interesting question, I wanted to create a project so electronic fans can create their own RGB Lamps with things that are already somewhere in their garage :)

Also last question, what is the default PWM frequency in the Light example ?
I guess it's possible to configure it editing the code. Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.