New answers tagged serial-port
The agetty program only sets TERM, does not affect the way the terminal operates (other than initializing the connection). Any initialization that is concerned with the value of TERM would be in your shell. The shell in turn will check the terminal database; you may find "dumb" or "unknown" works with your shell. Further reading: agetty - alternative ...
Under linux your devices have not meta-names like com1 or so. Your usb-adapter is added to the /dev-directory with a driver specific name. The most usb-uart adapter use the name /dev/ttyUSB* where the * is a number beginning at 0. The best way to get this name is to view the changes of kernel messages via dmesg before and after plugin of the adapter. You ...
It is not possible, as far as I know. The netconsole modules does something similar, but for network devices. You may want to write a kernel module based on it. Further references: /dev/console dynamic redirection http://stackoverflow.com/questions/16829746/how-to-switch-linux-kernel-console-after-boot-process
You could launch getty once you've booted to get a serial connection to your system. Note that this will not give you the default outputs typically seen with your console (Kernel Panics and other verbosities typically seen in console but not in normal terminals). But if you are just looking to get a login via serial after boot this should work. /sbin/agetty ...
RTS and DTR are output pins - which you can set. DCD and CTS are input pins and can only be read. The device is probably set for hardware handshaking by default. You can change this using tcsetattr (see CRTSCTS). Then you can use the TIOCMBIS ioctl to set RTS and DTR Good references are: Linux Serial HOWTO Linux Serial Programming HOWTO The above might ...
This is typically done using the tcsendbreak C library routine. You can get to this from the shell by using a Python or Perl one-liner: python -c 'import termios; termios.tcsendbreak(3, 0)' 3>/dev/yourdevicename perl -e 'use POSIX; tcsendbreak(3, 0)' 3>/dev/yourdevicename
Unless I am misreading your question, the answer is yes; were it not possible to do, no device drivers could exist. You won't be able to read any USB device as plaintext or anything like that, though, and you will need direct access to the usb device node. Drivers may interfere with reading from them. But on a theoretical level, yes, one may read data from ...
Well after a lot of debugging (and head banging against the wall) in the init script that I was using to switch_root to the directory where debian is, I did not mount /dev, /proc and /sys... The correct tty was actually 1:2345:respawn:/sbin/getty ttyHSL0 115200
Try the following: sudo apt-get install python-serial import serial port = serial.Serial("/dev/ttyUSB0", baudrate=115200, timeout=3.0) while True: port.write("\r\nSay something:") rcv = port.read(10) port.write("\r\nYou sent:" + repr(rcv))
Use while sleep 1; do socat pty,link=/dev/tty_remote_serial,waitslave tcp:10.8.0.2:3333; done
Top 50 recent answers are included