Hardware Reference
In-Depth Information
Kernel drivers : These, such as the RedRat3 device, require you to build LIRC from source
and (in some cases) copy the new driver code into the LIRC directory. From here you can
rebuild the setup ( data2setup.sh ) file and build as normal. These devices will make use of
the /dev/lircd device, which should have ugo+rw privileges
Once built, the drivers can be configured and prepared according to the table at LIRC, 18 which also provides
sample configuration files for the various devices that describe each button with a human-friendly name and the
details of the IR signal to be sent. From here, you can add specific commands to be triggered upon the various button
presses within the .lircrc file, which has a format typical of this:
begin
prog = mythtv
button = Rew
config = Left
end
Each button on the remote is mapped to a function of the software ( prog ) in this fashion.
One of the big benefits in using RedRat, and LIRC in general, is its inclusion in many standard media players,
mixers, and TV applications. Consequently, if this is your primary purpose of IR, then you have completed your media
installation already since those commands can trigger something useful in the existing software!
LIRC also has a network mode whereby you can communicate with an LIRC daemon through a network socket,
allowing an external application to act as if it were a local IR remote control. This is useful for testing and as a method
of remotely a PC-based media player without writing new code.
For more specific applications, you will need to make use of irexec , as shown here:
begin
prog = irexec
button = ok
config = /usr/bin/someprogram with arguments here
end
In this way, you can use an IR remote to interact with other arbitrary applications, including media players on
other machines. Additionally, you can adopt the same ideas as Cosmic (mentioned earlier in this chapter and covered
in more detail in Chapter 7) to develop a state-based control mechanism using very cheap IR transmitters.
Conclusion
Each device in your home should have the ability to be controlled remotely, either through the power lines (with X10
or C-Bus), with an Ethernet socket, or through basic Infrared. This is the first step of a two-stage process. The second
is when you have a computer able to issue control messages to those devices. At that point, the devices can be used
seamlessly from anywhere in the world. When the device doesn't support such functionality, you have to hack it.
And that's where the geeky fun begins!
www.lirc.org/html/table.html
Search WWH ::




Custom Search