CLI serial monitor very slow to start up

I have been using the CLI serial monitor for debugging my Photon. I have a Serial.begin(9600) at the beginning of my setup as well as a couple Serial.println calls. I also call print many times in my loop.

My problem is that it takes ~35 seconds(!) from device reset for me to be able to access the serial data from the board via particle serial monitor. particle serial list shows the device present. Through this time, the board is running it’s normal code and finishes the setup method and is well into many iterations of the loop. Any suggestions on where the problem would be from?

This is what I get when trying to call the monitor during that 35 second window:

particle serial monitor                                                                                                                                                                                 
Opening serial monitor for com port: "/dev/ttyACM0"
Serial err: Error: Cannot open /dev/ttyACM0
Serial problems, please reconnect the device.

Firmware is 0.4.9.
CLI tool is 1.11.0

Thanks for any suggestions!

If you’re using Ubuntu, uninstall the modemmanager package. It’s installed by default and likes to take over the serial port and send modem AT commands for 45 seconds or so.


Heck yeah! I am on Ubuntu. Uninstalling it fixed the problem! You just shaved 45sec*million time for me haha. Thank goodness for your help!

:particle: :particle: :particle: :particle:

1 Like

Excellent! I’m gonna reward myself with a beer. Cheers!