11

I’m trying to control an IR HVAC unit in my house with a Raspberry Pi 2 and an infrared shield (see here: http://bit.ly/29iC0lr).

I followed the instructions on the IR shield product page with tips from a few other places and receiving signals from the HVAC remote works great. I was able to create a .conf file and irsend sees the buttons I configured when I use the LIST command but when I try SEND_ONCE, I get this response:

irsend: hardware does not support sending

I spent several hours trying various OSes (including piCore 6.1-v7 and Raspbian Jesse 2016-05-27 and 2015-11-21) and two versions of LIRC (0.9.0 and 0.9.4) but always got the same result.

I confirmed that the IR LED is working using a digital camera and a python script that manually operates the GPIO pin.

Can anyone point me in the right direction to troubleshoot this? Is there any way to find out why LIRC seems to think my hardware doesn’t have a transmitter?

Thanks in advance.

Note: my /boot/config.txt includes this line for lirc-rpi

dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17

[EDIT 7-7-2016] Here's some additional info, including the output from several commands in the Troubleshooting section on this page: http://aron.ws/projects/lirc_rpi/ The output of cat /sys/kernel/debug/gpio does not look right but I don't know what to do about it. :-\

I have the following line in /etc/rc.local:

modprobe lirc_rpi gpio_in_pin=18 gpio_out_pins=17

I also tried a similar bit of code in /etc/modules but it didn't make any difference.

pi@raspberrypi:~ $ ls -l /dev/lirc*
crw-rw---- 1 root video 244, 0 Jul  7 11:27 /dev/lirc0
lrwxrwxrwx 1 root root      21 Jul  7 11:27 /dev/lircd -> ../var/run/lirc/lircd

pi@raspberrypi:~ $ dmesg | grep lirc
[    5.219904] lirc_dev: IR Remote Control driver registered, major 244
[    5.230067] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[    6.196796] lirc_rpi: auto-detected active low receiver on GPIO pin 18
[    6.197243] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[    6.197248] lirc_rpi: driver registered!


pi@raspberrypi:~ $ sudo cat /sys/kernel/debug/gpio
GPIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835:
 gpio-35  (?                   ) in  hi
 gpio-47  (?                   ) out lo


pi@raspberrypi:~ $ cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
 16:          0          0          0          0   ARMCTRL  16 Edge      bcm2708_fb dma
 20:       1500          0          0          0   ARMCTRL  20 Edge      DMA IRQ
 32:     145314          0          0          0   ARMCTRL  32 Edge      dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
 49:          0          0          0          0   ARMCTRL  49 Edge      3f200000.gpio:bank0
 50:          0          0          0          0   ARMCTRL  50 Edge      3f200000.gpio:bank1
 65:         26          0          0          0   ARMCTRL  65 Edge      3f00b880.mailbox
 66:          2          0          0          0   ARMCTRL  66 Edge      VCHIQ doorbell
 75:          1          0          0          0   ARMCTRL  75 Edge
 77:        120          0          0          0   ARMCTRL  77 Edge      DMA IRQ
 82:        192          0          0          0   ARMCTRL  82 Edge      mmc0
 83:          5          0          0          0   ARMCTRL  83 Edge      uart-pl011
 96:          0          0          0          0   ARMCTRL  96 Edge      arch_timer
 97:       3798       2724       1275       1139   ARMCTRL  97 Edge      arch_timer
FIQ:              usb_fiq
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:       2225       2478       3697       2901  Rescheduling interrupts
IPI3:          7          6          8          9  Function call interrupts
IPI4:          3          5          0          1  Single function call interrupts
IPI5:          0          0          0          0  CPU stop interrupts
IPI6:          0          0          0          0  IRQ work interrupts
IPI7:          0          0          0          0  completion interrupts

pi@raspberrypi:~ $ lsmod
Module                  Size  Used by
cfg80211              419759  0
rfkill                 16659  2 cfg80211
8192cu                528485  0
evdev                  10226  1
snd_bcm2835            19739  0
bcm2835_gpiomem         3023  0
snd_pcm                74833  1 snd_bcm2835
snd_timer              18164  1 snd_pcm
lirc_rpi                6638  0
snd                    52116  3 snd_bcm2835,snd_timer,snd_pcm
lirc_dev                8169  1 lirc_rpi
rc_core                16910  1 lirc_dev
uio_pdrv_genirq         2966  0
uio                     8228  1 uio_pdrv_genirq
ipv6                  341892  30
gq9000
  • 151
  • 1
  • 1
  • 7
  • Could you edit the question and include the LIRC related entries you have made to `/boot/config.txt`? – joan Jul 06 '16 at 12:54
  • Okay, I updated the question. – gq9000 Jul 06 '16 at 14:09
  • Another update with some troubleshooting info from the project page of lirc_rpi. It looks like the module is not correctly allocating the gpio pins. Any ideas on how to fix that?? – gq9000 Jul 07 '16 at 11:52
  • How exactly did you confirmed that IR is working? Could you please share this python script? I have the same problem, my configuration seems okay, reading via mode2 works fine, but irsend still gives me this error. – m1gu3l Oct 01 '16 at 21:11
  • I don't have the script anymore but it was probably something like this: http://www.rpiblog.com/2012/09/using-gpio-of-raspberry-pi-to-blink-led.html Just change this script to use the output pin (17), run it and point a digital camera or your cell phone camera at the LED. You should see a faint white light blinking in the center of the LED. – gq9000 Dec 04 '16 at 13:35
  • I created an extensive [tutorial](https://raspberrypi.stackexchange.com/questions/70945/setting-up-a-remote-control-using-lirc) on stackexchange on how I managed to remote control my TV using only a Raspberry Pi and an old Infrared diode from an old remote control. – Besi Aug 09 '17 at 09:43

3 Answers3

10

For me this additional step helped:
edit /etc/lirc/lirc_options.conf and set
driver = devinput
to
driver = default
and then reboot or restart lircd service

Mikk
  • 101
  • 1
  • 2
4

Okay, I found the answer, or rather someone much more knowledgeable about Linux than me (https://raspberrypi.stackexchange.com/users/49162/jonathan-dieter) found it. :)

Rather than loading the lirc_rpi module in /etc/modules or /etc/rc.local, he suggested adding a new config file to /etc/modprobe.d/ (in my case /etc/modprobe.d/ir-remote.conf) with the following line:

options lirc_rpi gpio_in_pin=18 gpio_out_pin=17

My best guess as to why this made the difference is that the module was loading with default settings BEFORE the command in /etc/modules or rc.local ran. Since it was already loaded, the system just ignored my subsequent attempt and the out pin was never configured correctly (This is under Raspbian Jessie BTW).


One other note about the HVAC unit that might be helpful. I was not able to use irrecord to save the commands from the remote control. It seems HVAC systems work a bit differently than a TV or VCR.

These two pages (http://www.instructables.com/id/Reverse-engineering-of-an-Air-Conditioning-control/?ALLSTEPS and http://absurdlycertain.blogspot.com/2013/03/lirc-raspi-remote-control-configuration.html esp. the first two comments) helped me figure out how to record the raw output from mode2, normalize it and then transmit it with irsend.

gq9000
  • 151
  • 1
  • 1
  • 7
2

After following this guide: http://www.raspberrypiwiki.com/index.php/Raspberry_Pi_IR_Control_Expansion_Board I encountered the same issue as stated in this question:

irsend: hardware does not support sending

I tried adding this line:

options lirc_rpi gpio_in_pin=18 gpio_out_pin=17

in /etc/modprobe.d/ir-remote.conf, but that didn't help either.

When I started LIRC daemon with following command:

sudo lircd --device /dev/lirc0

it worked! Device needs to be the same as you configured in /etc/lirc/hardware.conf file. So the steps are:

  1. Follow this guide: http://www.raspberrypiwiki.com/index.php/Raspberry_Pi_IR_Control_Expansion_Board
  2. When you come to section called "IR Transmitting Function" point 5. and you get error: irsend: hardware does not support sending
  3. Then run following command in console: sudo lircd --device /dev/lirc0 to start LIRC daemon
  4. Now run irsend SEND_ONCE /home/pi/lircd.conf KEY_VIDEO_PREV
Igor
  • 21
  • 3
  • I have the same results. Default install does not work, but it does work with the command you provided. Do you have any understanding of why this is true? I'd like to modify init.d so the proper command is run at boot. – tim11g Feb 02 '20 at 21:29
  • Works for me, BUT: It breaks the receiver. For whatever reason, I need to use /dev/lirc1 when receiving infrared commands. If I switch lircd to use /dev/lirc0, I can send, but no longer receive. :-( – PMF May 05 '20 at 12:04
  • It seems that /dev/lirc0 is the device file for sending IR data, and /dev/lirc1 is the device for receiving. Confirmed that on my device lircd starts as a receiver by default, sing /dev/lirc1. – Totoro May 19 '21 at 07:11