Linux - Embedded & Single-board computerThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.