JP1 universal remote controls (One-for-all)

From MythTV Official Wiki
Revision as of 16:21, 22 October 2010 by Wagnerrp (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

JP1 Overview

JP1 remotes are inexpensive remote controls made by Universal Electronics (UEI or UEIC) and sold under several brand names, most notably One-for-All and Radio Shack. Such remotes typically sell for US$15-50. Many cable companies also distribute UEIC remotes with their cable boxes, and some electronics manufacturers provide JP1 remotes. Unlike many inexpensive "universal" remotes, JP1 remotes can be programmed to extend their capabilities. The term JP1 most directly applies to the 6-pin connector that's used to connect the remote to a computer. You can identify JP1 remotes by the presence of a 6-pin connector or by six small holes in the battery compartment; either is marked "JP1", "JP1.1", "JP1.2", or "JP1.3."

Important.png Note: Most expensive ($100 or more) programmable remotes are not JP1 remotes. These remotes, from manufacturers such as Logitech, have their own programming tools. Many of the advantages and disadvantages of such remotes, from a MythTV perspective, are the same, but you'll need to consult documentation on your specific remote to learn how to program it.

Some UEIC remotes come with JP1 connectors installed at the factory. Most models, however, lack these connectors, having only six small holes and a "JP1" label in the battery compartment. These remotes are usually programmable, but they require either special "pogo pin" adapters or literal hardware hacking -- you must solder a 6-pin connector to the circuit board. A few models require you to add an EEPROM chip, as well. If you're uncomfortable performing such surgery, you can track down a remote that ships from the factory with the necessary hardware, or you can buy a pre-modified remote from a third party. You can also send a remote to the manufacturer for a device upgrade; UEIC adds the JP1 connector to add codes itself, then returns your remote to you.

JP1 Types

If you're interested in using the advanced JP1 features, you should be aware of several different types of JP1 remote. Despite using identical connectors, these different remote types are largely incompatible on a hardware level, so you must know which type of remote you have before you buy or build a cable. The software tools are the same for all the different remote types.

The first type is the original JP1 design. This design employs an EEPROM chip in the remote to hold programming data. A variety of different cable designs exist for this remote type, using RS-232 serial, parallel, and USB port interfaces. (At least some of these interfaces are reported to not work with USB-to-parallel connectors.)

The second broad type of JP1 remote is often referred to as "JP1.x", since the "JP1" marking next to the connector has been replaced with a label that reads "JP1.1", "JP1.2", or "JP1.3." The JP1.1 interface was used on very few models, but JP1.2 and JP1.3 are both fairly common. Interface cables for RS-232 serial and USB are available for these remotes, but few designs work with all three sub-varieties. Most ready-made JP1.x cables work with either JP1.1 and JP1.2 or with JP1.2 and JP1.3. Be sure to buy or build a cable for the appropriate interface type. Internally, JP1.x remotes use flash memory on the remote's microcontroller rather than a separate EEPROM chip.

Ready-made JP1 cables typically cost $15-$30. (RS-232 serial and parallel cables tend to be the least expensive varieties.) Most cables can be made for about half that amount, although some ready-made cables are of a proprietary design.

Pointers for JP1 Hacking

See the Hi-Fi Remote Web site for detailed information on programming or using undocumented features of these remotes. You will find details on adding JP1 connectors (when necessary), on building or buying cables to connect the remote to a computer's parallel, RS-232 serial, or USB port, and on using the hobbyist-created software for programming the remotes. Although the JP1 programming tools are awkward to use, they're quite powerful. Configuration files can be found online for a wide variety of devices. The JP1 tools enable you to remap keys and set up macros, even on remotes that don't officially support such features.

Software consists of two tools, with two choices for each available. First is a program that creates special codes for individual devices (that is, emulated remotes). Key Master (KM) is a Microsoft Excel spreadsheet that fills this roll, and Remote Master (RM) is a Java program that has similar capabilities. Both tools enable you to enter raw infrared device codes, load sets of such codes from files you can download from the Internet, and assign codes to virtual remote keys. This first tool doesn't "talk" to the remote directly, though; it just prepares the codes for an individual device. A second tool is used to combine several individual device upgrades, to perform other reprogramming tasks (such as creating macros), and to upload the final code set to the remote. The original tool to do this job is called IR.EXE. It's a Windows program that can be made to run under WINE, at least when using some interfaces. Remote Master can also fill this role; however, the device coding and remote communication tasks are quite distinct, and Remote Master actually includes two shell scripts to launch the functions separately, at least in Linux.

A few JP1 remotes include a "learning" mode in which the remote can record and reproduce the IR codes produced by other remotes. Typically, the remote only has enough memory to learn a dozen or so codes, but this can be sufficient for many purposes. Once codes are learned, the JP1 software can often produce a more memory-efficient configuration, so you can learn all the keys from a device by encoding them in stages. If you have one learning and one non-learning remote, both with JP1 interfaces, you can use the learning remote to learn the codes from a device manufacturer's remote and then transfer the learned codes to the non-learning model.

Ready-made device upgrade files can be found on the JP1 Remotes Web site's JP1 Downloads section.

Using JP1 Remotes as Keyboard Substitutes

A fully-enabled JP1 remote can be reprogrammed to emulate an infrared keyboard for use in a LIRC-less configuration, or to emulate almost any other infrared device. Without the JP1 interface and associated programming, chances are you'll have to use one of the remote's standard devices along with LIRC.

Using a JP1 remote (or any other programmable remote) to emulate an IR keyboard has the advantage of simplifying your Linux-side configuration; however, the cost is greater complexity on the remote end. You'll need a cable and you'll need to learn the JP1 software. You may also need to modify your remote's hardware to add a JP1 connector if yours lacks the actual connector.

See Programming Remotes as Keyboards for details about the reprogramming procedure.

Using JP1 Remotes with LIRC

To get your JP1 remote control working with MythTV via LIRC, you can use the "synthetic" device called VCR1444, and the remote control commands to control it, available as a device upgrade for all JP1 remote controls. The link below also has the matching LIRC lircd.conf and lircrc files for mythtv and xine. It also includes a customised xine keymap file.

The files and some instructions are here.

If you don't want to, or can't, reprogram your JP1 remote using the JP1 tools, you can select any device that provides unique functions for as many keys as possible and configure LIRC to recognize those keys. Note that the JP1 remotes, like most third-party universal remotes, don't employ all their keys for all devices. For instance, the channel up and down keys might be "dead" when you use the remote with a definition intended for a DVD player. For this reason, you may need to experiment to find a remote code and LIRC configuration that work well.