linux - 如何创建 LIRC 配置文件?
问题描述
我正在尝试使用 Linux Infrared Remote Control LIRC 库来记录来自遥控器的自定义信号并将其保存在文件中。然后,当我运行 test ir rx 时,我将使用这些信号通过 ir tx 使用 raspberry pi 再次将其发送回来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
所有保存的键都是零,那么我该如何解决这个问题呢?
解决方案
我建议您先声明发送器 GPIO 引脚,然后再声明接收器
像这样:dtoverlay=gpio-ir-tx,gpio_pin=17 dtoverlay=gpio-ir,gpio_pin=18
我会仔细检查 /etc/lirc/lirc_options.conf 因为 TeeJay 建议这解决了我在 raspberrypi 3+ 上的问题
推荐阅读
- matlab - 在 MATLAB 中消除连续区域(泛化:之间有零的区域)
- c# - DDD 解决方案结构
- javascript - 尝试自动化 jQuery 点击事件并显示内容
- c - 如何在 C 中将 char 附加到字符串中动态分配内存?
- javascript - 使用 AJAX 预填充 Django Select 表单
- python - 如何使用 Tensorflow 估计器对保存的模型进行评分?
- python-3.x - 对象不可迭代。我怎样才能使这个代码工作
- laravel - Laravel 身份验证生命周期
- aem - AEM 在 DAM 中搜索文件
- node.js - 没有 SSH 的情况下,像“Localtunnel”这样的隧道服务如何工作?