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
  • 8

4 Answers4

11

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
  • 111
  • 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
  • 8
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
0

There is a hidden gem in the github bug report that has a workaround for lirc not being able to send AND receive. You can revert back to a previous kernel (4.14.y), but still be running the newer Bullseye OS.

https://github.com/raspberrypi/linux/issues/2993#issuecomment-497420593

This solved the lirc problem and I was able to continue to use the new OS with new python version needed for another project. There may be a compromise that I am unaware of, but for my use case it was a win-win. I'm running a very simple, lite, headless system that provides a web server, bluetooth, lirc and a serial port. If you are running a more complex configuration (desktop, audio, video, etc), I'd recommend you back up your system before trying this option.

To downgrade your kernel to 4.14.y run:

 sudo rpi-update c30ae2bb624f7fd60fcbedff950cc4361c8d2aec

In /boot/config.txt you'll need to use the old Stretch format overlay (with your pin assignments), ie:

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

and in /etc/lirc_options.conf the device line is:

...
device = /dev/lirc0
...
Ken H
  • 151
  • 1
  • 7