Posted: Wed Apr 03, 2019 9:47 am
Good work. So I double checked yesterday's files to see if I missed the hex code changing, but yesterday that was good, it was the device code that was getting dropped. But now that you've upgraded to the current RMIR, the device code is getting passed correctly but the byte2 hex code is not correct.
Yesterday's Learns
Freq___ Raw Timing Data with Coding
37736 +3440 -1720; 010101010101101011110001000011001000001010001111; +430 -20210
36866 +3440 -1720; 010101010101101011110000000011001000001010001111; +430 -43430
Today's Learns
Freq___ Raw Timing Data with Coding
37736 +3440 -1720; 010101010101101011110001000011001000001010001111; +430 -20210
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -43430
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -43430
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -20210
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -20210
I took a lot of digging but I think I've found the problem. I've tested my fix against the one learn that you supplied and it works, but to be sure I got it right, I'd need to see learns of all the buttons.
So, here's what you should do.
1. Open protocols.ini using a text editor like notepad.
2. Search for the [Sharp DVD] entries (there are 3 of them)
3. Look for the following line in the code:
CmdTranslator=Translator(lsb,comp) XorCheck(4,12,0,2,0;3,4)
4. Change it to this:
CmdTranslator=Translator(lsb,comp) XorCheck(4,12,1,2,0;3,4)
When I do that and enter 65 as the OBC (with dev=8, sub=48), I get hex "7D 70", so it will work for at least the POWER button. I guess you'll need to test whether the other buttons work.
For those curious to know why that change, the nibble (half-byte) that we're having the problem with is the checksum nibble. It is calculated by XOR-ing the device code nibble with both sub-device nibbles, both OBC nibbles and E (ie, the first half of byte2). The way the XorCheck was previously written, it was ignoring the E value (ie, the 2nd "7" in "7D 70"). I was curious to see how this was getting set as there didn't appear to be any code to set it, and I found that it gets set using DefaultCmd=00 70.
So, then I had to figure out how to get that value into the XOR calculation, and I ended up using the "seed" parm. It was previously seeded with 0, so changing it to 1 (which is the value of E in decimal) did the trick.
Yesterday's Learns
Freq___ Raw Timing Data with Coding
37736 +3440 -1720; 010101010101101011110001000011001000001010001111; +430 -20210
36866 +3440 -1720; 010101010101101011110000000011001000001010001111; +430 -43430
Today's Learns
Freq___ Raw Timing Data with Coding
37736 +3440 -1720; 010101010101101011110001000011001000001010001111; +430 -20210
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -43430
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -43430
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -20210
36866 +3440 -1720; 010101010101101011110001000011001000001010001110; +430 -20210
I took a lot of digging but I think I've found the problem. I've tested my fix against the one learn that you supplied and it works, but to be sure I got it right, I'd need to see learns of all the buttons.
So, here's what you should do.
1. Open protocols.ini using a text editor like notepad.
2. Search for the [Sharp DVD] entries (there are 3 of them)
3. Look for the following line in the code:
CmdTranslator=Translator(lsb,comp) XorCheck(4,12,0,2,0;3,4)
4. Change it to this:
CmdTranslator=Translator(lsb,comp) XorCheck(4,12,1,2,0;3,4)
When I do that and enter 65 as the OBC (with dev=8, sub=48), I get hex "7D 70", so it will work for at least the POWER button. I guess you'll need to test whether the other buttons work.
For those curious to know why that change, the nibble (half-byte) that we're having the problem with is the checksum nibble. It is calculated by XOR-ing the device code nibble with both sub-device nibbles, both OBC nibbles and E (ie, the first half of byte2). The way the XorCheck was previously written, it was ignoring the E value (ie, the 2nd "7" in "7D 70"). I was curious to see how this was getting set as there didn't appear to be any code to set it, and I found that it gets set using DefaultCmd=00 70.
So, then I had to figure out how to get that value into the XOR calculation, and I ended up using the "seed" parm. It was previously seeded with 0, so changing it to 1 (which is the value of E in decimal) did the trick.