前提・実現したいこと
raspberry piを初めて触る初心者です。
以下のサイトを参考に、raspberry pi 3で赤外線送受信を行おうとしていますが、
その過程で詰まったので、質問させていただきます。
https://qiita.com/_kazuya/items/62a9a13a4ac140374ce8
https://qiita.com/Library/items/35eec18fbe11387be6d5
http://doctor.hatenablog.jp/entry/2016/02/22/115222
どうぞよろしくお願い致します。
使っている環境は以下の通りです
zsh
1% uname -a 2Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux 3 4% lsb_release -a 5No LSB modules are available. 6Distributor ID: Raspbian 7Description: Raspbian GNU/Linux 8.0 (jessie) 8Release: 8.0 9Codename: jessie
###発生している問題・エラーメッセージ
問題が発生するまでに行った手順を示します
lircのインストール
% sudo apt-get install lirc
/etc/lirc/hardware.conf
の編集
hardware.conf
1# /etc/lirc/hardware.conf 2# 3# Arguments which will be used when launching lircd 4LIRCD_ARGS="--uinput" 5 6#Don't start lircmd even if there seems to be a good config file 7#START_LIRCMD=false 8 9#Don't start irexec, even if a good config file seems to exist. 10#START_IREXEC=false 11 12#Try to load appropriate kernel modules 13LOAD_MODULES=true 14 15# Run "lircd --driver=help" for a list of supported drivers. 16DRIVER="default" 17# usually /dev/lirc0 is the correct setting for systems using udev 18DEVICE="/dev/lirc0" 19MODULES="lirc_rpi" 20 21# Default configuration files for your hardware if any 22LIRCD_CONF="" 23LIRCMD_CONF=""
/boot/config.txt
の編集(ピンの指定。Uncomment this to enable the lirc-rpi module以下を編集した)
# For more options and information see # http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable the lirc-rpi module dtoverlay=lirc-rpi dtparam=gpio_in_pin=17 dtparam=gpio_out_pin=18 dtparam=gpio_in_pull=down # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on
デバイスファイルが生成できているかを確認
% ls -l /dev/lirc* crw-rw---- 1 root video 243, 0 11月 14 10:58 /dev/lirc0 lrwxrwxrwx 1 root root 21 11月 14 10:58 /dev/lircd -> ../var/run/lirc/lircd=
ここまでは良いのですが、debugfsでGPIOのアサインを確認の部分で詰まりました
% sudo mount -t debugfs debugfs /sys/kernel/debug mount: debugfs is already mounted or /sys/kernel/debug busy debugfs is already mounted on /sys/kernel/debug % sudo cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-53, parent: platform/3f200000.gpio, pinctrl-bcm2835: gpiochip2: GPIOs 100-101, brcmvirt-gpio, can sleep: gpio-100 ( |? ) out hi gpiochip1: GPIOs 128-135, brcmexp-gpio, can sleep: gpio-135 ( |? ) in hi
本来であれば、
GPIOs 0-53, bcm2708_gpio: gpio-17 (lirc_rpi ir/in ) in lo gpio-18 (lirc_rpi ir/out ) in lo gpio-47 (led0 ) out lo
このような出力になるはずです。
###試したこと
/boot/config.txt
の記述に問題があるのではと思い、
http://wbbwbb.blog83.fc2.com/blog-entry-225.html
を参考に、書き換えて見たのですが、うまくいきませんでした。
また、同じ症状だと思われる事例も見つけたのですが、解決策は得られませんでした
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=186762
###補足情報(言語/FW/ツール等のバージョンなど)
とりあえず、この症状を無視して、赤外線送受信を試みました。
すると、一応信号らしきものが受信できました。(ノイズ等なのか不明)
そのデータを整形し、送信用LEDから発信したのですが、何も反応がありませんでした。
手持ちの50Ω抵抗がなかったため、330Ωのものを使いました。
また、受信家電との距離は1mもありませんでした。
これについて、GPIOから出力が上手く行っていないために反応がないのか、
それとも、電子回路のセットアップの問題なのかを判定する方法はあるのでしょうか?
そちらについてもアドバイスを頂ければと思います。
/etc/log/message
の内容を載せておきます
% cat /var/log/messages | grep lirc Nov 14 10:58:53 raspberrypi kernel: [ 2.599477] lirc_dev: IR Remote Control driver registered, major 243 Nov 14 10:58:53 raspberrypi kernel: [ 2.643125] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned. Nov 14 10:58:53 raspberrypi kernel: [ 3.705579] lirc_rpi: auto-detected active high receiver on GPIO pin 17 Nov 14 10:58:53 raspberrypi kernel: [ 3.705900] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0 Nov 14 10:58:53 raspberrypi kernel: [ 3.705906] lirc_rpi: driver registered! Nov 14 10:58:54 raspberrypi kernel: [ 6.939693] input: lircd as /devices/virtual/input/input0

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/11/15 10:38