backspace doesn't work correctly with termios

saeedeh motlagh saeedeh.motlagh at gmail.com
Mon Feb 11 11:37:04 UTC 2013


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


More information about the freebsd-questions mailing list