Hardware Reference
In-Depth Information
The process for sending IR messages is the same, except you need to switch onto the IR port. Here's an example:
cat ir/codes/tv/off | nc -q 0 -u 192.168.1.111 65432
The only response sent to port 65432 is ACK, which can be safely ignored. However, if you do decide to listen
to port 65432 (and you have requested that all IR messages are forwarded to your PC), then you will see the key
codes appear. These can be copied from the terminal window (instead of using the web interface) into your own
configuration files. There is a supplied API document detailing each of the commands that each port handles. Note
that by using your Linux machine to maintain the IR codes, you don't need to ever upload keycode files to one of the
four slots on its web server.
N You can have several KIRA devices on your network, each transmitting messages to different devices, although
for KIRA to receive messages and send them back to a PC, you must explicitly enable the functionality from its web
interface and give it the IP address where netcat , or similar, will be listening.
Note
IR Control
If you have a PC fairly close to the IR devices you want to control, it is easy to add a suitable USB-based transmitter or
receiver to it. These can be either bought from places like RedRat or built from one of the circuit diagrams provided
by the LIRC (Linux Infra-Red Remote Control), which also provides the software.
N Most PCs attach USB ports directly to the motherboard, and if you make a mistake when building your own
device, you could destroy it. Purchasing a separate PCI board with USB sockets should provide some protection from mishaps.
Caution
For IR transmission, you need to know the specific control codes of the device you want to control. If you have a
standard TV or video, this data is usually available online ( http://lirc.sourceforge.net/remotes/ ); otherwise, you
will also need to purchase or build an IR receiver to teach LIRC the existing codes. Fortunately, if you took the earlier
hint and bought a RedRat, you will have a receiver built in that, along with the supplied Windows software or LIRC,
can be used to program the codes directly.
LIRC 17 is the Linux-standard method for reading and transmitting IR data. It comprises a standard daemon,
lircd , and a set of tools to record the input messages and transmit them back again. It adopts a modular approach
to support the wide variety of LIRC devices available. Reproducing an installation guide here would be foolhardy,
but suffice to say there are three main types of supported control:
GPIO devices : These are generally supplied with TV cards, such as those from Hauppauge.
The modules are usually compiled into the standard daemon build
Serial port device : This covers a wide range of different devices, including home-brew
transmitters, and because they process serial data directly, they don't need any specific
driver code. Typical circuits are available from the LIRC web site. If you're unsure about
connecting your own electronics onto your PC motherboard, you can buy serial PCI cards,
which offer a level of protection against rogue electronics
http://lirc.org
 
Search WWH ::




Custom Search