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

My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version (IEP-1267) (IDFGH-13924) (AEGHB-873) #129

Open
sfeutrier opened this issue Jun 20, 2024 · 22 comments
Assignees

Comments

@sfeutrier
Copy link

sfeutrier commented Jun 20, 2024

Describe the bug
I'm trying for hours to make the wifi provisioning sample to work, without any luck!
After investigation of the source code, I found out that everything related to "esp_wifi_start" (starting Wi-Fi in Station Mode) is commented out.
This is not the case here: https://github.com/espressif/esp-idf/blob/v5.2.2/components/wifi_provisioning/src/manager.c (line 1556) while in my folder "C:\Espressif\frameworks\esp-idf-v5.2.2\components\wifi_provisioning\src\manager.c", this is the line 1658... How ?
What is the correct way to solve my issue?

To Reproduce
Steps to reproduce the behavior:
I guess install Espressif IDE with esp-idf v5.2.2

Expected behavior
Folder files and tagged version files should be identical

Screenshots
What I have in my local version of esp-idf
image
What I should have when looking at the tag v5.2.2 in Github
image

@github-actions github-actions bot changed the title My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version (IEP-1267) Jun 20, 2024
@kolipakakondal
Copy link

Hi @Alvin1Zhang Could you please point to the right person who can check this?

@sfeutrier
Copy link
Author

Hello,

There is a workaround for this: just go in in the tab "Espressif" and open the "ESP-IDF manager" just install the esp-df version 5.2.2 at another place and select it.
Note: there is an issue that Eclipse Plugging does not succeed to access to the default path to GIT on my side (in the WindowsApp folder), I have just selected another instance at the C root directory

However this is still a real problem as it makes you used a "bugged" version of the ESP-IDF without letting you know at all!

@sfeutrier
Copy link
Author

Any update on this?

@Alvin1Zhang Alvin1Zhang transferred this issue from espressif/idf-eclipse-plugin Oct 22, 2024
@github-actions github-actions bot changed the title My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version (IEP-1267) My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version (IEP-1267) (IDFGH-13924) Oct 22, 2024
@sfeutrier
Copy link
Author

sfeutrier commented Oct 22, 2024

My project uses WiFi Mesh lite.
I have recently updated my Espressif-IDE to v3.1.0.
Now, every time I build, the two files are regenerated and thus WiFi does not work. Why the SDK can be modified by itself like this when I compile?
Also, I tried to update to v5.2.3 and it did not change anything... What a pain.

@AndriiFilippov
Copy link

Hello,

There is a workaround for this: just go in in the tab "Espressif" and open the "ESP-IDF manager" just install the esp-df version 5.2.2 at another place and select it. Note: there is an issue that Eclipse Plugging does not succeed to access to the default path to GIT on my side (in the WindowsApp folder), I have just selected another instance at the C root directory

However this is still a real problem as it makes you used a "bugged" version of the ESP-IDF without letting you know at all!

Hello,

WindowsApps folder is not the default path for Git when installed via the official Git installer or other typical methods.
Usually it is something like this:
C:\Program Files\Git\cmd\git.exe
Ofc, you still can use Microsoft Store to install Git, however, it might lead to potential permission issues, as the WindowsApps folder is protected and access is restricted by OS.

@AndriiFilippov
Copy link

My project uses WiFi Mesh lite. I have recently updated my Espressif-IDE to v3.1.0. Now, every time I build, the two files are regenerated and thus WiFi does not work. Why the SDK can be modified by itself like this when I compile? Also, I tried to update to v5.2.3 and it did not change anything... What a pain.

Please, provide more details:
Which two files are being regenerated that cause Wi-Fi to stop working? Does it just regenerate, or is it reset to default?
Does this happen with a specific example, or do you encounter it with any of them?

@sfeutrier
Copy link
Author

sfeutrier commented Oct 22, 2024

Hi @AndriiFilippov,

About the Git bin folder, it was for people that have the same issue. I install everything following the Espressif-IDE Windows installation package. Maybe I missed something. Anyway.

I gave an example in my initial description. To be exact, the two files are:

  • C:\Espressif\frameworks\esp-idf-v5.2.2\components\lwip\apps\dhcpserver\dhcpserver.c
  • C:\Espressif\frameworks\esp-idf-v5.2.2\components\wifi_provisioning\src\manager.c

The file that stop WiFi to work is the file I mentionned in my original description (manager.c). As you can see in the screenshot I gave, a lot of line are commented.

I don't know what you mean between "reset" or "regenerate". As I said in my original description, the files are modified locally. My local git copy does not match the remote.
I have a project that does not use any managed component (no WiFi, no wireless) and it does not re-modify the SDK.

@AndriiFilippov
Copy link

AndriiFilippov commented Oct 22, 2024

@sfeutrier hi,
Thank you for the quick response.
How do you download ESP-IDF?
Using Espressif IDE "ESP-IDF: Manager" option
image
or Offline Installer
image
or manually

git clone -b v5.2.3 --recursive https://github.com/espressif/esp-idf.git esp-idf-v5.2.3

@sfeutrier
Copy link
Author

image

Your welcome!
Any of these it seems xD. I used the "Online installer" if I believe my Download folder and it installed the esp-idf by itself (I don't remember manually choosing anything during the installation to be honest).

@sfeutrier
Copy link
Author

Also, I installed the ESP-IDF v5.2.3 thanks to the ESP-IDF Manager and it has the same issue when I built.

@kolipakakondal
Copy link

Hi @sfeutrier

Unfortunately, I am unable to reproduce this problem to investigate further.

I have verified this with ESP-IDF v5.2.2 and v5.2.3 using the Espressif-IDE, running the wifi_prov_mgr example. I am able to provision the device without any issues, and I don’t see any code changes in the files mentioned in the respective IDF folders.

I’m not sure what might have caused this problem in your case.

image

@sfeutrier
Copy link
Author

Hello @kolipakakondal,

Thank you for testing!
I confirm that 2 of my colleagues have tested and even with the modified files, WiFi now works (maybe because we use WiFi Mesh lite, I don't know)
That's very strange you cannot reproduce the issue. We are 3 facing the same issue. Maybe because we downloaded the installer at the same moment. I don't know.
Is this supposed to happen that building a project modify files in the ESP-IDF sdk? It seems very unsecure.
Could it be an issue with our project or the Espressif-IDE? (I have updated the Espressif-IDE though and it did not change anything), maybe I need to reinstall it completly).

@sfeutrier
Copy link
Author

Hello,

I did the same test with "wifi_prov_mgr" and indeed, it does not modify any files in my esp-idf SDK.
BUT, if I import in my Espressif-IDE the sample "mesh_local_control", it does modify my files! That means it is related to esp-mesh-lite!!

@igrr
Copy link
Member

igrr commented Oct 24, 2024

This is likely related to this line in esp-mesh-lite:

execute_process(COMMAND
git apply ${CMAKE_CURRENT_LIST_DIR}/src/wifi_prov/wifi_provisioning.patch
WORKING_DIRECTORY $ENV{IDF_PATH})

@tswen could you please take a look? Probably there is a better way to do this than applying a patch — this command may fail if esp-idf is in a read-only directory. Plus this messes with other projects which may use wifi_provisioning.

@sfeutrier
Copy link
Author

sfeutrier commented Oct 24, 2024

Hello @igrr,
Thanks for pointing that out! :)
I agree that it is a mess when you develop other projects that does not use mesh but provisionning (or just WiFi maybe). Plus it means if we are several on the same project, I cannot relate on the generated code because everyone can have a "different" SDK.

Also, note that since I install Espressif-IDE v3.1.0, more files are now modified x). You can see below thelist.
image

@tswen
Copy link
Contributor

tswen commented Oct 25, 2024

This is likely related to this line in esp-mesh-lite:

execute_process(COMMAND
git apply ${CMAKE_CURRENT_LIST_DIR}/src/wifi_prov/wifi_provisioning.patch
WORKING_DIRECTORY $ENV{IDF_PATH})

@tswen could you please take a look? Probably there is a better way to do this than applying a patch — this command may fail if esp-idf is in a read-only directory. Plus this messes with other projects which may use wifi_provisioning.

Sure, we will reassess a better approach, and any new developments will be communicated here.

@sfeutrier
Copy link
Author

@tswen I guess it will take time to make this change. During this, I cannot guarantee that between all my colleagues and across projects, we have the same binary file built because the SDK itself is different...
Do you have any idea of deadline?

@espressif-bot espressif-bot assigned tswen and unassigned Alvin1Zhang Oct 28, 2024
@tswen
Copy link
Contributor

tswen commented Nov 1, 2024

@sfeutrier We plan to integrate the wifi_provisioning component into the mesh-lite component, maintaining content modified due to mesh-lite within it. Since I am currently busy with other tasks, this will take some time, and we expect to merge it into the esp-mesh-lite repository around mid-November.

@sfeutrier
Copy link
Author

Hi @tswen, thank you for the follow up!

@mahavirj mahavirj transferred this issue from espressif/esp-idf Nov 12, 2024
@github-actions github-actions bot changed the title My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version (IEP-1267) (IDFGH-13924) My ESP-IDF v5.2.2 is not the same as the github v5.2.2 tagged version (IEP-1267) (IDFGH-13924) (AEGHB-873) Nov 12, 2024
@tswen
Copy link
Contributor

tswen commented Nov 14, 2024

@sfeutrier Hello, you can update the mesh-lite component to the latest master branch. The new mesh lite component will maintain wifi_provisioning separately without affecting idf.

@sfeutrier
Copy link
Author

sfeutrier commented Nov 26, 2024

Hey @tswen I tried last week but there are managed by the IDF Component manager and I can succeed to update.
Do you know where I can find the proper way to update it and test?

@tswen
Copy link
Contributor

tswen commented Dec 18, 2024

@sfeutrier mesh lite component has been updated to 1.0.1, which includes the changes mentioned above.

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

6 participants