[Solved] Cannot get LIRC to work (X10 remote and RPi)

Ask questions about Arch Linux ARM. Please search before making a new topic.

[Solved] Cannot get LIRC to work (X10 remote and RPi)

Postby chicki » Wed Jul 31, 2013 1:00 pm

I have read countless guides, threads and wiki pages on the topic, but I simply cannot get my X10 remote to work with LIRC...
Any help would be appreciated.

I have tried blacklisting the ati_remote, currently it is not (I didn't even get a devide id when it was blacklisted).
I have also tried working with the driver atilibusb, currently I'm trying the solution of setting it up as an HID device.

The lirc service is running fine:
Code: Select all
[root@Raspifi ~]# systemctl status lirc.service
lirc.service - Linux Infrared Remote Control
   Loaded: loaded (/etc/systemd/system/lirc.service; enabled)
   Active: active (running) since Thu 1970-01-01 01:00:19 CET; 43 years 6 months ago
  Process: 286 ExecStartPost=/usr/bin/ir-keytable --protocol=LIRC (code=exited, status=0/SUCCESS)
  Process: 283 ExecStart=/usr/sbin/lircd -d $LIRC_DEVICE -P /run/lirc/lircd.pid -H $LIRC_DRIVER $LIRC_CONFIGFILE (code=exited, status=0/SUCCESS)
  Process: 280 ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd (code=exited, status=0/SUCCESS)
  Process: 276 ExecStartPre=/bin/rm -f /run/lirc/lircd (code=exited, status=0/SUCCESS)
  Process: 273 ExecStartPre=/bin/rm -f /dev/lircd (code=exited, status=0/SUCCESS)
  Process: 267 ExecStartPre=/bin/mkdir -p /run/lirc (code=exited, status=0/SUCCESS)
 Main PID: 285 (lircd)
   CGroup: name=systemd:/system/lirc.service
           ââ285 /usr/sbin/lircd -d /dev/input/by-id/usb-X10_Wireless_Technol...


The config files have been copied from this thread:
https://bbs.archlinux.org/viewtopic.php?id=151479&p=1

ir-keytable recognizes the device:
Code: Select all
# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event1) with:
        Driver ati_remote, table rc-medion-x10-digitainer
        Supported protocols: other
        Enabled protocols:
        Name: X10 Wireless Technology Inc USB
        bus: 3, vendor/product: 0bc7:0006, version: 0x0100
        Repeat delay = 500 ms, repeat period = 125 ms


However in IRW I cannot see any keypresses.
Is anyone with a similar setup able to help me please?

Edit: Using
Code: Select all
irrecord --driver=devinput --device=/dev/input/by-id/usb-X10_Wireless_Technology_Inc_USB_Receiver-event-if00 /root/my_remote2

I can create my own lircd.config and buttons are recognized, however I still can't see them in irw


Code: Select all
cat /etc/conf.d/lircd.conf
# Parameters for lirc daemon
#

LIRC_DEVICE="/dev/input/by-id/usb-X10_Wireless_Technology_Inc_USB_Receiver-event-if00"
LIRC_DRIVER="devinput"
LIRC_EXTRAOPTS=""
LIRC_CONFIGFILE="/etc/lirc/lircd.conf"


For people trying to get this to run aswell: the self-made conf file doesn't work, you have to use the one for HID linked in the archwiki article (http://lirc.git.sourceforge.net/git/git ... ut;hb=HEAD)

Now I just need to get .lircrc to work :)

Edit: Didn't know how that you had to start irexec manually :)
Now everything besides automatic startup seems to be working.

I'll post a summary/current guide for those who have the same problems later.
chicki
 
Posts: 7
Joined: Wed Jul 31, 2013 12:50 pm

Re: [Solved] Cannot get LIRC to work (X10 remote and RPi)

Postby chicki » Thu Aug 01, 2013 12:30 pm

Ok as promised, I will try to retrace my steps on how I got Archlinux Arm, my Rasberry Pi and an X10 USB remote (Medion/Pollin) to work. I had to use the HID device method - ati_usb module or atlibusb driver did NOT work for me.

1. Firstly, install LIRC
Code: Select all
# pacman -S lirc lirc-utils


The ati_remote module should NOT be blacklisted.

2. As described in the LIRC Archwiki article, find out the ID of the USB device.
Code: Select all
$ ls -l /dev/input/by-id

Enter the USB Device into /etc/conf.d/lircd.conf and devinput as driver.
If you copy & paste the ID make sure it worked properly if the name of the device is quite long (in my case the -if00 was cut of). Your /etc/conf.d/lircd.conf should look like this (again taken from the wiki article) with your own individual device name after the LIRC_DEVICE="/dev/input/by-id/

Code: Select all
 #
 #Parameters for daemon
 #
 
 LIRC_DEVICE="/dev/input/by-id/usb-3353_3713-event-if00"
 LIRC_DRIVER="devinput"
 LIRC_EXTRAOPS=""
 LIRC_CONFIGFILE="/etc/lirc/lircd.conf"




3. Creating your own /etc/lirc/lircd.conf does NOT work, use the one from GIT linked in the LIRC ArchWiki article http://lirc.git.sourceforge.net/git/gitweb.cgi?p=lirc/lirc;a=blob_plain;f=remotes/devinput/lircd.conf.devinput;hb=HEAD
https://wiki.archlinux.org/index.php/LIRC#Setup_a_HID_device_with_LIRC

The wiki article suggests to also do
Code: Select all
# modprobe evdev


4. Create a lirc.service file to auto start LIRC as described in this thread:
https://bbs.archlinux.org/viewtopic.php?id=151479&p=2


Code: Select all
[Unit]
Description=LIRC Daemon
After=network.target

[Service]
Type=forking
EnvironmentFile=/etc/conf.d/lircd.conf
PIDFile=/run/lirc/lircd.pid
ExecStartPre=/bin/mkdir -p /run/lirc
ExecStartPre=/bin/rm -f /dev/lircd
ExecStartPre=/bin/rm -f /run/lirc/lircd
ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd

ExecStart=/usr/sbin/lircd -d $LIRC_DEVICE -P /run/lirc/lircd.pid -H $LIRC_DRIVER $LIRC_CONFIGFILE
ExecStopPost=/bin/rm -f /dev/lircd
ExecStopPost=/bin/rm -fR /run/lirc
ExecStartPost=/usr/bin/ir-keytable --protocol=LIRC

[Install]
WantedBy=multi-user.target


5. For "debugging" use the following commands:
See if remote is recognized:
Code: Select all
ir-keytable -v

To see if button presses are working independently of LIRC:
Code: Select all
ir-keytable -t

To see if the LIRC service is running properly:
Code: Select all
systemctl status lirc.service

To check if the conf file for your remote is working:
Code: Select all
irw
chicki
 
Posts: 7
Joined: Wed Jul 31, 2013 12:50 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 1 guest