LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Cannot set serial speed over stty but screen works (https://www.linuxquestions.org/questions/linux-hardware-18/cannot-set-serial-speed-over-stty-but-screen-works-4175693319/)

Michael65589 04-08-2021 03:56 AM

Cannot set serial speed over stty but screen works
 
I have a very strange issue with my serial com ports. The com ports are on an PCIexpress card.

[ 1.206744] 0000:05:00.0: ttyS4 at I/O 0x30c0 (irq = 18, base_baud = 115200) is a XR16850
[ 1.206832] 0000:05:00.0: ttyS5 at I/O 0x30c8 (irq = 18, base_baud = 115200) is a XR16850

Normally I use picocom to connect an embedded device that use its serial interface as debug console.

Everything was fine for months but suddenly I only receive weird characters.
After some investigations I found out that the baudrate of my port is 9600 instead of 115200. Picocom shows that it initialized the port with 115200 bps but when I check with stty the port it says only 9600 bps.
When I use C-v (show progam options) with picocom it shows
*** baud 115200 (9600)

So picocom and ssty are not able to change the baudrate. But when I use screen program everything works fine. WHY???

picocom /dev/ttyS5 -b 115200 -> doesn't work
screen /dev/ttyS5 115200 -> work

When I use picocom with a USB device it works too. Also I can change the baudrate of the USB device with stty.

Any suggestions? What can I do? Is there a way to reset the ttyS5 device? Or reinstall the device?


All times are GMT -5. The time now is 06:46 AM.