Skip to content
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

Implements the --follow option in the "serial monitor" command. #240

Merged
merged 3 commits into from Feb 7, 2017

Conversation

@derekmpeterson
Copy link
Contributor

commented Apr 20, 2016

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.

Implements the --follow option in the "serial monitor" command.
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.
@coveralls

This comment has been minimized.

Copy link

commented Apr 20, 2016

Coverage Status

Coverage decreased (-0.7%) to 18.513% when pulling a150b18 on derekmpeterson:poll_serial into b64252a on spark:master.

@coveralls

This comment has been minimized.

Copy link

commented Apr 21, 2016

Coverage Status

Coverage decreased (-0.7%) to 18.501% when pulling c80777a on derekmpeterson:poll_serial into b64252a on spark:master.

@coveralls

This comment has been minimized.

Copy link

commented Apr 21, 2016

Coverage Status

Coverage decreased (-0.2%) to 18.999% when pulling 4fe0ea2 on derekmpeterson:poll_serial into 34364d9 on spark:master.

@monkbroc

This comment has been minimized.

Copy link
Member

commented May 13, 2016

Thanks for the contribution. l need a little time to take a look at the code.

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2017

Nice work @derekmpeterson, thanks!

Tested with and without the --folllow flag with 0, 1 and 2 devices connected to serial.

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2017

This PR will automatically close once the changes are moved to master. Should have edited the base and changed from master to develop.

@m-mcgowan m-mcgowan merged commit 4fe0ea2 into particle-iot:master Feb 7, 2017

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.2%) to 18.999%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@KravitzLab

This comment has been minimized.

Copy link

commented Aug 14, 2017

I have tried "particle serial monitor --follow" and after my photon goes to sleep and wakes up again, the command line doesn't monitor the serial COM anymore! This is the same problem with PuTTY as well...

@kennethlimcp

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2017

@KravitzLab something like CoolTerm should suit your needs.

Which OS are you on? I will need to try this --follow flag on my side as well.

@KravitzLab

This comment has been minimized.

Copy link

commented Aug 15, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.