Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 05-27-2022, 07:42 AM   #1
LQ Newbie
Registered: Sep 2013
Posts: 3

Rep: Reputation: Disabled
/dev/ttyS1 have Tx need Rx

I need to get a half duplex serial connection working again after a busybox/kernel update.

echo "Hello World" > /dev/ttyS1 (and similar outputs) is working,
but cat /dev/ttyS1 shows nothing.

I've confirmed with a 3rd device that the input data is being sent.

So... are there any stty settings I need to verify to ensure half duplex? Obscure security settings or permissions that might be blocking RX? Other ideas or suggestions?
Old 05-27-2022, 07:55 AM   #2
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,056

Rep: Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126Reputation: 7126
so you updated something somewhere. Can you please give us more details:
what hardware/os/software is it, what did you update? How did you check if it is working or not?
Old 05-27-2022, 09:21 AM   #3
LQ Newbie
Registered: Sep 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hardware: e300c1 PowerPC.
Update: Linux kernel 2.6 to 5.12.
OS: Linux, no desktop or GUI.

What I've done:
1. Reflashed the original uboot/ramdisk image. Confirmed the hardware/wiring is working.
2. Reflashed the new uboot/ramdisk image with diagnostic printouts embedded in my software (c++). Observed that "poll(&mypollfd, 1, 500)" is timing out (where mypollfd is pointing to /dev/ttyS1 with the POLLIN event flagged).
3. Killed the running software process and began diagnostics at the command line level.
4 Connected the embedded /dev/ttyS1 to a desktop /dev/ttyS0.
5 Configured the desktop to match baud rates, and started 'cat /dev/ttyS0'
6 Ran echo "Hello World" > /dev/ttyS1 on the embedded system, and observed "Hello World" print on the desktop. Repeated with different phrases to ensure no fluke.
7 started 'cat /dev/ttyS1' on the embedded system, and ran echo "Hello World" > /dev/ttyS0 on the desktop. No data was ever received.
8 Repeated 4-7 using first gtkterm then screen on the desktop instead of echo/cat. Still Tx only on the embedded device with the new kernel.
9 Connected the deskop /dev/ttyS0 to a windows laptop COM port (teraterm) and verified the steps 7,8 were transmitting.
10 Ran 'ls -l /proc/[0-9]*/fd/* | grep /dev/ttyS1' on embedded system to check if anything else might be using /dev/ttyS1. Nothing found.
Old 06-03-2022, 10:30 PM   #4
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
One thing that doesn't seem to be verified bye any of your tests is whether the embedded serial port is ever receiving any data. This could be because the Rx pin isn't actually connected to anything. Do you have any terminal emulator for the embedded serial, such as C-Kermit? My usual diagnostic is to run that while the Rx is looped back onto the Tx pin, and type keystrokes. If your wiring is correct and the hardware is working, you'll see whatever you type echoed on the screen, and then not, when you break the loopback connection.

Naturally, this is more complicated than it sounds on the surface, especially on an embedded system where resources are more limited. You may be able to use cat/echo in conjunction with the loopback connection as well, if that simplifies things


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
when use minicom, received "Device /dev/ttyS1 access failed: Permission denied." fulee1 Linux - Newbie 3 04-02-2010 04:11 PM
Connect to /dev/ttyS1? atziazas Linux - Newbie 5 07-06-2009 09:56 AM
CAnnot access /dev/ttys1 with Minicom on Korn Shell Yves Plasse Linux - Newbie 4 01-10-2009 12:55 PM
creating /dev/ttyS0 or ttyS1 MToloo Linux - Hardware 3 03-05-2007 10:09 AM
No such device /dev/ttyS1 gsancho Debian 3 09-23-2004 06:40 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration