First build hello_world and with error could not open COM port

Natsu_Kawa
Posts: 5
Joined: Tue Oct 23, 2018 2:50 am

First build hello_world and with error could not open COM port

Postby Natsu_Kawa » Tue Oct 23, 2018 3:23 am

I am just a new one to ESP32 , and going to working under windows 10 ,so I just do with the official recommend that with the IED eclipse and download the esp-idf form offical host page ,and commend make menuconfig was also added and it worked well,till now everything seems to be alright but , when I first build my project hello_world ,
there goes a error like this:

raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /COM4: [Errno 2] No such file or directory: '/COM4'

and actually I finished the build , so I check the COM port , it does exist for when I open the SSCOM it worked well and even I can get some message print out that I have flashed in to this board under linux , so I just wonder where I go wrong ? I have searched this answer for 2 days and some said its the python's version that made this error , I have tried all the answer I searched form Internet , but can not resolve this error still , can anybody help me here..?
My English is not so good , but I'd try my best ..:)

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: First build hello_world and with error could not open COM port

Postby WiFive » Tue Oct 23, 2018 4:39 am

No slash

Natsu_Kawa
Posts: 5
Joined: Tue Oct 23, 2018 2:50 am

Re: First build hello_world and with error could not open COM port

Postby Natsu_Kawa » Tue Oct 23, 2018 5:16 am

well , M so sorry for ask this question because I have resolved it just now...
Because of that in windows the port is just to simulate the work condition which is under linux , so you can not set the port name by "COMn"[n = 1 , 2 , 3 ...],you have to use the port name under the linux by "/dev/ttyS0".
just wish this discussion can help some others like me who trap in this error ... :D

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: First build hello_world and with error could not open COM port

Postby ESP_Dazz » Tue Oct 23, 2018 6:12 am

Small Tip: You don't need to go into menuconfig every time to change your serial port. You can override it by using ESPPORT=COMn

Other use environment variable overrides can be found here

Who is online

Users browsing this forum: Majestic-12 [Bot] and 70 guests