D
D
Dmitry2021-04-26 21:30:57
linux
Dmitry, 2021-04-26 21:30:57

How to decrease port speed for lirc?

There is a USB-UIRT based on PL2303, bought for a spear in China. With the help of it, such an IR receiver was made:
tsop-1738-cp2102-connections.png

When you press the buttons on the remote control, the LED blinks, but nothing more.
If I start minicomand set the speed to 2400 baud, then I start to receive characters.
If I change the port speed and run cat:

$ sudo stty -F /dev/ttyUSB0 2400
$ sudo cat /dev/ttyUSB0

I also receive data.
But mode2they lircdrefuse to work. As far as I understand mode2 changes the port speed:
$ sudo stty -F /dev/ttyUSB0 -a
speed 2400 baud; rows 0; columns 0; line = 0;
$ sudo mode2 --driver=uirt2_raw --device=/dev/ttyUSB0
Using driver uirt2_raw on device /dev/ttyUSB0
Trying device: /dev/ttyUSB0
     <жму кнопочку пульта>
Using device: /dev/ttyUSB0
Running as regular user master
readdata() failed
$ sudo stty -F /dev/ttyUSB0 -a
speed 115200 baud; rows 0; columns 0; line = 0;

How to set the speed of the port ttyUSB0? Or can the problem be solved in another way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-04-26
@q2digger

You can try using udev. On connecting the device, hang up the execution of the script with the settings you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question