我如何创建LIRC配置文件?

问题描述 投票:0回答:1

我正在尝试使用Linux红外远程控制LIRC库来记录来自远程控制的自定义信号并将其保存在文件中。然后,我将使用这些信号通过树莓派通过ir tx将其再次发送回去当我运行test ir rx mode2 -d /dev/lirc1时,输出看起来不错。

Using driver default on device /dev/lirc1
Trying device: /dev/lirc1
Using device: /dev/lirc1
space 16777215
pulse 9044
space 4463
pulse 601
space 1641
pulse 628
space 532
pulse 575
space 558
pulse 577
space 530
pulse 603

但是当我打开/etc/lirc/lircd.conf文件时,会发生这种情况:

# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

 name  fan
 bits            0
 flags CONST_LENGTH
 eps             0
 aeps            0

 one             0     0
 zero            0     0
 gap          50000
 toggle_bit_mask 0x0
 frequency    38000

     begin codes
         KEY_POWER                0x0
         KEY_0                    0x0
         KEY_1                    0x0
     end codes

end remote

所有保存的键都是零,那么如何解决此问题?

linux raspbian lirc
1个回答
0
投票

您的LIRC驱动程序已配置,从这一方面看还可以。但是值得仔细检查驱动程序是否正确设置,因为我认为这是问题所在。

假设您正在使用T95m / T95N遥控器:

  • 0x140 KEY_POWER
  • 0x155 KEY_POWER
  • 0x101 KEY_0
  • 0x14e KEY_1

尝试使用上面的值编辑etc / lirc / lircd.conf并运行它(启动一些IR命令,然后查看它是否将值恢复为0x0。

© www.soinside.com 2019 - 2024. All rights reserved.