Bizarre problem with RC5 protocall (long post)
Posted: Sun Aug 08, 2004 3:37 pm
I've discovered some strange behavior in the RC5 protocall which I think is an error, but I'm not sure. I'm reporting this to see if anyone else has noticed it, and also to see if it can be fixed.
I've had a Philips widescreen TV for about 6 months. I've been controlling my system with a URC-8810. The TV uses the RC5 protocall. I've been noticing occasional strange behavior from the TV every once in a while, usually along the lines of one command in a macro not being executed. Usually it would fail to either power up or down when I executed my global "system power" macro. It worked about 75% of the time, and the other 25% I'd have to manually press "TV" then "Power" to get it synched with the rest of my components.
After adding a new DVD player to my system I had to do a bunch of reprogramming, including exploring some new special protocalls and using an extender. All of a sudden the TV was missing comands all over the place. I experimented with adding delays between commands, and varying the duration of the TV button presses, but the strange behavior kept reoccurring. I finally found a very obsure bug that causes the TV to miss commands in very specific circumstances.
First, how the RC5 protocall is supposed to work (from what I have gathered): Each time a button is pressed on the factory remote, a bit in the infrared pulse train is flipped. Both the TV and the remote need to have this bit in sync, or the TV ignores the command. This bit is flipped every time any key is pressed on the factory remote.
For example, using the factory remote:
POWER: TV turns on
POWER: TV turns off
The TV and remote stay in sync.
Next example:
POWER: TV turns on
POWER with LED blocked: nothing happens
POWER: nothing happens
POWER: TV turns off.
Pressing POWER with the LED blocked gets the TV and remote out of sync. The next POWER command doesn't do anything, but re-syncs the TV and remote. The last POWER command works normally.
Using the 8810 remote,
TV
POWER: TV turns on
POWER: TV turns off
and
TV
POWER: TV turns on
POWER with LED blocked: nothing happens
POWER: nothing happens
POWER: TV turns off.
Just like the factory remote, as we expect. But, look what happens when we do this:
TV
POWER: TV turns on
VCR
POWER: TV does nothing
TV
POWER: TV does nothing
POWER: TV turns off.
Issuing the VCR power command (completely different protocall) has caused the RC5 bit to flip, even though no RC5 command was entered. Look what happens if we add another POWER command to the series:
TV
POWER: TV turns on
VCR
POWER: TV does nothing
VCR
POWER: TV does nothing
TV
POWER: TV turns off.
It looks like everything is functioning normally when actually the RC5 bit is getting toggled each time POWER is pressed.
It appears that the same command key needs to be pressed repeatedly for this to happen. When another key is pressed, the RC5 bit stops flipping:
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
TV
3: TV does nothing
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
3: TV does nothing
TV
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
0: TV does nothing
3: TV does nothing
TV
3: TV does nothing
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
3: TV does nothing
0: TV does nothing
3: TV does nothing
TV
3: TV responds
An even number of repeats is OK. An odd number of repeats looses sync. What's really freaky is that the RC5 bit gets out of sync only for the key that is repeated. Look at these two results:
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
TV
3: TV does nothing
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
TV
POWER: TV turns off
You can see how this can play havoc with RC5 commands when macros get involved. This was my original "system power" macro:
TV;Power;VCR;Power;RCVR/AMP;Power;CBL;Power;TV;0;3;CBL
Press once to turn everything on, and press again to turn everything off. I could never figure out why half the time it worked, and half the time the TV either wouldn't turn on or off. I thought maybe the VCR power command was messing things up, so I changed it to this:
VCR;Power;RCVR/AMP;Power;CBL;Power;TV;Power;0;3;CBL
Suddenly everything worked, so I patted myself on the back and moved on. In reality, by moving the TV Power command to the end of the macro, I was keeping the RC5 bit from being flipped an odd number of times and getting out of sync.
Remember how I said that my problems came back all of a sudden? It's because I believed the extender would have fixed whatever timing problems I had with the original "system power" macro, so I changed it back to this:
TV;Power;VCR;Power;RCVR/AMP;Power;CBL;Power
Bingo, RC5 sync bit is messed up again. This is when I stopped and did the troubleshooting cases shown above. Now that I understand what is going on, I fixed the problem with this macro:
TV;Power;TV;0;TV;3;VCR;Power;RCVR/AMP;Power;CBL;Power
This breaks up the sequential pressing of the Power keys. Note that just moving the TV Power command to the end is OK except when the macro is executed twice in a row. The second execution puts the RC5 bit back out of sync, and the TV won't turn off.
Hopefully this is some help to people trying to work out intermittant, bizarre problems like I was having. Maybe the RC5 protocall can be tweaked to fix the problem.
cheers,
Todd Ferrante
I've had a Philips widescreen TV for about 6 months. I've been controlling my system with a URC-8810. The TV uses the RC5 protocall. I've been noticing occasional strange behavior from the TV every once in a while, usually along the lines of one command in a macro not being executed. Usually it would fail to either power up or down when I executed my global "system power" macro. It worked about 75% of the time, and the other 25% I'd have to manually press "TV" then "Power" to get it synched with the rest of my components.
After adding a new DVD player to my system I had to do a bunch of reprogramming, including exploring some new special protocalls and using an extender. All of a sudden the TV was missing comands all over the place. I experimented with adding delays between commands, and varying the duration of the TV button presses, but the strange behavior kept reoccurring. I finally found a very obsure bug that causes the TV to miss commands in very specific circumstances.
First, how the RC5 protocall is supposed to work (from what I have gathered): Each time a button is pressed on the factory remote, a bit in the infrared pulse train is flipped. Both the TV and the remote need to have this bit in sync, or the TV ignores the command. This bit is flipped every time any key is pressed on the factory remote.
For example, using the factory remote:
POWER: TV turns on
POWER: TV turns off
The TV and remote stay in sync.
Next example:
POWER: TV turns on
POWER with LED blocked: nothing happens
POWER: nothing happens
POWER: TV turns off.
Pressing POWER with the LED blocked gets the TV and remote out of sync. The next POWER command doesn't do anything, but re-syncs the TV and remote. The last POWER command works normally.
Using the 8810 remote,
TV
POWER: TV turns on
POWER: TV turns off
and
TV
POWER: TV turns on
POWER with LED blocked: nothing happens
POWER: nothing happens
POWER: TV turns off.
Just like the factory remote, as we expect. But, look what happens when we do this:
TV
POWER: TV turns on
VCR
POWER: TV does nothing
TV
POWER: TV does nothing
POWER: TV turns off.
Issuing the VCR power command (completely different protocall) has caused the RC5 bit to flip, even though no RC5 command was entered. Look what happens if we add another POWER command to the series:
TV
POWER: TV turns on
VCR
POWER: TV does nothing
VCR
POWER: TV does nothing
TV
POWER: TV turns off.
It looks like everything is functioning normally when actually the RC5 bit is getting toggled each time POWER is pressed.
It appears that the same command key needs to be pressed repeatedly for this to happen. When another key is pressed, the RC5 bit stops flipping:
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
TV
3: TV does nothing
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
3: TV does nothing
TV
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
0: TV does nothing
3: TV does nothing
TV
3: TV does nothing
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
3: TV does nothing
0: TV does nothing
3: TV does nothing
TV
3: TV responds
An even number of repeats is OK. An odd number of repeats looses sync. What's really freaky is that the RC5 bit gets out of sync only for the key that is repeated. Look at these two results:
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
TV
3: TV does nothing
3: TV responds
TV
3: TV responds
3: TV responds
VCR
3: TV does nothing
TV
POWER: TV turns off
You can see how this can play havoc with RC5 commands when macros get involved. This was my original "system power" macro:
TV;Power;VCR;Power;RCVR/AMP;Power;CBL;Power;TV;0;3;CBL
Press once to turn everything on, and press again to turn everything off. I could never figure out why half the time it worked, and half the time the TV either wouldn't turn on or off. I thought maybe the VCR power command was messing things up, so I changed it to this:
VCR;Power;RCVR/AMP;Power;CBL;Power;TV;Power;0;3;CBL
Suddenly everything worked, so I patted myself on the back and moved on. In reality, by moving the TV Power command to the end of the macro, I was keeping the RC5 bit from being flipped an odd number of times and getting out of sync.
Remember how I said that my problems came back all of a sudden? It's because I believed the extender would have fixed whatever timing problems I had with the original "system power" macro, so I changed it back to this:
TV;Power;VCR;Power;RCVR/AMP;Power;CBL;Power
Bingo, RC5 sync bit is messed up again. This is when I stopped and did the troubleshooting cases shown above. Now that I understand what is going on, I fixed the problem with this macro:
TV;Power;TV;0;TV;3;VCR;Power;RCVR/AMP;Power;CBL;Power
This breaks up the sequential pressing of the Power keys. Note that just moving the TV Power command to the end is OK except when the macro is executed twice in a row. The second execution puts the RC5 bit back out of sync, and the TV won't turn off.
Hopefully this is some help to people trying to work out intermittant, bizarre problems like I was having. Maybe the RC5 protocall can be tweaked to fix the problem.
cheers,
Todd Ferrante