1

I'm trying to get irsend to control an IR diod connected to GPIO 4 but for some reason I cannot get it to work. irsend doesn't recognize the controller I've specified.

When I do irsend list "" "" I get nothing back.

pi@magpi:~ $ irsend list "" ""
pi@magpi:~ $ 

I've followed this tutorial to set up Lirc http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/

These are my configuration files:


/etc/modules

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lirc_dev
lirc_rpi gpio_out_pin=4


/boot/config.txt

dtoverlay=lirc-rpi,gpio_out_pin=4,debug=on


/etc/lirc/lircd.conf

#
# this config file was automatically generated
# using lirc-0.6.5(sir) on Sat Mar 30 19:11:50 2002
#
# contributed by
#
# brand:                       Grundig
# model no. of remote control: TP-750C (TelePilot 750C)
# devices being controlled by this remote: ST 55-908 DOLBY
#

begin remote

  name  TP-750C
  bits           10
  flags RC5|CONST_LENGTH
  eps            5
  aeps          300

  header        512  2560
  one           512   512
  zero          512   512
  gap          115940
  toggle_bit      0


      begin codes
          KEY_SLEEP                0x000000000000017F        #  Was: standby
          KEY_1                    0x00000000000000EF        #  Was: 1
          KEY_2                    0x000000000000016F        #  Was: 2
          KEY_3                    0x000000000000006F        #  Was: 3
          KEY_4                    0x00000000000001AF        #  Was: 4
          KEY_5                    0x00000000000000AF        #  Was: 5
          KEY_6                    0x000000000000012F        #  Was: 6
          KEY_7                    0x000000000000002F        #  Was: 7
          KEY_8                    0x00000000000001CF        #  Was: 8
          KEY_9                    0x00000000000000CF        #  Was: 9
          KEY_0                    0x00000000000001EF        #  Was: 0
          KEY_I                    0x0000000000000097        #  Was: i
          KEY_MUTE                 0x00000000000000FF        #  Was: mute
          prg+                     0x0000000000000157
          KEY_OK                   0x00


/etc/lirc/hardware.conf

# /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="/etc/lirc/lircd.conf"
LIRCMD_CONF=""

The tips I've already have led me to look at the following things:

pi@magpi:~ $ ls -la /dev/lirc*
crw-rw---- 1 root video 245, 0 Jan 17 09:52 /dev/lirc0
lrwxrwxrwx 1 root root      21 Jan 17 09:52 /dev/lircd -> ../var/run/lirc/lircd
pi@magpi:~ $ 

and this (the little cirle/ball to the left of "lirc.service" is green, I assume that is good. But the "unexpected end of file" I assume is not so good, but I don't understand what file is unexpectedly ending nor how to fix it)

pi@magpi:~ $ sudo /etc/init.d/lirc status
● lirc.service - LSB: Starts LIRC daemon.
   Loaded: loaded (/etc/init.d/lirc)
   Active: active (running) since Tue 2017-01-17 10:03:07 UTC; 1 day 23h ago
  Process: 380 ExecStart=/etc/init.d/lirc start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/lirc.service
           └─431 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput

Jan 17 10:03:06 magpi systemd[1]: Starting LSB: Starts LIRC daemon....
Jan 17 10:03:06 magpi lirc[380]: Loading LIRC modules:.
Jan 17 10:03:07 magpi lircd-0.9.0-pre1[408]: unexpected end of file
Jan 17 10:03:07 magpi lircd-0.9.0-pre1[431]: lircd(default) ready, using /var/run/lirc/lircd
Jan 17 10:03:07 magpi lirc[380]: Starting remote control daemon(s) : LIRC :.
Jan 17 10:03:07 magpi systemd[1]: Started LSB: Starts LIRC daemon..
pi@magpi:~ $ 

and this

pi@magpi:~ $ dmesg | grep lirc [ 5.376466] lirc_dev: IR Remote Control driver registered, major 245 [ 6.672805] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned. [ 6.674884] lirc_rpi: to_irq 498 [ 7.628910] lirc_rpi: auto-detected active high receiver on GPIO pin 18 [ 7.629429] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0 [ 7.629440] lirc_rpi: driver registered! [ 9.480588] input: lircd as /devices/virtual/input/input2 [ 10.496330] lirc_rpi: Interrupt 498 obtained [ 10.496349] lirc_rpi: in init_timing_params, freq=38000 pulse=13157, space=13158 pi@magpi:~ $

and different version things

pi@magpi:~ $ uname -a
Linux magpi 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
pi@magpi:~ $ 


pi@magpi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
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"


pi@magpi:~ $ lircd --version
lircd 0.9.0-pre1
pi@magpi:~ $ 

Does anyone have any idea why irsend list can't see my remote? Does it have anything to do with the "unexpected end of file" and if so, what does that mean?

Thanks very much for reading!

  • I created an extensive tutorial 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 9 '17 at 9:40
1

I wrote some initial tricks in http://martinho.comuf.com.

But be attention on "UNCONFIGURED" lines in config files.

As I wrote there some diagnostics tricks and that You have to remove all lines with word "UNCONFIGURED" in /etc/init.d/lirc

I don´t know why but a script look for that word even as comment.

Make backup of files before edit and dont´t forget to reboot after changes.

I tried the same command and it responded:
pi@raspbcasa:~ $ irsend list "" ""
irsend: TV_raw
irsend: aquario_raw
irsend: VCR_raw
irsend: TVIR
irsend: tv_philips_code
irsend: MXT9800L_codes
irsend: VCR_LG_code
irsend: aquario_codes
irsend: LG_VCR_Remote

---I´m using a Raspberry PI3---

If you continue in trouble with the command [irsend list "" ""] let me know.

  • 1
    Unfortunately your link martinho.comuf.com is dead. BTW: I created an extensive tutorial 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 9 '17 at 9:41
  • 1
    Sorry, The link is ok now. Very good your tutorial and troubleshooting. You can continue and send commands using web program in raspberry access by phone or general browser. It's very useful. – Jmart Aug 10 '17 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.