more serial port troubles

Rick Stevens ricks at nerd.com
Fri Jun 24 22:56:08 UTC 2011


On 06/24/2011 03:10 PM, Mike Wright wrote:
> Hi all,
> 
> Background:  I'm trying to debug a Xen setup and the hypervisor outputs 
> its info via the com port.
> 
> This seems like it should be a cakewalk but I've been fighting this for 
> almost a week now.
> 
> All I'm trying to do is dump output from one com port on one machine to 
> the com port on a different machine.
> 
> I've tried simple cat a file to one com port and cat the other.  I've 
> tried minicom ctrl-A S and ctrl-A R with zmodem in both directions for 
> days without any success.

zmodem is used to move files, not for normal, interactive
communication.  You can think of zmodem sort of like FTP.

> Yesterday I installed putty and selecting "serial" gets me nowhere, so 
> for spits and giggles I chose "ssh" and entered the hostname of the 
> target machine.  It asked for my login name, presented my key and, 
> voilá, I'm logged into the remote machine.
> 
> That step alone verifies that com port hardware, flow rates and 
> handshakes, and null modem cable all work.
> 
> Does anybody else have any clues here; I obviously don't :/

If you're simply trying to capture the output of the Xen hypervisor on
machine A to machine B via a serial port, then:

1. On A, make sure you have these things set up in the "kernel" line of
the grub stanza used to boot the Xen kernel:

    com1=38400,8n1 console=com1

2. On B, use minicom to set the baud rate and format for its serial port
to 38400 baud, 8 data bits, 1 stop bit, no parity and no flow control).
 If you don't know how to do this, first run minicom in setup
mode:

    $ minicom -s

2a. Use the down arrow to highlight "Serial port setup" and press
ENTER. This puts you in the serial port setup screen.

2b. In the serial port setup screen, press "A" and change the port to
/dev/ttyS0, then press ENTER.

2c. Press "E" and you'll be in the serial parameters screen.

2d. In the serial parameters screen, press "D" to select 38400 baud,
then press "Q" to select 8N1.  Finally, press ENTER to exit the serial
parameters screen and return to the serial port setup screen.

2e. Back in the serial port setup screen, press ENTER to exit the screen.

2f. Back at the configuration screen, use the down arrow to highlight
"Exit" and press ENTER.  You're now in the terminal I/O part of minicom.

3. Reboot A and make it come up in Xen.

At this point, anything sent to A's serial port should show up on the
screen on B.

To exit minicom, use CTRL-A, Q and select "Yes".
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, C2 Hosting          ricks at nerd.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-      A day for firm decisions!!!   Well, then again, maybe not!    -
----------------------------------------------------------------------


More information about the users mailing list