Subject: tip mangles characters
To: None <>
From: Klaus Heinz <>
List: netbsd-users
Date: 03/23/2002 22:49:44

I try to establish a serial connection between two machines, with a
nullmodem cable. The cable works, I have used it before in other situations.

tip(1) was the program I have used before (e.g on Solaris) and I naturally
wanted to use it with NetBSD, too. The following line was added to

When I use tip to establish a connection, everything looks ok (the other
side is the serial console of a NetBSD box):

  $ tip hard
  root device (default ex0):

Pressing the RETURN key makes the cursor jump to the first column
in the same line. The opposite system doesn't seem to receive a newline
character. Only typing CTRL-j sends a newline. 

But the strangest behaviour is this:

  $ tip hard
  root device (default ex0): qwertzu
  len = 7| |q|=71 |w|=77 |e|=65 |r|=72 |t|=74 |z|=fa |u|=f5|

I have modified the opposite side to see what it receives. Obviously
my side sends the correct code for qwert but _not_ for z and u. The
other side receives the code for z+0x80. Other characters behave the
same way:
  |1|=b1 |2|=b2 |3|=33 |4|=b4 |5|=35 |6|=36 |7|=b7 |8|=b8 |9|=39 |0|=30|

  |q|=71 |w|=77 |e|=65 |r|=72 |t|=74 |z|=fa |u|=f5 |i|=69 |o|=6f |p|=f0|

  |a|=e1 |s|=f3 |d|=e4 |f|=66 |g|=e7 |h|=e8 |j|=6a |k|=eb |l|=6c|

  |y|=f9 |x|=78 |c|=63 |v|=f6 |b|=e2 |n|=ee |m|=ed |,|=ac |.|=2e |-|=2d|

Using 'cu -l /dev/tty01 -s 9600' doesn't show this behaviour, but with
cu I cannot send a break to the other side, whereas tip can do this.

I am using tip on NetBSD/i386 1.5.2. ~/.tiprc contains only 'escape=^O'.
Nothing changes when I use tip on the console in contrast to an xterm.

Can anyone tell me what stupid mistake I made ?