Connect from USB to serial port of switch

I have someone wanting to connect to the serial management port of a switch from a PC running CentOS6. The management port on the switch is apparently baud 9600, 8 data bits, 1 stop bit & no parity They have plugged in a cable to connect and the output from lsusb is:-

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 003: ID 04b3:3025 IBM Corp. NetVista Full Width Keyboard
Bus 001 Device 004: ID 03f0:094a Hewlett-Packard Optical Mouse [672662-001]

lsusb -vs 1:2 shows the device in question and gives me:-

# lsusb -vs 1:2

Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            3.00
  iManufacturer           1 Prolific Technology Inc. 
  iProduct                2 USB-Serial Controller D
  iSerial                 3 00000C7B
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

The devices I find with usb in the name are these:-

/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D_00000C7B-if00-port0
/dev/serial/by-path/pci-0000:00:14.0-usb-0:3:1.0-port0
/dev/ttyUSB0
/dev/usbmon2
/dev/bus/usb
/dev/usbmon1
/dev/.udev/links/input\x2fby-path\x2fpci-0000:00:14.0-usb-0:5:1.0-event-mouse
/dev/.udev/links/input\x2fby-id\x2fusb-PixArt_HP_USB_Optical_Mouse-event-mouse
/dev/.udev/links/input\x2fby-path\x2fpci-0000:00:14.0-usb-0:4:1.0-event-kbd
/dev/.udev/links/input\x2fby-id\x2fusb-LITE-ON_Technology_USB_NetVista_Full_Width_Keyboard.-event-kbd
/dev/.udev/links/serial\x2fby-id\x2fusb-Prolific_Technology_Inc._USB-Serial_Controller_D_00000C7B-if00-port0
/dev/.udev/links/serial\x2fby-path\x2fpci-0000:00:14.0-usb-0:3:1.0-port0
/dev/.udev/links/input\x2fby-path\x2fpci-0000:00:14.0-usb-0:5:1.0-mouse
/dev/.udev/links/input\x2fby-id\x2fusb-PixArt_HP_USB_Optical_Mouse-mouse
/dev/.udev/db/tty:ttyUSB0
/dev/.udev/db/usbmon:usbmon0
/dev/.udev/db/usb:1-5
/dev/.udev/db/usb:1-4
/dev/.udev/db/usb:1-3
/dev/.udev/db/usb:usb2
/dev/.udev/db/usb:usb1
/dev/.udev/db/usbmon:usbmon2
/dev/.udev/db/usbmon:usbmon1
/dev/input/by-path/pci-0000:00:14.0-usb-0:5:1.0-event-mouse
/dev/input/by-path/pci-0000:00:14.0-usb-0:4:1.0-event-kbd
/dev/input/by-path/pci-0000:00:14.0-usb-0:5:1.0-mouse
/dev/input/by-id/usb-PixArt_HP_USB_Optical_Mouse-event-mouse
/dev/input/by-id/usb-LITE-ON_Technology_USB_NetVista_Full_Width_Keyboard.-event-kbd
/dev/input/by-id/usb-PixArt_HP_USB_Optical_Mouse-mouse
/dev/usbmon0

Assuming that I have to create a symbolic link as /dev/modem, what do I point it at? I've tried a few such as /dev/ttyUSB0, /dev/bus/usb/001/002 and the like, but I'm not sure how to test I've got anything right.

It's been suggested that the tool to use is minicom and I've set up the connect speed and negotiation as I've been told the serial port on the switch will expect but no output (not even rubbish) on screen. It's wanting a devices called /dev/modem which is why I presume i just need to create the link.

It's all a bit odd because it is a remote site, but the network team need to get on the serial management port of one of the other switches. They are hoping we can save a journey.

Am I even using the right approach with the right tools? For all I know, minicom might be offering dial-in to my server rather than driving a serial line the other way.

Kind regards,
Robin

What kind of cable connects the USB port on the computer to the serial port on the switch?

Are you talking about a CISCO switch with a serial port presented on a RJ45 outlet?

I'm informed it's an HP 2620 switch with a Prolific USB to serial adapter. I've not been to the site, so I'm taking it on trust or the network chap.

He's also suggested using ser2net but I've not got this RPM available to the site to install. We don't allow our remote sites to connect to public package sites, just our internal version. I would have to to package it locally, but that's a lot of work and I'm pretty unfamiliar with that process.

Hi Robin,

Could you not connect the serial from the switch to a serial port on an old PC piece of kit (running say, Windows 7), and test access from there with a terminal emulator eg, hyperterminal. Then set up remote desktop protocol (rdp) on the machine to allow remote access from the corporate network.

That may not be suitable for you but I've done similar a few times.

Dennis.

Sadly (or not depending on your viewpoint ;)) there is no Windows in the site. We just have a CentOS 6 PC and no-one technical on site.

The technician doesn't want to travel to the site for a 5 minute job.

So basically poor planning by senior management, and mutiny in the ranks. :smiley:

So how about using an ethernet to serial adapter to gain access to the switch serial management port remotely? See attached.

Obviously I would recommend that you fully test the solution locally on an identical switch if you have one, before shipping to the remote site for somebody to simply plug in.

I've successfully used such devices to access serial ports of remote RAID controllers using nothing more than an IP address from PuTTy.

Just an idea. There are, of course, a variety of ethernet to serial adapters out there. Just search for them.