Serial Monitor Slow Startup (New Issue)

Here’s mine:

Here’s mine as well, there were a few additional “Bluetooth” serial devices that went off the end but the device I was working with was COM17.

Could you run pio upgrade --dev. Does it start fast now?

Sorry, it’s still slow after upgrading.
-Keith

Same here, core upgraded and the project still compiles/works but the monitor startup is still delayed 5 seconds or so.

@aerokeith , @spurlock , thanks for helping us to fix this issue.

I’ve just created a separate branch of PIO Core with debug information. Please open PlatformIO Core terminal in VSCode (terminal icon on the bottom status bar) and type:

pip install -U https://github.com/platformio/platformio-core/archive/refs/heads/feature/debug-dev-monitor.zip
pio device monitor

You will see a debug output with time frames. Please share it here.

Hi @ivankravets !
I had the same problems with the serial terminal.
After installing the package you specified, it became much faster.
However, I don’t see any time frames.

Could you provide an output of pio device monitor?

Start device finder 1661457512.5254374
--- Terminal on COM10 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2    
load:0x3fff0030,len:1184 
load:0x40078000,len:13132
load:0x40080400,len:3036 
entry 0x400805e4

Sorry, I didn’t notice the timestamp before

Ivan,

I’d like to help more, but I’m leaving for Burning Man in a couple of hours. I used PlatformIO to write the LED lighting code for a large art project (25 foot glass/steel shark), and I’m still making tweaks, so I don’t want to mess with my configuration right now. I hope you understand. I’ll be totally off-grid for the next 12 days, so I’ll check in when I get back. I hope the other guys can help you track down the problem.

Thanks!

-Keith

@sivar2311 , you don’t have any issues as you specify the monitor port directly in the platformio.ini file.

Do you see instantly the first line with “Start device finder…”?

I always specify the monitor port in platformio.ini. Even with that, it took a long time to open.

For another reason, I reinstalled Python and PlatformIO yesterday.
Since then, opening the monitor is very fast again.

Unfortunately, I cannot restore the previous state for an analysis.
For me the problem is solved. Thanks for your help :slight_smile:

I tried installing the debug device monitor but I’m not seeing any additional output. Here’s what I got while installing the code and running pio device monitor:

Just checking a couple of things I noticed that if I specify the port value, either on the command line or in the platform.io then the terminal starts up quite quickly. If I don’t specify a port then it takes the 5 seconds or more to find the port and then start up.

Please remove the manually specified port and run pio device monitor. You should see debug information with all timeframes.

I have tried without specifying a port and I get the long delay before opening but no debug output (which is why I included the installation output).

Something went wrong or you have multiple PlatformIO Cores in the system. If you start the device monitor outside your project without specifying the serial port, do you see a debug message that starts with “Start device finder”?

No I do not see any message like that. How would I tell if I have multiple PlatformIO Cores in the system? Can you tell anything from the installation output I posted? Let me know if there is anything else I can do to get the debug code running.

  1. Please open Windows Task Manager and kill all python.exe processes.
  2. Repeat again instructions from Serial Monitor Slow Startup (New Issue) - #11 by ivankravets

Does it work now?

Hi Ivan, there weren’t any other python.exe processes running. There are several python programs in the environment path variable so I started a command shell, removed all the python programs from the path variable and started Visual Studio Code from there and tried running the pip install command again. I get the same output result which is, if I’m reading it correctly, indicating that it is not updating any of the packages in the zip file to my system. I unzipped the package and I can see in the finder.py file that you’ve added debug code but when I look at the finder.py file on my system I can see that it is not getting updated to the version from the zip file. Is there some way to force pip to install the changes? Are the changes extensive, i.e. could I go and make the same changes in my installed files myself or are there too many changes for me to make manually? Sorry I don’t understand the python environment better to help get past this install issue.

Thanks,

Randy