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

Pass ctrl-q char to unlock it from telnet hung state #37

Open
wants to merge 2 commits into
base: ver_4.0.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions netmiko/cisco_base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ def find_prompt_special_case(self, delay_factor: float = 1.0,
if cxr_pattern in prompt.lower():
time.sleep((delay_factor * 0.1) + 3)
prompt = self.read_channel()
if count == 3 and not prompt:
self.log.info("Probably in telnet hung state. Passing ctrl-q . Potential DDTS: CSCwh67759 and CSCvy64395")
self.write_channel('\x11')
time.sleep(15)
prompt = self.read_channel().strip()
if prompt:
self.log.info(f"Prompt found after passing ctrl-q. Prompt is {prompt}")
break
count += 1

# If multiple lines in the output take the last line
Expand Down