2

There's an USB/Serial converter connecting two boxes.

Box A has USB end, box B has serial port end.

On box A:

screen /dev/ttyUSB0 9600

On box B (the one I'm trying to connect to from box A):

/etc/inittab:
...
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
...

What I write to /dev/ttyS0 on box B is seen in the terminal on box A (via screen),

but data written to dev/ttyUSB0 on box A is not received on box B, for example, I can't type anything, though I see the login promt.

Any ideas? Thanks

EDIT1:

I've tried minicom and picocom with same results as above.

Here's the output of lsusb on box A:

Bus 005 Device 002: ID 14dd:0002  
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 003 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 003 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000

EDIT2:

Output of DMESG on box A:

usb 3-2: new full speed USB device using uhci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
pl2303 3-2:1.0: pl2303 converter detected
usb 3-2: pl2303 converter now attached to ttyUSB0
usbcore: registered new driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver

EDIT3:

box B (I've increased baud rate since):

stty -a -F /dev/ttyS0
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = ; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke

Running screen with such params on box A ends the same way:

screen /dev/ttyUSB0 115200,-parenb,-parodd,cs8,hupcl,-cstopb,cread,clocal,-crtscts,-ignbrk,-brkint,-ignpar,-parmrk,-inpck,-istrip,-inlcr,-igncr,-icrnl,-ixon,-ixoff,-iuclc,-ixany,imaxbel,-iutf8,-opost,-olcuc,-ocrnl,-onlcr,-onocr,-onlret,-ofill,-ofdel,nl0,cr0,tab0,bs0,vt0,ff0,-isig,-icanon,-iexten,-echo,-echoe,-echok,-echonl,-noflsh,-xcase,-tostop,-echoprt,-echoctl,-echoke
1
  • Did you ever find a solution to this? Jul 10, 2012 at 0:59

2 Answers 2

1

Have you tried all the different options in the screen man page that are around baud_rate ?

      <baud_rate>
             Usually  300,  1200, 9600 or 19200. This affects transmission
             as well as receive speed.

      cs8 or cs7
             Specify the transmission of eight (or seven) bits per byte.

      ixon or -ixon
             Enables (or disables) software  flow-control  (CTRL-S/CTRL-Q)
             for sending data.

      ixoff or -ixoff
             Enables  (or  disables)  software  flow-control for receiving
             data.

      istrip or -istrip
             Clear (or keep) the eight bit in each received byte.

Also, maybe the output of the following command run on the server might help?

sudo stty -a -F /dev/ttyS0
3
  • I assume baud_rate should be the same as defined for getty in box B /etc/inittab, no? I'll try playing around with options you suggested, thanks.
    – Karolis T.
    Jul 23, 2009 at 15:08
  • I've updated my question with stty output.
    – Karolis T.
    Jul 23, 2009 at 15:42
  • What about setting the tty to raw mode?: sudo stty -F /dev/ttyS0 raw Jul 23, 2009 at 18:37
0

Even with the wrong baud rate you should still see at least some garbage. Double check that your connections are good. It sounds like a bad connection - either on one of the connectors or maybe a dry solder on the converter?

1
  • I see login promt on /dev/ttyUSB0 if I respawn (kill PID, it respawns automatically) getty on box B. I have "switched" boxes so that box A spawns getty and tried to connect from box B via /dev/ttyS0. I see garbage, no login promt that way.
    – Karolis T.
    Jul 23, 2009 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .