Dev/ Ttys 1 Input/output Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn
Tty Input/output Error
more about Stack Overflow the company Business Learn more about hiring developers or posting /dev/ttys0: tcgetattr: input/output error ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a
Cat /dev/ttys0 Input/output Error
question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer linux serial port The best answers are voted up and rise to the top cat /dev/ttyS0 Input/output error up vote 2 down vote favorite I created infrared receiver as in LIRC manual (http://www.lirc.org/receivers.html). And tested it on windows using program called Terminal. When I switched on RTS pin DCD pin was also switched on and when I used remote controll DCD was blinking. So everything works with hardware. Next I tried using the minicom same hardware on Linux Mint 17 on same computer as in http://lifehacker.com/5527752/control-your-desktop-pc-with-a-remote-using-lirc but with no luck: piotrek-H87-HD3 piotrek # cat /dev/ttyS0 cat: /dev/ttyS0: Input/output error I also followed http://www.commandlinefu.com/commands/view/10218/ttys0-terminal-on-serial-connection. In this tutorial there was the same error I had so I tried looking in BIOS setup but serial ports were enabled. Why isin't it working? Some information data: piotrek-H87-HD3 piotrek # cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 1: uart:unknown port:000002F8 irq:3 2: uart:unknown port:000003E8 irq:4 3: uart:unknown port:000002E8 irq:3 4: uart:16550A port:0000F080 irq:19 tx:34 rx:0 CTS|DSR|CD 5: uart:unknown port:00000000 irq:0 6: uart:unknown port:00000000 irq:0 7: uart:unknown port:00000000 irq:0 8: uart:unknown port:00000000 irq:0 ... //EDIT I was wondering lately if maybe linux somehow switched pin layout of my serial port? My motherboard COM port pins layout is : I have back panel extension cord which maps 1:1 pin layout from motherboard to back panel like this: ------------------- \ [1][3][5][7][9] / \ [2][4][6][8] / \ ___________ / In windows pin order is same as in motherboard manual. Is it possible that pins are switched somehow? Can I check it? Nobody seems to know the answer so maybe I ask another question. Can I write some script (python maybe?) that will enable selected pins on /dev/tty
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Serial port /dev/ttyS0 and ttys* input output error up vote 0 down vote favorite I'm new to this kind of things so I need help from you guys. When playing around with serial ports, I figured why not echo from one terminal and cat/listen from the other http://unix.stackexchange.com/questions/192075/cat-dev-ttys0-input-output-error using one of the /dev/ttyS* serial ports on my ubuntu 15.04 laptop. When i do cat /dev/ttyS0 it gives me input output error. then i tried doing it using pyserial on python. when i do import serial ser = serial.Serial('/dev/ttyS0') it gives me SerialException: Could not configure port: (5, 'Input/output error') After looking around on stack overflow, I found this related post Pyserial: could not configure port: (5, 'Input/output error) where one of the guy said you need a physical connection to make this happen. I'm http://stackoverflow.com/questions/31908335/serial-port-dev-ttys0-and-ttys-input-output-error guessing that is to create some kind of loop. So my question is what kind of physical connection is required? Who a usb stick do it, or do i need something dedicated to work with the serial port. And if someone would provide good explanation on how serial port programming works, that would be great. Feel free to edit the question where you see fit. Guys please no need to complain about how dumb this question sounds and all that. After all lots of people come here to learn, and that is what i am doing python linux ubuntu serial-port pyserial share|improve this question asked Aug 9 '15 at 20:04 pdhimal1 79212 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote accepted You need to have one or two physical com or serial ports on your pc to achieve this. if you have one port you can create a loopback plug by connectint the Rx and Tx pins together. If you don't have a physical serial port and want to test it you can use scoat to create a virtual serial port. share|improve this answer answered Aug 9 '15 at 20:30 rfkortekaas 1,2251818 ^ thanks, i will try that. Do you mean socat or scoat? –pdhimal1 Aug 9 '15 at 22:43 It's 'socat' see the manpage for details. You can use 'socat -d -d pty,raw,echo=0 pty,raw,echo=0' to create two virtual serial ports. –rfkortekaas Aug 10 '15 at 4:40 worked. Thanks a lot –pdhimal1 Aug 11 '15 a
& Site Management Integration Options Developers eMail Components CloudLinux Extensions Extension Catalog Submit your Extension Plans & Pricing Support Resources FAQs Forums Knowledge Base Documentation https://kb.plesk.com/en/10041 Downloads Plesk University Release notes Blog Become a Partner Russian German http://www.tldp.org/HOWTO/Serial-HOWTO-16.html French Spanish Chinese Japanese Italian Language English Russian German French Spanish Chinese Japanese Italian any Search How to set up a serial console to a Linux server Article ID: 10041, created on Mar 9, 2011, last review on Jun 17, 2016 Applies input/output error to: Operations Automation 5.5 Virtuozzo Virtuozzo containers for Linux Virtuozzo hypervisor Symptoms Sometimes it is necessary to set up a serial console to troubleshoot kernel crashes and server hang issues on Parallels Server Bare Metal or Parallels Containers for Linux. Resolution Connect the Parallels Server Bare Metal or Parallels Containers node (hereafter HW) dev/ ttys 1 with the monitoring node (hereafter MN) using a null-modem cable between the two COM ports. Try to find which of the tty consoles is responsible for the connected COM ports. On MN: [root@monitor ~]# ls -l /dev/ttyS? crw-rw---- 1 root uucp 4, 64 Feb 23 11:06 /dev/ttyS0 crw-rw---- 1 root uucp 4, 65 Feb 23 11:06 /dev/ttyS1 crw-rw---- 1 root uucp 4, 66 Feb 23 11:06 /dev/ttyS2 crw-rw---- 1 root uucp 4, 67 Feb 23 11:06 /dev/ttyS3 [root@monitor ~]# cat /dev/ttyS0 If it is not the correct console, you will get this error: [root@monitor ~]# cat /dev/ttyS3 cat: /dev/ttyS3: Input/output error If you are using correct terminal, then you will see a similar output: [root@monitor ~]# cat /dev/ttyS0 _ Now, jump to HW: [root@pvcfl46x64 ~]# for COMPORT in `ls /dev/ttyS?`; do echo ${COMPORT}; echo test > ${COMPORT} ;done /dev/ttyS0 /dev/ttyS1 -bash: echo: write error: Input/output error /dev/ttyS2 -bash: echo: write error: Input/output error /dev/ttyS3 -bash: echo: write error
Serial Electrical Test Equipment Breakout Gadgets, etc. While a multimeter (used as a voltmeter) may be all that you need for just a few serial ports, simple special test equipment has been made for testing serial port lines. Some are called "breakout ... " where breakout means to break out conductors from a cable. These gadgets have a couple of connectors which connect to serial port connectors (either at the ends of serial cables or at the back of a PC). Some have test points for connecting a voltmeter. Others have LED lamps which light when certain modem control lines are asserted (turned on). The color of the light may indicate the polarity of the signal (positive or negative voltage). Still others have jumpers so that you can connect any wire to any wire. Some have switches. Radio Shack sells (in 2002) a "RS-232 Troubleshooter" (formerly called "RS-232 Line Tester") Cat. #276-1401. It checks TD, RD, CD, RTS, CTS, DTR, and DSR. A green light means on (+12 v) while red means off (-12 v). They also sell a "RS-232 Serial Jumper Box" Cat. #276-1403. This permits connecting the pins anyway you choose. Both these items are under the heading of "Peripheral hookup helpers". Unfortunately, they are not listed in the index to the printed catalog. They are on the same page as the D type connecters so look in the index under "Connectors, Computer, D-Sub". A store chain named "Active Components" may have them. Measuring voltages Any voltmeter or multimeter, even the cheapest that sells for about $10, should work fine. Trying to use other methods for checking voltage is tricky. Don't use a LED unless it has a series resistor to reduce the voltage across the LED. A 470 ohm resistor is used for a 20 ma LED (but not all LED's are 20 ma). The LED will only light for a certain polarity so you may test for + or - voltages. Does anyone make such a gadget for automotive circuit testing?? Logic probes may be damaged if you try to use them since the TTL voltages for which they are designed are only 5 volts. Trying to use a 12 V incandescent light bulb is not a good idea. It won't show polarity and due to limited output current of the UART it probably will not even light up. To measure voltage on a female connector you may plug in a