Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesh_lite upgrade v1.0.0 wifi_prov_mgr compilation exception (AEGHB-778) #115

Open
yel-best opened this issue Aug 12, 2024 · 5 comments
Open

Comments

@yel-best
Copy link

yel-best commented Aug 12, 2024

Hi

use mesh_lite v1.0.0 version

image

After compiling, the following error will appear. What is the reason? After upgrading, an error is reported. I originally used v0.10.3 to upgrade to v1.0.0 version, through the configuration file:

espressif/mesh_lite: ">=1.0.0"

The latest mesh_lite version of components.espressif.com is only v1.0.0. When will v1.0.1 be updated?

E:/MyProject/IoT/PlatformIO-ESP/esp-data-collect/mesh-lite-terminal/managed_components/espressif__mesh_lite/src/wifi_prov/wifi_prov_mgr.c:203:17: error: 'strncpy' output may be truncated copying 32 bytes from a string of length 39 [-Werror=stringop-truncation]
  203 |                 strncpy((char*)wifi_prov_mgr_mesh_lite_cfg.ssid, softap_ssid, sizeof(wifi_prov_mgr_mesh_lite_cfg.ssid));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/MyProject/IoT/PlatformIO-ESP/esp-data-collect/mesh-lite-terminal/managed_components/espressif__mesh_lite/src/wifi_prov/wifi_prov_mgr.c:196:17: error: 'strncpy' output may be truncated copying 32 bytes from a string of length 39 [-Werror=stringop-truncation]
  196 |                 strncpy((char*)wifi_prov_mgr_mesh_lite_cfg.ssid, softap_ssid, sizeof(wifi_prov_mgr_mesh_lite_cfg.ssid));

image

@github-actions github-actions bot changed the title mesh_lite upgrade v1.0.0 wifi_prov_mgr compilation exception mesh_lite upgrade v1.0.0 wifi_prov_mgr compilation exception (AEGHB-778) Aug 12, 2024
@tswen
Copy link
Contributor

tswen commented Aug 12, 2024

What version is your idf? After updating the mesh lite component, you can delete the build folder and recompile it.
Theoretically, this patch will be automatically applied to esp-idf during compilation.
You can check whether the idf contains the changes in this patch.
In addition, if you do not use the zero provisioning function of mesh_lite, you can only manually change this part
image

@yel-best
Copy link
Author

Contributor

Hi

Use IDF Version 5.1.4

I modified the configuration file version number from 0.10.3 to 1.0.0 and recompiled it and the error occurred

If you modify the mesh_lite component without performing other operations and compile directly, an error message will appear

@tswen
Copy link
Contributor

tswen commented Aug 12, 2024

What's the error? Can you provide a screenshot or log file?

@yel-best
Copy link
Author

yel-best commented Aug 12, 2024

What's the error? Can you provide a screenshot or log file?

Configuring CONFIG_BRIDGE_SOFTAP_SSID TERMINAL_MESH_WIFI

Is it related to Configuring?

#ifdef CONFIG_BRIDGE_SOFTAP_SSID_END_WITH_THE_MAC
                snprintf(softap_ssid, sizeof(softap_ssid), "%.25s_%02x%02x%02x", CONFIG_BRIDGE_SOFTAP_SSID, softap_mac[3], softap_mac[4], softap_mac[5]);
#else
                snprintf(softap_ssid, sizeof(softap_ssid), "%.32s", CONFIG_BRIDGE_SOFTAP_SSID);
#endif
                strncpy((char*)wifi_prov_mgr_mesh_lite_cfg.ssid, softap_ssid, sizeof(wifi_prov_mgr_mesh_lite_cfg.ssid));

image

image

@tswen
Copy link
Contributor

tswen commented Aug 14, 2024

Did you add any compilation options to your project CMakeLists? I can compile it normally without any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants