The anatomy of an upgrade

General JP1 chit-chat. Developing special protocols, decoding IR signals, etc. Also a place to discuss Tips, Tricks, and How-To's.

Moderator: Moderators

Post Reply
The Robman
Site Owner
Posts: 21886
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

The anatomy of an upgrade

Post by The Robman »

This is just an informational post. This info is not needed for regular JP1 use, but if you want to know how an upgrade works, hopefully this will tell you.

First you need to understand what IR signals look like. To that end, I recommend that you read this...
http://www.hifi-remote.com/infrared/

An upgrade consists of two parts, first there's the Device Upgrade and then there's the Protocol Upgrade. Now in most cases, no protocol upgrade is needed, when this happens it means that the protocol in question is already built into the remote's firmware (aka "ROM"). But regardless of whether the protocol is in the ROM or supplied as an upgrade, there is one none the less.

The protocol upgrade, also known as the "executor", is a mechanism designed to replicate the format of an IR signal. In most cases, this can be done by simply plugging in values to the remote's built-in "IR Engine", but in some cases, the signal needs to be formatted manually using assembler.

Either way, the executor just re-creates the format of the signal, it still requires the actual numeric values to be supplied, which is where the Device Upgrade comes into play.

The device upgrade tells the remote which executor to use. It also tells the remote which values need to be used as "fixed data". It also tells the remote which buttons are to be programmed which codes to use on each button.

Let's look at a specific upgrade as an example...

Code: Select all

Upgrade Code 0 = 7B ED (SAT/1005) Echostar Dishplayer (KM v9.09)
 0F 17 3A 7E FE F1 00 80 3C 08 D4 00 68 78 70 60
 C8 C0 88 0C 84 1C 94 90 7C 8C 64 98 74         
End

Upgrade Protocol 0 = 01 0F (S3C8+) Dishplayer (KM v9.09)
 43 8B 11 8B 12 B5 49 05 08 01 14 02 F6 01 14 05
 1C 0B 93 01 14 0B A6 8D 01 46
End
First, let's look at the header line where you'll see that the hex for the setup code is "7B ED". The "7" tells us that this upgrade uses device type 7, which for the 15-2116 remote is "SAT". Now, let's look at the rest of the hex: "BED". In binary, that is 101111101101.

The first bit, which in this case is 1, gives us the first BYTE of the protocol id, so we know the PID will be "01 ??". The rest of the binary gives us the setup code, which is 1005.

The first byte of the upgrade (ie, "0F") gives us the 2nd byte of the PID, so the full PID is "01 0F". The 2nd byte of the upgrade (ie, "17") tells us which numeric table entry is used for this upgrade. If this byte is zeroes, it means the codes for the numeric buttons will be supplied as part of the upgrade, if this byte holds a non-zero value it means that a numeric table entry is being used. Suffice to say that the tools (IR, KM and RM) understand this, so you don't need to fully understand it.

The next few bytes are what I call the "keymap bytes", these tell us which buttons are included in the upgrade. In this case the keymap bytes are "3A 7E FE F1". If the last bit in the byte is 0, it means another KMB follows, if it's 1 it means this is the last KMB. If you convert the keymap bytes to binary in this case, you get...

0011101-0
0111111-0
1111111-0
1111000-1

If we strip away the continuation bit, we get
0011101
0111111
1111111
1111000

Now, remember that we know that this is a SAT code for the 15-2116, so let's get the list of buttons that make up the SAT mode for this remote and let's precede each button with the corresponding bit from the binary above ...

0 numbers (10 buttons)
0 volume up/down, mute (3 buttons)
1 channel up/down (2 buttons)
1 power
1 last
0 select
1 exit
0 menu
1 up arrow
1 down arrow
1 left arrow
1 right arrow
1 info
1 guide
1 tv/video
1 play
1 stop
1 rewind
1 fast fwd
1 pause
1 record
1 enter
1 pip
1 move
1 swap
0 freeze

You'll notice that the ten numeric buttons are grouped together as one, likewise the three volume buttons and the two channel buttons are also grouped. Each group has just 1 bit in the keymap bytes, so you either get them all or none.

Immediately following the keymap bytes in the upgrade is the fixed data. At this point I need to jump ahead to the protocol code for a moment. If you look at the 3rd byte of the protocol code you'll see that the value is "11". This means that it uses 1 byte of fixed data (ie, the first nibble), and 1 byte for each button code (ie, the 2nd nibble). So, as this protocol uses 1 byte of fixed data, the next 1 byte of upgrade code is the fixed data, which in this case is "00". All of the remaining bytes of data are the button codes, one byte (in this case) per button that's programmed.

So, here's the button list again with the appropiate hex code indicated...

0 numbers (0-9)
0 volume
1 channel up/down (hex code: 80 3C )
1 power (hex code: 08 )
1 last (hex code: D4 )
0 select
1 exit (hex code: 00 )
0 menu
1 up arrow (hex code: 68 )
1 down arrow (hex code: 78 )
1 left arrow (hex code: 70 )
1 right arrow (hex code: 60 )
1 info (hex code: C8 )
1 guide (hex code: C0 )
1 tv/video (hex code: 88 )
1 play (hex code: 0C )
1 stop (hex code: 84 )
1 rewind (hex code: 1C )
1 fast fwd (hex code: 94 )
1 pause (hex code: 90 )
1 record (hex code: 7C )
1 enter (hex code: 8C )
1 pip (hex code: 64 )
1 move (hex code: 98 )
1 swap (hex code: 74 )
0 freeze

I'm going to skip the protocol code itself as that would require an even longer description than this, and it varies by remote type.

I should also point out that the format of an upgrade has changed slightly with some of the newer remotes. They are now putting the full 2-byte protocol it in the beginning of the upgrade and they're using the full 12 bits of the setup code hex for the setup code.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Post Reply