« Happy Birthday Jeb! | Main | Mega bucks »

Monday July 12, 2004

JP1 Programming

I got the JP1 cable (to connect my universal remote to my computer; see earlier blog) a week or so ago. Then I had to learn how to use it. There are a whole host of programs that do different things, all written by a community of people who aren't making a dime on any of this. The main program is called IR which actually talks to the remote and can store settings in files on your computer. It has a graphical interface like a typical Windows program and presents a ton of information though you can ignore most of it.

Another program is called KeyMaster and is actually an Excel spreadsheet with tons of macros attached to it. It is used to handle "upgrades" which are the settings for operating a particular device by remote. A lot of devices are built in to the remote, but others have to be added via these upgrades because 1. the devices are newer than the remote, 2. so old no one thought they would be needed, or 3. so obscure the manufacturers of the remote didn't include them. You can find thousands of upgrade files on the internet, but you get what you pay for. Some work okay and some don't.


Looking in the JP1 forums file section, I found an upgrade for the brand of receiver that Susan has, KLH. I used KeyMaster to open the upgrade file, then I chose my model of remote, and then copied the settings into IR by going to the Devices tab and clicking New. Then you paste in the two text fields from KM to be download to her remote. Once I figured out what was going on it wasn't that hard. Well, except when she took her remote home it didn't work on her receiver. I had backed up the settings before I gave her the "upgrade" so I could restore the remote back to when it did work (by learning the functions from the original remote to the new one). But it's more efficient (and elegant) to use an upgrade rather than just learn all the functions.

You can also make your own upgrades. What you do is learn all the functions you can from the old remote into the new one by pointing the old remote at the new one (the universal remote has an infrared receiver for this). Then you upload these learned functions into IR. IR is able to break down the signal for each key press into its pieces. Every time you press a button on a remote a stream of information comes out. It might look like this:

+9002 -4498
+550 -1700
+550 -574
+550 -574
+550 -574
+550 -574
+550 -574
+550 -1700
+550 -574
+550 -574
+550 -1700
+550 -1700
+550 -1700
+550 -1700
+550 -1700
+550 -574
+550 -1700
+550 -574
+550 -574
+550 -1700
+550 -1700
+550 -1700
+550 -574
+550 -574
+550 -574
+550 -1700
+550 -1700
+550 -574
+550 -574
+550 -574
+550 -1700
+550 -1700
+550 -1700
+550 -40514 +9002 -2266 +550 -96716

I believe these are frequency differences from the base frequency of 38095 so I think "+550 -1700" is like a binary "1" and "+550 -574" is like "0". The other stuff must be saying the protocol and saying the signal has ended.

The signal when a button is pressed has to say what language it is using, what brand of device it is addressing (for example KLH), and what particular device you are talking to (the model 3100 receiver). You wouldn't want to press Power for your Sony TV and have it turn on the Panasonic DVD player or even the Sony CD player. So there have to be separate ways of talking to each device. And IR shows you this.

Once I had learned each signal it told me I was using the NEC1 protocol (or language), and the device code (which seems to identify the brand and device) was 65. The only difference between each learned button was the OBC code, which was a number between 0 and 30. However, a few of the learned functions had other data that didn't fit that pattern and I figured that the remote just hadn't read the signal from the original remote correctly. When I re-learned those and downloaded them back to IR they fit into the pattern of NEC1 and device 65 and I felt pretty confident that the universal remote was acting as a device to read infrared signals and store them to be used by the computer.

Once you've got that all straight you can start making an upgrade in the KeyMaster spreadsheet. You just enter the things that are the same (NEC1 and Device 65) and then assign the OBC code to each function (power, volume+, volume-, etc.). Once everything is assigned then you can create the upgrade file by pressing a button in the spreadsheet (it stores the upgrade data as a text file). And once you have that you can erase all the learned codes taking up the remote's memory, load the upgrade file into IR, and install the nice compact upgrade into the remote. Of course you also want to post it to the internet so that no one else has to do the same thing.

The problem is that there are a number of different JP1 universal remotes that have different button arrangements so, for instance, my remote has a SLEEP button, but its broken predecessor does not. So my upgrade wouldn't work on my old remote. The spreadsheet, then, has to be pretty smart because it keeps up with each model of remote and which buttons are available in addition to the different protocols for all the remotes in the world and how to break down the signals.

Finally, the remotes have pretty limited memory and there are different kinds of memory for different functions. So there is some amount of memory set aside for learning signals from another remote. Then there is memory for upgrades. And there is memory for moving keys. If you do more than a couple of upgrades, you will run out of upgrade memory. So it is best to do some stuff through just learning the buttons directly into the remote from another remote as well as doing upgrades.

I haven't actually tested the new upgrade on Susan's receiver so I don't know that it will work, but I sure don't see why it wouldn't.

Post a comment