Now that it is becoming my (MythTV) media centre, the infra red port becomes useful! Here are the steps I used to get it working. I had some small hassle with the built-in serial port driver taking over.
- First, make sure it's enabled in the BIOS, and take note of the serial port it's attached to.
There are no other serial ports on this laptop, so anything that looks like a serial port is likely to be the infra red port.
- I used lirc to receive and configure the port.
In Gentoo enable the lirc global USE flag (global means put it in make.conf because many programs can make use of it). Also add this line to make.conf:
In other distros, you have to somehow build the sir driver.
Also add the lirc USE flags hardware-carrier and transmitter. You can do this in
/etc/make.conf, or better use
/etc/portage/package.use, or better still, make package.use a directory, and add the file
/etc/portage/package.use/lirc-20090806with the contents:
app-misc/lirc hardware-carrier transmitter
(You can of course make any-named file in /etc/portage/package.use)
- (re)compile! This includes lirc, MythTV, mplayer and anything else that might be able to take advantage of your new lirc USE flag.
In Gentoo, you could use the command:
emerge --update --newuse --deep world
to find and rebuild all packages that have changed USE flags.
- Now you need to load the lirc module. For com1, run this command:
modprobe lirc_sir io=0x2f8 irq=3 threshold=5
options lirc-sir io=0x2f8 irq=3 threshold=5
Also add this line to remove any conflicts:
install lirc_sir setserial /dev/ttyS0 uart none; modprobe --ignore-install lirc_sir
Make sure you run update-modules; then unload and reload the lirc_sir module after any changes to lirc.conf
- Test your configuration with mode2. Run mode2 as root and then press buttons on a remote. You should see some output like
If not, make sure you've unloaded any serial related module. Check dmesg after loading the lirc module to make sure your hardware is recognised:
$ dmesg | grep lirc_sir
lirc_sir: I/O port 0x03e8, IRQ 4.
- You're almost there! Now you can download remote codes from the LIRC website, or make your own with irrecord. I made my own, since my remote wasn't there.
Copy the remote code file to /etc/lircd.conf
Leave the /etc/conf.d/lircd blank or all commented out if you have the same hardware
Many thanks to: