OS:LibreELEC
功能:用 IR 遙控器控制 Kodi
可到內建 /usr/lib/udev/rc_keymaps/ 找看看是否已有 ok 的設定
第一行的註解不可省略,type 一定要是對的
建立 /storage/.config/rc_maps.cfg,範例如下
官方範例位置 /storage/.config/rc_maps.cfg.sample
Infrared Remotes
- Package:
- ir-keytable
功能:用 IR 遙控器控制 Kodi
設定方法
自製方法
- # 掛載為讀寫模式
- mount -o remount,rw /flash
- # 在 /flash/config.txt 最後一行加入,gpio 依需求設定
- dtoverlay=gpio-ir,gpio_pin=17
- # 掛載為唯讀模式
- mount -o remount,ro /flash
- # 重開機
- reboot
可到內建 /usr/lib/udev/rc_keymaps/ 找看看是否已有 ok 的設定
根據上面測到的編碼,建立 /storage/.config/rc_keymaps/my_custom_remote,範例如下
- # 確認可設定的 Key
- irrecord -l | grep ^KEY
- # 確認遙控器的編碼
- ir-keytable -p all -t
第一行的註解不可省略,type 一定要是對的
暫時測試
- # table my_custom_remote, type: nec
- 0x445 KEY_UP
- 0x446 KEY_DOWN
- 0x447 KEY_LEFT
- 0x448 KEY_RIGHT
- 0x444 KEY_OK
- 0x44a KEY_BACK
- 0x44f KEY_MENU
永久設定
- # 停止服務
- systemctl stop kodi
- systemctl stop eventlircd
- # 載入新的 keymaps
- ir-keytable -c -w /storage/.config/rc_keymaps/my_custom_remote
- # 若內建有找到合適的檔案,例:samsung
- ir-keytable -c -w /usr/lib/udev/rc_keymaps/samsung
- # 測試,會看到顯示對應按鍵輸出
- ir-keytable -t
- # 開啟服務,進行 Kodi 測試
- systemctl start kodi
- systemctl start eventlircd
建立 /storage/.config/rc_maps.cfg,範例如下
官方範例位置 /storage/.config/rc_maps.cfg.sample
* * my_custom_remote * * samsung
# 確認是否載入 OK ir-keytable -a /storage/.config/rc_maps.cfg # 重新啟動 reboot # 確認設定是否正確 ir-keytable -r
參考
在樹莓派3上使用紅外遙控器控制libreELECInfrared Remotes
留言
張貼留言