Re: backspace shows ^? in serial communications
thanks Robert, i try it before but nothing happened. do you know how i can set erase and erase2 for stty via termios structure? and what should be their value to backspace correct well? On Wed, Feb 6, 2013 at 3:13 PM, Robert Bonomi bon...@mail.r-bonomi.comwrote: From owner-freebsd-questi...@freebsd.org Wed Feb 6 00:19:04 2013 Date: Wed, 6 Feb 2013 09:44:37 +0330 Subject: backspace shows ^? in serial communications From: s m sam.gh1...@gmail.com To: freebsd-questions freebsd-questions@freebsd.org hi all i have a problem with backspace in serial communications. i have a freebsd8.2 box with a serial card on it. when i connect to other freebsd box via serial port backspace does not act as i expected. backspace shows ^? on screen. i searched alot and find out that stty has two parameters -erase and erase2- to identify erase characters in terminal and they should be set correctly. i set erase and erase2 to ^? by stty erase \^? and stty erase2 \^? commands but nothing happened. please let me know how i can fix it. i know it is simple issue but i really do not know how to do that. stty erase {press the backspace key} Then hit the enter/return key ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: backspace shows ^? in serial communications
thanks for your answer. you know, i have a freebsd box (something like router) which i connect to it by putty or other terminal programs (cu,...). this router has a serial card and i have a c program to open and manage serial ports. now when i run this c program and connect to the third freebsd box, backspace shows ^?. now i don't know where is problem and for which system terminal settings should be checked. from you explanation i think that i should check serial settings in c program in the router box. am i right? please let me know what should i do to this program (c program in router box) show backspace correctly when i connect by different serial programs to router box and run it. thanks On Wed, Feb 6, 2013 at 10:20 AM, Polytropon free...@edvax.de wrote: On Wed, 6 Feb 2013 09:44:37 +0330, s m wrote: hi all i have a problem with backspace in serial communications. i have a freebsd8.2 box with a serial card on it. when i connect to other freebsd box via serial port backspace does not act as i expected. backspace shows ^? on screen. i searched alot and find out that stty has two parameters -erase and erase2- to identify erase characters in terminal and they should be set correctly. i set erase and erase2 to ^? by stty erase \^? and stty erase2 \^? commands but nothing happened. please let me know how i can fix it. i know it is simple issue but i really do not know how to do that. If I remember correctly, ^? is delete, ^H is backspace. You should check your terminal emulator if it outputs ^? instead of ^H when you press the backspace key. FreeBSD's default configuration handles keys correctly (if you have the proper terminal emulation set, e. g. vt100 or vt220 for your serial line), so there's probably something wrong with the settings of the terminal program you're using. For comparison: % echo $TERM xterm % stty -a speed 9600 baud; 24 rows; 80 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk -brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab3 -onocr -onlret cflags: cread cs8 parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef; eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; And: % echo $TERM cons25l1 % stty -a speed 9600 baud; 25 rows; 80 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef; eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; If you want the system's C shell to treat ^? (delete) as it should be treated (perform delete instead of backspace or nothing), add those to your .cshrc: bindkey ^? delete-char # for console bindkey ^[[3~ delete-char # for xterm Note that this only affects the C shell. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: backspace shows ^? in serial communications
From owner-freebsd-questi...@freebsd.org Wed Feb 6 00:19:04 2013 Date: Wed, 6 Feb 2013 09:44:37 +0330 Subject: backspace shows ^? in serial communications From: s m sam.gh1...@gmail.com To: freebsd-questions freebsd-questions@freebsd.org hi all i have a problem with backspace in serial communications. i have a freebsd8.2 box with a serial card on it. when i connect to other freebsd box via serial port backspace does not act as i expected. backspace shows ^? on screen. i searched alot and find out that stty has two parameters -erase and erase2- to identify erase characters in terminal and they should be set correctly. i set erase and erase2 to ^? by stty erase \^? and stty erase2 \^? commands but nothing happened. please let me know how i can fix it. i know it is simple issue but i really do not know how to do that. stty erase {press the backspace key} Then hit the enter/return key ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
backspace shows ^? in serial communications
hi all i have a problem with backspace in serial communications. i have a freebsd8.2 box with a serial card on it. when i connect to other freebsd box via serial port backspace does not act as i expected. backspace shows ^? on screen. i searched alot and find out that stty has two parameters -erase and erase2- to identify erase characters in terminal and they should be set correctly. i set erase and erase2 to ^? by stty erase \^? and stty erase2 \^? commands but nothing happened. please let me know how i can fix it. i know it is simple issue but i really do not know how to do that. regards SAM ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: backspace shows ^? in serial communications
On Wed, 6 Feb 2013 09:44:37 +0330, s m wrote: hi all i have a problem with backspace in serial communications. i have a freebsd8.2 box with a serial card on it. when i connect to other freebsd box via serial port backspace does not act as i expected. backspace shows ^? on screen. i searched alot and find out that stty has two parameters -erase and erase2- to identify erase characters in terminal and they should be set correctly. i set erase and erase2 to ^? by stty erase \^? and stty erase2 \^? commands but nothing happened. please let me know how i can fix it. i know it is simple issue but i really do not know how to do that. If I remember correctly, ^? is delete, ^H is backspace. You should check your terminal emulator if it outputs ^? instead of ^H when you press the backspace key. FreeBSD's default configuration handles keys correctly (if you have the proper terminal emulation set, e. g. vt100 or vt220 for your serial line), so there's probably something wrong with the settings of the terminal program you're using. For comparison: % echo $TERM xterm % stty -a speed 9600 baud; 24 rows; 80 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk -brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab3 -onocr -onlret cflags: cread cs8 parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef; eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; And: % echo $TERM cons25l1 % stty -a speed 9600 baud; 25 rows; 80 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef; eol2 = undef; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; If you want the system's C shell to treat ^? (delete) as it should be treated (perform delete instead of backspace or nothing), add those to your .cshrc: bindkey ^? delete-char # for console bindkey ^[[3~ delete-char # for xterm Note that this only affects the C shell. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org