Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Implements the --follow option in the "serial monitor" command. #240
Addresses #234 - Invoking the command with --follow will poll for an available serial device, and when one becomes available, immediately connect. If the connection is interrupted, it will attempt to reconnect when the device is available again.
The monitor will reconnect automatically after rebooting or reflashing the device. This makes debugging much more convenient.
While I was in there, in response to a TODO comment, I also added an interrupt handler to attempt to gracefully clean up the serial connection on SIGINT, SIGQUIT, SIGTERM, or exit.
@kennethlimcp I got this solution off: https://community.particle.io/t/putty-or-other-serial-monitor-that-automatically-reconnects-windows/33579/7 check the comment made by rickkas7. I'll check CoolTerm out, but in case anyone else is reading this thread: Tera Term seems to be working as well.
I am running Windows 7. Check it out and let me know what you get! I think this functionality is quite important to users developing low power systems, and debug Particle products after sleep.