Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2013 15:06:22 +0330
From:      saeedeh motlagh <saeedeh.motlagh@gmail.com>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   backspace doesn't work correctly with termios
Message-ID:  <CAN%2BS=WBSzPiS9EbhJo23ssN%2Bei5ybh-7zXHieyshPrP7A8jxVw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
hi all

i have problem with backspace in serial communication.
this is my scenario:
i have three box. box number 1 is windows system, number 2 is freeBSD8.2
and number 3 is cisco router. from box number 1 i connect to the box number
2 by putty and run a serial program on box number 2 that connects to box
number 3 via a serial card. this serial program uses termios structure and
manage opening, reading, writing and closing serial ports.

my problem is: when i connect to box number 2 via putty, everything is
okand backspace works correctly but when i run serial program and
connect to
the box number 3 via it, backspace do not work correctly and print ^? on
screen.

i searched a lot and check stty erase and erase2 options. moreover i set VERASE
in termios too but nothing happened.
what is the correct setting for termios to identify backspace as it should
be?
how can i understand what key mappings is done when i press backspace
in box number 1 to erase character in the terminal of box number 3?

i think some thing is wrong in termios options that causes mismatch in
backspace translation.

this problem has kept me busy for more than a month and i really don't know
what should i do to solve it.
any comments or hints are really appreciated.

motlagh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN%2BS=WBSzPiS9EbhJo23ssN%2Bei5ybh-7zXHieyshPrP7A8jxVw>