-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
I can't flash my device when I use a Docker container (IDFGH-9230) #10617
Comments
I added/changed few lines in "forwardPorts": [],
"runArgs": [
/*"--privileged",*/
"--isolation=process",
"--device=class/4d36e978-e325-11ce-bfc1-08002be10318"
] however when I click on "Reopen in Container", I obtain an error due to a Command failed.
|
I assume you tried COM3 before trying the GUID? Because on Linux, this is how I'd do it |
@TheElectronicMusicProject Hello, have you been able to figure this out or find some working solution? It seems that currently it's not possible to share windows devices with linux containers in windows docker. At least according to these docker/for-win#1018 and https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/hardware-devices-in-containers. Maybe usbipd-win can be used to workaround this somehow. Anyway I for sure may be missing something, but I'm not sure if we can do anything about this. |
I haven't been able to communicate through a serial COM port by using Docker. Maybe using Linux could solve this problem but I won't try now. What I think it is possible, but I haven't tried this method, is to compile ( If there are other possibilities please let me know! |
@TheElectronicMusicProject Hello, yes, using the container to build your app and then flashing directly from within window should IMHO work without problems, even though I understand it's not very convenient way. Unfortunately at this point I'm not aware about other possibility :(. Would it be ok with you if we close this as IIUC this is not currently possible to do from within a docker? Thank you |
One other option to try might be to run the (Esptool project releases contain a standalone esp_rfc2217_server.exe program which you can run on Windows without having to install Python.) |
Ah, I was not aware about the |
Thank you @igrr for your suggestions.
Firstly, I copied in my project I opened a terminal and I ran (my ESP32 was connected to COM3): Then, the terminal showed the following lines and seemed to work:
I opened the Docker container and added a new port with port number 4000 and the local address became localhost:4000 However this generated an error:
Any idea how can be solved? |
Are the ports the same on both the host and guest? Port 4000 inside the docker need to be connected to the same 4000 port on the host. |
... and please try |
Hello @TheElectronicMusicProject ,
So maybe this can help with your problem. Thank you EDIT: I tested with current IDF master branch only |
Hello, I'm close to the solution, but I need a clarification. @fhrbata you say that I should run one of the three bash commands, so I used the second one. In my case is: From the host side I used: Then, from the terminal I see:
However the ESP32 continues running the previous code, and not the one of this project (I observe this by looking at the terminal). Also, why am I not able to run this command inside the container (from |
Hello @TheElectronicMusicProject ,
The To actually flash the device, you should run the With this you should be hopefully able to flash your app.
IMHO there should be no difference between running the commands interactively( EDIT: Maybe try to use the host IP instead of the HTH |
Thank you for your patience @fhrbata . I used But from the terminal I see:
Any idea what's happening? |
Most likely you are not running a command from an ESP-IDF project directory. |
@dobairoland @TheElectronicMusicProject
So for
Without the Thank you |
Nice explanation @fhrbata ! I used: But it gave me the following error on the ESP-IDF terminal:
So I switched to the Command Prompt and I used Now, I didn't tried this inside the Docker container of VSCode, however I think it is sufficient to close this. Thank you to all! P.S. First of all I used |
@TheElectronicMusicProject Yeah, that confusion is on me. The should be the same as this with spelling the host directory explicitly
It's great to hear that you got it working! |
@dobairoland Hi Roland, I believe, based on @TheElectronicMusicProject feedback, that this can be closed. Thank you all |
On Windows/Mac the serial port cannot be access directly inside docker container. This is already mentioned in the documentation. This expands the documentation for steps which can be used to overcome this limitation by using remote serial port access via telnet protocol. Closes #10617 Signed-off-by: Frantisek Hrbata <[email protected]>
This is cool, but how could run this commands from within a working container? like this gives me port closed/service not working!
|
Hello @mvcorrea-ufc ,
why is the container port
Don't you get
I'm not sure I understand what you are trying to achieve, but using the HTH Thank you |
Answers checklist.
IDF version.
v4.4
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
ESP32-WROOM-32
Power Supply used.
USB
What is the expected behavior?
With a simple project, where I can build/flash/monitor my application, I want to test it on a Docker container. The device is detected on COM3.
I created a container that is working. The version in the image is
v5.1-dev-3025-g49551cc48c
.I'm able to build it correctly, however when I try to flash it, I find some errors.
In particular, no COM serial port can be found (by default is on
/dev/ttyUSB1
but it's not a valid COM port).What is the actual behavior?
This is the error I obtain:
I'm not able to set up Docker in order to make it see the COM ports available.
Steps to reproduce.
I attach my project folder:
esp1.zip
Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: