Skip to main content

Questions tagged [serial-port]

A hardware interface commonly found on older PCs, usually with a 9-pin DE-9 socket/plug, on networking devices or servers also with RJ-45 socket/plug (otherwise commonly used for ethernet), or with a (much wider) 25-pin DB-25 socket/plug. Two common standards used with such an interface are RS-232 or RS-422.

Filter by
Sorted by
Tagged with
74 votes
5 answers
553k views

How to send data to a serial port and see any answer?

On Linux, I want to send a command string (i.e. some data) to a serial port (containing control characters), and listen to the response (which also usually might contain control characters). How can ...
Alex's user avatar
  • 5,730
76 votes
10 answers
188k views

How to bind USB device under a static name?

I have an Arduino which sometimes gets bound to /dev/ttyUSB0 and other times to /dev/ttyUSB1, making my script fail. I do not want to enumerate all the possibilities of where my device could be, but ...
k0pernikus's user avatar
  • 15.7k
4 votes
2 answers
6k views

Debian does not detect serial PCI card after reboot

I have installed a PCI card with two serial and one parallel port on it. the chipset is MCS9865. I downloaded the latest driver(V1.0.12) from here. I ran make and make install. now the two serial ...
Majid Azimi's user avatar
  • 3,108
63 votes
10 answers
259k views

How can I monitor serial port traffic?

Is there any port monitoring tool to watch the packets written on the port? I especially want to check if my program written in Java works so I need some kind of tool to see if my little application ...
Deepak's user avatar
  • 889
33 votes
3 answers
27k views

Why does awk do full buffering when reading from a pipe [duplicate]

I'm reading from a serial port connected to a gps device sending nmea strings. A simplified invocation to illustrate my point: $ awk '{ print $0 }' /dev/ttyPSC9 GPGGA,073651.000,6310.1043,N,01436....
Daniel Näslund's user avatar
0 votes
1 answer
713 views

Getting rid of a serial console on Respeaker Core V2

I have a Respeaker Core v2.0 and I would like to use the UART interface (this board has a USB to TTL adapter connected to the Uart port) in order to make this board communicate with another one. ...
UserK's user avatar
  • 2,444
140 votes
16 answers
641k views

How to connect to a serial port as simple as using SSH?

Is there a way to connect to a serial terminal just as you would do with SSH? There must be a simpler way than tools such as Minicom, like this $ serial /dev/ttyS0 I know I can cat the output from ...
norq's user avatar
  • 4,111
8 votes
2 answers
7k views

What is the TTY major number of your Unix?

I'm currently working on a serial port library which already uses special frameworks to get information about serial ports on the system. Though serial ports are a fundamental design in Unix—as ...
zmo's user avatar
  • 268
112 votes
7 answers
639k views

command to determine ports of a device (like /dev/ttyUSB0)

I have a question regarding the ports in Linux. If I connect my device via USB and want to check its port I can't do it using the command lsusb, which only specifies bus number and device number on ...
71GA's user avatar
  • 1,166
25 votes
5 answers
58k views

Send file by xmodem or kermit protocol with GNU screen

I work with an RS-232 device via GNU screen. $ screen /dev/ttyUSB0 115200 At some point I need to send a local file to the device using either the xmodem or kermit protocol. On Windows I use ...
user avatar
23 votes
3 answers
49k views

Attaching USB-Serial device with custom PID to ttyUSB0 on embedded

I'm attempting to get an FTDI USB-Serial device with a custom PID to automatically (or even manually) attach to ttyUSB%n, without much success. The device's normal VID/PID is 0403/6001. When ...
trycatch's user avatar
  • 643
10 votes
2 answers
9k views

udev rule for assigning known symlinks for identical usb serial devices

I have two (and possibly in the future, more) USB serial devices which are identical (down to the serial number, unfortunately) - they're actually BTC miners. Currently they end up as ttyUSBX where X ...
Mark Embling's user avatar
3 votes
2 answers
3k views

agetty login program arguments

First post here. I'm trying to run some tests against a CentOS 6 machine, but my tests disable networking so I communicate over serial ports. I created an upstart job that sets up ttyS1 such that it ...
crunk1's user avatar
  • 131
6 votes
1 answer
5k views

Serial File Transfer without lrzsz

I have a device running Raspian, that does not have the lrzsz package installed on it. I only have a serial port to the device, and can connect to the device using screen or minicom, but unfortunately ...
Cornel Verster's user avatar
2 votes
2 answers
8k views

How to send AT commands to modem once the connection is established?

I have a zte 3g modem. I use carrier provided dialer for connection establishment. Once the ppp connection is active, i would like to send some AT commands(for ex. Query signal strength, AT+CSQ). But ...
Kumar's user avatar
  • 143
2 votes
0 answers
698 views

Data loss over ttyACM* when 'cat' command is used for data transfer

I have a development board which will have 3 ACM interfaces when connected to Ubuntu host and i want to transfer data from Host to Device over ttyACM3. I have followed the following procedure for ...
Shivaprasad A Prabhu's user avatar
2 votes
1 answer
10k views

udev rules for USB serial 'by path' not working

I have more than 2 serial devices enumerated by FTDI driver as /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 etc. On reboot, these may get jumbled up in any other order. Also, I may replace/swap these ...
skrowten_hermit's user avatar
1 vote
2 answers
1k views

Do "serial ports" or "parallel ports" apply to character devices only, but not to block devices?

From http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, ...
Tim's user avatar
  • 103k
1 vote
1 answer
6k views

How do I use jpnevulator to capture and log the serial traffic between an application and hardware serial port?

OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the ...
AWM's user avatar
  • 31
0 votes
2 answers
1k views

Connecting modern Linux distributions to physical terminals

I have an old IBM 3151 Terminal that I'd like to play around with a bit. The terminal was designed for use with Enterprise AIX systems and the documentation for that still exists, but I don't have any ...
an earwig's user avatar
  • 123
49 votes
2 answers
222k views

How to find which serial port is in use?

The Question: I plugged in a device (i.e. GSM modem) through a serial port (a.k.a. RS-232), and I need to see with which file in /dev/ filesystem this device was tied up, to be able to communicate ...
Hi-Angel's user avatar
  • 5,162
49 votes
7 answers
125k views

Read/Write to a Serial Port Without Root?

I'm writing an application to read/write to/from a serial port in Fedora14, and it works great when I run it as root. But when I run it as a normal user I'm unable to obtain the privileges required to ...
iegod's user avatar
  • 515
45 votes
4 answers
158k views

set baud speed for tty

How do I set the baud speed for a specific tty (in this case a serial port)? I tried using stty -F /dev/tty.iap ispeed 19200 But get the error Invalid argument for every speed I try (2400, 4800, ...
newenglander's user avatar
27 votes
1 answer
145k views

what is the easiest way to configure serial port on Linux?

In Windows command prompt to configure a serial port, I can simple use: mode com1: 9600,n,8,1 or to read the configuration: mode com1: Are there similar commands in Linux? What would be the ...
Hrvoje T's user avatar
  • 1,031
23 votes
2 answers
30k views

Unexpected results testing serial loopback using echo and cat

So I have a standard RS232 serial port that is looped back to itself by simply running a wire from Tx to Rx. I'm testing loopback by running echo and cat in two separate terminals: cat /dev/ttyS1 ...
Kristina's user avatar
  • 751
10 votes
2 answers
4k views

How to prevent DTR on open for cdc_acm?

I have an Arduino Uno attached over USB, using the cdc_acm driver. It is available at /dev/ttyACM0. The convention for the Arduino's serial interface is for the DTR signal to be used for a reset ...
JamesTheAwesomeDude's user avatar
9 votes
2 answers
14k views

Retrieve file over serial without kermit and lrzsz

I have an embedded Linux on a custom board and I would like to send and receive file over its serial port. The only way to communicate with this device is over serial and the device offers a console ...
Arkaik's user avatar
  • 1,168
8 votes
2 answers
3k views

Switch tabs in Debian installer over serial console with PuTTy

I'm currently trying to install Debian on a system with no video output. All I have is serial console. I know how to get it started and all, and even made it install automatically with a preseeded ...
BrainStone's user avatar
  • 3,724
6 votes
2 answers
20k views

How can I listen to communication between a process and a serial port?

On a Gentoo Linux machine, a process is communicating with another computer via serial port (/dev/ttyS1). I want to listen to this communication (i.e. what is being sent/received by the process) ...
Alex's user avatar
  • 5,730
6 votes
2 answers
3k views

Viewing (monitoring) line status of a serial port

Is there a utility software (or an easy method to do it from shell script) to display a serial port's status — i. e. blinking “RXD”, “TXD”, “DCD”, “DTR”, “DSR”, “RTS”, “CTS”? Particularly, I need to ...
Anton Samsonov's user avatar
6 votes
2 answers
2k views

My process was killed but I cannot understand the kernel notice

I have a custom application running on an embedded x86 setup (built using buildroot and uClibc). The application has been running fine but this morning when I returned to work I discovered my process ...
mathematician1975's user avatar
5 votes
2 answers
8k views

How to monitor a serial connection @ 250000 baud?

I wish to directly monitor the serial-over-usb connection to my 3d printer, which runs at 250000 baud. e.g I might monitor it with cat /dev/ttyUSB0 However first I need to set the baud rate, e.g ...
Mtl Dev's user avatar
  • 503
5 votes
5 answers
54k views

PuTTY can access serial port as /dev/ttyUSB0, but not as named udev device

I have multiple USB-to-serial converters. I need to access one of them in particular. I'm using a udev rule to give it a special name. I have rebooted since I last modified it. SUBSYSTEM=="usb", ...
Nick ODell's user avatar
  • 2,658
5 votes
2 answers
19k views

How do I use a serial port on Linux like a pipe or netcat?

I have two computers with two serial ports: ttyS0 and ttyUSB0. (Actually they are on the same computer but that's just for testing). The ports are connected via null modem cable. I want to be able to ...
user3243135's user avatar
5 votes
1 answer
32k views

How do I access a USB serial port without an entry in /dev?

I have a USB to serial adapter based on the SiLabs CP2101 chipset. I'm trying to use it with Debian 5.0 Lenny (armel architecture). I seem to be able to get the proper kernel module to recognize the ...
Steven T. Snyder's user avatar
5 votes
5 answers
31k views

Send a file over serial port with XMODEM protocol

I need to send a small file over serial port (actually /dev/ttyUSB0, there is a usb-to-serual converter attached to the port). The operation needs to be scriptable i.e. non-interactive. Here is what ...
Vorac's user avatar
  • 3,107
4 votes
3 answers
3k views

Simulating an input from ttyS0 in Linux

I work with cash registers that are bare-boned RedHat Linux boxes. These registers have a scanner attached to a serial port (ttyS0). We do a lot of testing that requires someone to stand at the ...
Fitri Halim's user avatar
4 votes
2 answers
1k views

Does two "virtual serial ports" exist in the virtual terminal implementation?

The following image represents how a physical terminal (for example: VT100) was connected to a computer running Unix (for example: PDP-11): Notice the components highlighted in blue, which shows that ...
Joseph's user avatar
  • 385
4 votes
5 answers
19k views

setserial /dev/ttyS4: Cannot set serial info

So, I have a board with 6 hardware serial ports: the first 2 on the ETX bus and the last 4 on the ISA bus. The following configuration is how it is supposed to be: /dev/ttyS0 port 0x03F8 irq 4 /dev/...
Kristina's user avatar
  • 751
3 votes
1 answer
4k views

Create serial console on plug in USB serial device

I have a CentOS 7 headless system with no serial ports. I sometimes want to access the server using a serial cable, so I plug in a USB serial cable (to my laptop's serial port) but I can't get a ...
TSG's user avatar
  • 1,748
3 votes
2 answers
9k views

setserial /dev/ttyS* UART is undefined

I'm working on the nvidia jetson tk1 board which has a rs232 serial port and I'm trying to do a loopback test by shorting the pin 2 and pin 3. I'm using the serial port communicator terminal gtkterm ...
Nesibe Yavuz's user avatar
3 votes
2 answers
13k views

How do I send text to a USB device?

I'm trying to get the "Torobot" USB servo controller to work with Angstrom on a Beagle Board XM. The servo controller registers as a USB device. The device just takes simple text commands, but there ...
ChronoFish's user avatar
3 votes
1 answer
604 views

Console logging using script command output unreadable

I wanted to log my program's (the python program boots up a headless embedded device connected to a serial port) output to a text file console_log.txt using a shell script, for which, I wrote the ...
skrowten_hermit's user avatar
2 votes
1 answer
1k views

Hardware controlled RTS on tty

I have a UART whose RTS pin is connected to an external RS485 transceiver, so that asserting the RTS pin would set the transceiver to send mode. I thought I could configure the serial port to use the ...
user907323's user avatar
2 votes
2 answers
7k views

Intercept communications on physical serial port using socat

I'm no Linux expert so please go easy ;). Ok, the situation is that I have a single board computer running Debian Wheezy. I know its old/risky etc etc but its not actually "my" equipment and ...
RobF's user avatar
  • 21
1 vote
1 answer
2k views

Unable to write/read from serial port after couple of minutes/hours. Error message: stty: standard input: Inappropriate ioctl for device

I am trying to write and read from serial port at the same time. The purpose of this is to turn on and off a device over a DIO card which is connected to the serial port. While doing these on/off test,...
apploid's user avatar
  • 11
1 vote
1 answer
396 views

problem with U-boot while flashing Linux in sd-card

Please help as it is immense necessary for a project which is to be evaluated coming week. Also, I am very new to this and unable to find help from existing contents available on the Internet. While ...
Am_I_Helpful's user avatar
1 vote
1 answer
2k views

Send a file over XMODEM with payload size = 64

I am trying to communicate with a microcontroller over the ancient (but simple) XMODEM protocol. The two ways that I have found of sending a file are through minicom (interactive) and through cx (non-...
Vorac's user avatar
  • 3,107
1 vote
0 answers
302 views

Troubleshooting RS485 comm on Beaglebone black with cape comms2

TLDR: my serial comm (RS485) does not work on the BeagleBone Black. How to fix that? —— Following my previous question which didn't find any solution, I am now exploring the linux side of the ...
Stéphane de Luca's user avatar
1 vote
2 answers
12k views

Cloning/Splitting a serial port (COM) port in Ubuntu

Everything is working with my serial port. I have connected my FTDI converter into my computer, set my COM port... ln -s /dev/ttyUSB0 ~/wine/dosdevices/COM1 But now I would like to "clone" this port. ...
avitex's user avatar
  • 111