Mac OS X Utilities:Core Operating System Utilities: USB to Serial Console Connectivity with Kermit

From WWJCDOWiki

Jump to: navigation, search

Contents

Description of Solution

This solution covers utilizing a USB to Serial Dongle with Kermit for console connectivity to any device (in this case a Cisco Router). This solution can be duplicated for devices requiring different line speed, flow control or parity settings with 'Kerbang' scripts. It is a simple solution and has helped in many situations.

Technical Requirements of Solution

This solution example assumes:

  • The following are installed (links to the applications will be provided at the end):
    • Apple Mac OS X
    • MacPorts compatible with your version of Mac OS X
    • Kermit (installed via MacPorts)
    • Open Source PL2303 USB to Serial Driver for Mac OS X
  • You have an understanding of Apple Mac OS X, MacPorts (and installing packages within MacPorts) and basic navigation required for utilization of the above applications
  1. Open up Terminal
  2. Determine the Device Name of your USB to Serial Device
  3.  cd /dev
     ls tty.*
    

    Note: My device name is tty.PL2303-00001004 in this example

  4. Change directory to /opt/local/bin
  5.  cd /opt/local/bin
    
  6. Utilize VI to create the following script
  7. Note: In this example my script name is 'ciscorouter'

     sudo vi ciscorouter
    
    • You will be prompted for your Super User password
    • Script within VI
     #!/opt/local/bin/kermit
     set modem type none
     set line /dev/tty.PL2303-00001004
     set speed 9600
     set flow none
     set parity none
     set carrier-watch off
     connect
     Exit  
    
  8. Save your script and Exit VI
    • Within VI the following key sequence will Write and Quit VI without prompting
    :wq!
    
  9. Set Permissions
    • The following command sets the permissions that allow the 'Kerbang' script to be executed from Terminal without Super User access
    sudo chmod 755 ciscorouter 
    
  10. Run Script
    • Placing the 'Kerbang' script in the /opt/local/bin folder allows you to open up Terminal and type ciscorouter from any folder
    • You can create multiple 'Kerbang' scripts for accessing different devices that may require different line speed, flow control or parity settings utilizing the above 'Kerbang' script as an example. It is quite simple and has helped in many situations.

Note: I have not been able to figure out how to use Kermit or any other MacPort application for transferring files (such as Cisco IOS) over to devices via the XMODEM protocol. If you know how to do this please Contact Me via email as I would greatly appreciate your help on this particular subject.

External References

Apple Mac OS X

MacPorts

MacPort : Kermit : Portfile

SourceForge : PL2303 USB to Serial Driver for Mac OS X

Personal tools