USB to SERIAL (PL-2303) console cable to administer a Linux Box?

Discussion in 'macOS' started by 4np, Sep 1, 2010.

  1. 4np macrumors 6502a

    4np

    Joined:
    Feb 23, 2005
    Location:
    The Netherlands
    #1
    Hi,

    I have a MacBook Pro (MacBookPro5,3) and a Via Epia based Gentoo Linux Box (motherboard: MB Jetway J7F4K1G5S A 1500MHz Mini-ITX ) and I would like to be able to administer it using a serial console (if -for example- ssh etc fails) as I don't have a monitor and / or keyboard.

    In order to do so, I ordered an USB to Serial DB9 (male) cable from eBay ( same as: http://adapterz.com/item.htm?id=60414 ) which uses the PL-2303 chipset. I used the 64bit driver from github to get the cable working on Snow Leopard.

    [​IMG]

    In order to connect the cable to the COM1 port of my Linux box (which is also male), I used a 9 Pin Female Serial RS232 Gender Changer Adapter ( as seen here: http://amzn.to/a8qrB6 ) and I have setup my Gentoo Linux box to enable the console by adding "s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt102" to /etc/inittab and ttyS0 to /etc/ttysecurity. After reboot (or issuing 'init q') the serial console should work, however I am unable to connect to it from my MacBook Pro.

    [​IMG]

    On my MacBook Pro I do a "screen -T vt102 /dev/tty.PL2303-00001004 115200" but nothing happens, and I don't see anything in the logs of my Gentoo Linux box. I have also tried 6400 baud, and vt100 terminal emulation, but no luck at all.

    In System profile the cable is listed as:
    USB 2.0 To COM Device:
    Product ID: 0x2303
    Vendor ID: 0x067b (Prolific Technology, Inc.)
    Version: 3.00
    Speed: Up to 12 Mb/sec
    Manufacturer: Prolific Technology Inc.
    Location ID: 0x04100000
    Current Available (mA): 500
    Current Required (mA): 100

    And the kernel extension is listed as:
    osx-pl2303:
    Version: 1.0.0d1
    Last Modified: 6/16/10 3:58 AM
    Kind: Intel
    Architectures: i386, x86_64
    64-Bit (Intel): Yes
    Location: /System/Library/Extensions/osx-pl2303.kext
    Kext Version: 1.0.0d1
    Load Address: 0x80b59000
    Valid: Yes
    Authentic: Yes
    Dependencies: Satisfied

    So the cable itself seems properly detected and it also shows up in my system.log:
    Aug 31 19:49:29 MacBookPro pcscd4191: Non-smartcard device launched pcscd Vendor: 0X67B, Product: 0X2303

    I am not entirely sure if I should have used a RS232 female-female null-modem adapter instead of using the gender changer?

    [​IMG]

    Does anybody use a similar setup and could clarify? Any help would be appreciated! :)

    ps. I have also posted this question to the Apple Discussions...
     
  2. Detektiv-Pinky macrumors 6502a

    Detektiv-Pinky

    Joined:
    Feb 25, 2006
    Location:
    Berlin, Germany
    #2
    Yes, you need a null-modem adapter for this setup to work. It crosses the transmit and receive lines, similar to a cross-connect cable for Ethernet.
    http://en.wikipedia.org/wiki/File:D9_Null_Modem_Wiring.png
     
  3. robvas macrumors 68020

    Joined:
    Mar 29, 2009
    Location:
    USA
    #3
    Check the /etc/inittab file for the specs on your serial port (on your Linux machine)

    They should be listed as s0, s1, etc

    s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
    s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100

    38400 and 9600 are the most common port speeds
     

Share This Page