FEDORA 14 LIRC on USB-UIRT
I am writing down the process to get LIRC working on Fedora 14 using USB-UIRC. I did not find any single place, where this was described properly.
1. First you can install LIRC package using yum by giving
yum install lirc-*
This would install lirc, lirc-lib, lirc-devel, lirc-remote and lirc-doc package.
2. Now connect USB-UIRT device to a USB port. You can check using ‘dmesg’, if it is recognised and attached to a port. If you have no other USB device connected, this would attach to /dev/ttyUSB0 port. For rest of this discussion, I am assuming this to be the case.
3. Now you can start lircd daemon giving this command:
sudo lircd -H usb_uirt_raw -d /dev/ttyUSB0
It may be possible to define the optional parameters in a hardware.conf file in /etc/lirc directory and start this daemon using a service command.
Once this is done, you can check using dmesg that daemon is running properly by seeing the message like:
Jun 13 11:34:05 localhost lircd-0.9.0: lircd(usb_uirt_raw) ready, using /var/run/lirc/lircd
4. Now you can check if it is working by running a simple command ‘mode2’ as :
sudo mode2 -H usb_uirt_raw -d /dev/ttyUSB0
Now point a IR remote control to USB-UIRT and mode2 would show you timings of IR control code by pulses and spaces. This shows that your system is working. This can also be seen graphically by using ‘xmode2’ command but it is not working on my system as of now and gives some font related problem.
5. Now you can learn the code of a remote control by using ‘irrecord’ tool. Give this command and follow instructions:
sudo irrecord -H usb_uirt_raw -d /dev/ttyUSB0 dishtv.conf
(here dishtv.conf is the file in which learnt command would be recorded.)
6. If you want to play back the controls, you can use ‘irsend’ utility. For this you should copy the learnt configuration to /etc/lirc/lircd.conf file. The name given for a particular remote is the name given in this configuration file. Let us assume that it is ‘dishtv’. After modifying the lircd.conf file, you should stop(or kill) and rerun lircd daemon so that it reads the configuration file again. After this, you can send IR control using
sudo irsend -d /var/run/lirc/lircd SEND_ONCE dishtv KEY_POWER
Here KEY_POWER is the name of a button that was given during learning phase using ‘irrecord’.
I found that it was necessary to take USB-UIRT very close to the device receiver to make it work.