I'm trying to build a TV remote control using Raspberry Pi, and I get the following error when I try to send a command:
pi@raspberrypi:~$ irsend SEND_ONCE Samsung_BN59-00937A KEY_POWER irsend: command failed: SEND_ONCE Samsung_BN59-00937A KEY_POWER irsend: hardware does not support sending I've built an IR circuit, which works fine when I test it using a simple blinking script:
#!/usr/bin/python import RPi.GPIO as GPIO import time print "Starting blink test.." GPIO.setwarnings(True) GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.OUT) while True: GPIO.output(17, True) time.sleep(1) GPIO.output(17, False) time.sleep(1) When I run this I can see the IR LED blinking using a camera LCD viewfinder. The circuit is wired according to this tutorial.
I set up LIRC following this tutorial.
My /etc/modules has these two lines in it:
lirc_dev lirc_rpi gpio_in_pin=18 gpio_out_pin=17 My /boot/config.txt has this line in it:
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17 My /etc/lirc/hardware.conf looks like this:
# /etc/lirc/hardware.conf # # Arguments which will be used when launching lircd LIRCD_ARGS="--uinput" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD=false #Don't start irexec, even if a good config file seems to exist. #START_IREXEC=false #Try to load appropriate kernel modules LOAD_MODULES=true # Run "lircd --driver=help" for a list of supported drivers. DRIVER="default" # usually /dev/lirc0 is the correct setting for systems using udev DEVICE="/dev/lirc0" MODULES="lirc_rpi" # Default configuration files for your hardware if any LIRCD_CONF="" LIRCMD_CONF="" My /etc/rc.local has this line in it:
modprobe lirc_rpi gpio_in_pin=18 gpio_out_pins=17 I also tried following the suggested answer from this question and added the file
/etc/modprobe.d/ir-remote.conf with this line in it:
options lirc_rpi gpio_in_pin=18 gpio_out_pin=17 But I still get the same error with irsend. Please could somebody help me fix this? Thank you.
EDIT: This is the output of lsmod when I remove the lirc lines from /etc/modules, /etc/rc.local, and /etc/modprobe.d/ir-remote.conf:
pi@raspberrypi:~$ lsmod Module Size Used by bnep 10340 2 hci_uart 17943 1 btbcm 5929 1 hci_uart bluetooth 326105 22 bnep,btbcm,hci_uart brcmfmac 186403 0 brcmutil 5661 1 brcmfmac cfg80211 427855 1 brcmfmac rfkill 16037 4 cfg80211,bluetooth snd_bcm2835 20447 1 snd_pcm 75762 1 snd_bcm2835 snd_timer 19288 1 snd_pcm snd 51908 5 snd_bcm2835,snd_timer,snd_pcm bcm2835_gpiomem 3040 0 bcm2835_wdt 3225 0 lirc_rpi 6478 0 uio_pdrv_genirq 3164 0 uio 8000 1 uio_pdrv_genirq lirc_dev 8310 1 lirc_rpi rc_core 16468 1 lirc_dev i2c_dev 5859 0 fuse 84037 3 ipv6 347594 46
/etc/modules,/etc/rc.local, and/etc/modprobe.d/ir-remote.conf. Then reboot and add the output oflsmodto your question.lsmod.dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17to/boot/config.txtand rebooted.