device_type: cisco_ios_serial error using USB mini-Type B
See original GitHub issueHello @ktbyers
In some models of Cisco devices, you can find a USB mini-Type B console port on the front of the device which lets you connect serially to that device. When I am connected to a Cisco device using that Type B console cable and trying to initiate a serial connection instance, I get an error. But when I use a standard Cisco console cable (RJ-45), it works like a charm. I don’t know what is the problem with the Type B cable?
I know the two cables work with different technologies. But what is the issue in this case?
The error I get:
$ python serial_conn.py
Timed-out reading channel, pattern not found in output: terminal\ length\ 0
Router prompt not found: 'switch_'
Code sample:
#!usr/bin/env python3
from netmiko import ConnectHandler as CH
from pprint import pprint
# Define a device
device = {
"device_type": "cisco_ios_serial",
"ip": "10.1.1.1",
"username": "cisco",
"password": "cisco",
"serial_settings": {
"port": "COM4",
},
}
# Initiate a serial connection instance to device
with CH(**device) as net_connect:
output = net_connect.send_command("show version", use_textfsm=True)
pprint(output)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Mini-USB console port problem - Cisco Learning Network
I've downloaded and installed the driver for the Mini-USB console connection on many switches. TeraTerm sees the new COM3, but then it says...
Read more >USB Connector and Cable Type Guide - Newnex
Different from previously mentioned USB A type and B type connector, USB C Type connector can be used on both host controller ports...
Read more >What Is USB? USB, Micro and Mini USB | Connector Guide
The B-style connector is designed for use on USB peripheral devices. The B-style interface is squarish in shape, and has slightly beveled corners...
Read more >Amazon Basics USB 2.0 Cable - A-Male to Mini-B Cord - 6 ...
Amazon.com: Amazon Basics USB 2.0 Cable - A-Male to Mini-B Cord - 6 Feet (1.8 Meters)Black- 1-Pack : Electronics.
Read more >Pearstone USB 2.0 Type A Male to Type B Mini Male Cable
It features a type A male connector on one end and a mini type B male on the other end. Braided copper shielding...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
cisco_ios
overwrites the default and sets it to True (in its class).https://github.com/ktbyers/netmiko/blob/v3.4.0/netmiko/cisco/cisco_ios.py#L15
Note, I just changed some of this behavior in the Netmiko
develop
branch, but this is True for Netmiko version 3.4.0 which is what is released on pypy (and version 3.4.0 is also what I linked to above).I tried using
send_command_timing("show version", use_textfsm=True)
instead and it worked. But there is something I noticed which is weird to me. I also had to explicitly set"fast_cli": False
!!. Without"fast_cli": False
, I got the same error. However; I can see in theBaseConnection
class thatfast_cli
hasFalse
as its default value. (I am using Netmiko v3.4.0)