環境
- Raspberry Pi 3 Model B
- バージョン
pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
事象
赤外線LEDを使用してラズパイに信号を覚えさせてテレビを操作したいです。
主に以下のサイトを参考にしてテレビの赤外線を覚えさせました
http://www.neko.ne.jp/~freewing/raspberry_pi/raspberry_pi_stretch_lirc_ir_remote_control_2017/
tv_lircd.confというファイルを作成してirsendコマンドを実行したのですが赤外線が送信されません。
iPhoneのインカメラで赤外線が出ているかも確認したのですが何も出ません。
sudo irsend SEND_ONCE tv power
こちらのコマンドではエラーは出ず
pi@raspberrypi:~ $ sudo irsend -d /dev/lirc0 SEND_ONCE tv power do_connect: could not connect to socket connect: Connection refused Cannot open socket /dev/lirc0: Connection refused
こちらのコマンドを実行するとエラーが発生します。
上記サイトにもこのエラーについての記述はあるのですが、解決方法が特に書いていません。
tv_lircd.confの中身
pi@raspberrypi:~ $ cat /etc/lirc/lircd.conf.d/tv.lircd.conf # Please take the time to finish this file as described in # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/ # and make it available to others by sending it to # <lirc@bartelmus.de> # # This config file was automatically generated # using lirc-0.9.4c(default) on Sat Oct 20 09:27:39 2018 # Command line used: -n -d /dev/lirc0 # Kernel version (uname -r): 4.14.76-v7+ # # Remote name (as of config file): tv # Brand of remote device, the thing you hold in your hand: # Remote device model nr: # Remote device info url: # Does remote device has a bundled capture device e. g., a # usb dongle? : # For bundled USB devices: usb vendor id, product id # and device string (use dmesg or lsusb): # Type of device controlled # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) : # Device(s) controlled by this remote: begin remote name tv bits 32 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100 header 9024 4463 one 567 1664 zero 567 561 ptrail 579 repeat 9028 2219 gap 107748 toggle_bit_mask 0x0 frequency 38000 begin codes power 0x210704FB 0x7EBC4D9C down 0x21078679 0x7EBC4D9C up 0x210706F9 0x7EBC4D9C 4chan 0x210720DF 0x7EBC4D9C 8chan 0x210710EF 0x7EBC4D9C end codes end remote
配線はサイトに書いてある通りに行っております。
Raspbian Stretchには赤外線送信できないという情報があったのですが、
Raspbian Jessieをインストールしてこちらの手順で行ったのですが、同じく送信のところでうまくいきませんでした。
http://www.neko.ne.jp/~freewing/raspberry_pi/raspberry_pi_3_lirc_ir_remote_control/
何か足りない情報があればコメントください。これじゃないか程度の答えでも構いません。
よろしくお願いいたします。
あなたの回答
tips
プレビュー