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

Update consutil for picocom v1.7 #300

Closed
wants to merge 18 commits into from
Closed

Conversation

cawand
Copy link
Contributor

@cawand cawand commented Aug 16, 2018

- What I did
Updated consutil for picocom v1.7 by removing QUIET flag and accounting for /var/lock files
- How I did it
Removed any code that used QUIET flag. Added code in clear() that removes /var/lock/LCK..ttyUSB file
- How to verify it
Run connect line <linenumber> or connect device <devicename> and clear line <linenumber> on device with picocom v1.7. Ensure that you can successfully connect to devices, that you get an error for trying to connect to a busy device, and that clear successfully clears a busy line.

-->

cawand added 17 commits July 3, 2018 18:28
…ect skeletons

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
…nd connect line

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Get flow control in addition to baud rate
Get line number for a specific device name from config db

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
fix picocom ready message, fix regex for date in getBusyDevices, change default picocom output, change comments

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
…o connect-line

Add connect line entry point code


# Conflicts:
#	consutil/lib.py
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
…commands

Use pexpect for run_command instead of subprocess

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Add all macros to top of file,
getConnectionInfo returns actual baud rate, configured baud rate, and flow control
getLineNumber used for all targets (line numbers and device names)

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
getConnectionInfo returns actual baud, configured baud, and flow control
for show(), align baud rates by "/"
clean up connect() and remove macros

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
…o connect-line

# Conflicts:
#	consutil/lib.py
#	consutil/main.py

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
…files

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
@lguohan
Copy link
Contributor

lguohan commented Aug 16, 2018

what's the nature of this change? is it because -q is not supported by picocom?

@cawand
Copy link
Contributor Author

cawand commented Aug 16, 2018

Yes - originally I developed consutil using picocom v3, but now we're using picocom v1.7, which doesn't have the -q flag and uses /var/lock files

consutil/main.py Outdated
@@ -62,6 +62,8 @@ def clear(linenum):
cmd = "sudo kill -SIGTERM " + pid
click.echo("Sending SIGTERM to process " + pid)
run_command(cmd)
cmd = "sudo rm /var/lock/LCK..ttyUSB" + linenum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to add -f flag to rm command to help ensure file is deleted.

Signed-off-by: Cayla Wanderman-Milne <t-cawand@microsoft.com>
@lguohan
Copy link
Contributor

lguohan commented Aug 17, 2018

Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated base image to 3.1, can you modify your pr accordingly?

@cawand
Copy link
Contributor Author

cawand commented Aug 17, 2018

We can delete this PR since the base image has picocom v3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants