job control doesn't work when I try to set up getty over serial
5
votes
1
answer
728
views
I am trying to set up getty to log in over serial (mainly as an experiment).
With almost any configuration, the same thing happens. If my default shell is
bash
, I get this message after I log in:
-bash: cannot set terminal process group (15297): Inappropriate ioctl for device
-bash: no job control in this shell
and then to prove that it doesn't work, I can't use ctrl+C to stop programs:
$ sleep 30
^C
and it doesn't seem to send the signal.
These are the configurations I have tried:
I have tried both of these commands
# copied from raspberry pi:
sudo /sbin/agetty --keep-baud 115200,38400,9600 ttyUSB0 vt220
# something else I read somewhere
sudo getty -L ttyUSB0 9600 vt100
# (I know I'm mixing and matching a lot of differences but the result is the same)
I have tried both screen and picocom as a client.
I have tried using a rasberry pi as a server, and two different ubuntu laptops.
I have tried two FTDIs, two RS-485 usb adapters, and a built in RS232 on the getty side with a USB RS232 on the client side.
I have also tried changing my default shell to sh and dash. I don't get the message, but ctrl+C still doesn't work as expected
The funny thing is - when raspberry pi's automatically configure /dev/ttyAMA0
, and it uses exactly the getty command that I have put, job control works!
And the terminal settings are almost identical. (except for -iutf8 actually)
here are the terminal settings with the FTDI connection, and picocom running:
$ stty -a -F /dev/ttyUSB0
speed 9600 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D;
eol = ; eol2 = ; swtch = ; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ; discard = ; min = 1; time = 0;
-parenb -parodd -cmspar 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 -flusho -extproc
$ stty -a -F /dev/ttyUSB1
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D;
eol = ; eol2 = ; swtch = ; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar 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 -flusho -extproc
What am I doing wrong? And why does it work with the built in configuration for the built in serial port on the raspberry pi?
Asked by Alex028502
(643 rep)
Mar 10, 2024, 07:25 PM
Last activity: Mar 11, 2024, 08:03 AM
Last activity: Mar 11, 2024, 08:03 AM