Linux MythTV PVR w/ Nice Tracker Wireless keyboard

If you have learned signals that don't get decoded when you look at them in IR.exe, post your file to the Diagnosis Area then post your question here (including a link to the file).

Moderator: Moderators

Eric W
Posts: 6
Joined: Tue Jun 08, 2004 7:39 pm

Post by Eric W »

Sorry guys, I had to leave town for a while so I will not be able to try anything out 'till Tuesday.

Thanks for the help and I'll be back online on Tuesday!
Eric W
Posts: 6
Joined: Tue Jun 08, 2004 7:39 pm

Post by Eric W »

The Robman wrote:It was the same length as the other commands, with the same lead-in time and the same checksum.

Eric, could you re-learn the ZERO and PAUSE buttons, along with a sampling of some of the other buttons please?
Thanks a million guys! Sorry for the delay, I had to tend to some family health issues and just got back in town.

I learned a bunch of other keys (the first of which are pause and zero as requested) and here is a link to the file:

http://groups.yahoo.com/group/jp1/files ... Eric_W.txt

Thanks again for having a look and let me know if there is any other info that I can help with.

You guys rock!

Eric
jon_armstrong
Expert
Posts: 1238
Joined: Sun Aug 03, 2003 9:14 pm
Location: R.I.P. 3/25/2005
Contact:

Post by jon_armstrong »

Eric,

Did you try the device and protocol upgrade I posted on the first page?

Are you sure that the same two commands that were learned the first time to Zero and Pause are the same two commands the second time?
-Jon
jon_armstrong
Expert
Posts: 1238
Joined: Sun Aug 03, 2003 9:14 pm
Location: R.I.P. 3/25/2005
Contact:

Post by jon_armstrong »

I had some free time to try to understand the underlying protocol.

My question is: What is the relationship (if any) between F, C and X. I can't figure it out.

The data structure is D:4,F:8,M:1,C:3,X:1
D=0 and has been omitted. M=0 for the make (key depressed) state, 1 when "broken" (released). X is always the opposite polarity between "make" and "break" commands. F and C are always the same for make or break.

Here are the bits for all the Make commands that looked valid:

Code: Select all

F------- M C-- X
00000000 0 000 0
00010001 0 000 1
01010110 0 000 1
01000000 0 100 0
00000100 0 100 0
00010101 0 100 1
01001000 0 100 1
01010001 0 100 1
00110110 0 100 1
00000010 0 010 0
01101111 0 010 0
01000100 0 010 0
00100000 0 010 0
01001100 0 010 1
01010101 0 010 1
00110001 0 010 1
01010101 0 010 1
01100000 0 110 0
00100100 0 110 0
01111010 0 110 0
00100010 0 001 0
01100100 0 001 0
00001001 0 001 1
01110101 0 001 1
00110011 0 001 1
01100010 0 101 0
00001101 0 101 1
01110011 0 101 1
00001111 0 111 1
-Jon
The Robman
Site Owner
Posts: 21886
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

Post by The Robman »

jon_armstrong wrote:My question is: What is the relationship (if any) between F, C and X. I can't figure it out.
There isn't one, at least, not one involving XOR. While I can get the first xsum column to work by XORing 2 of the F columns together, I can't get any of the other 3 columns to work (though I can get close, which bugs me).

I just wrote a spreadsheet that tests every possible combination of columns XOR'd together and there isn't a match for the other 3 columns.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
The Robman
Site Owner
Posts: 21886
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

Post by The Robman »

Here's an updated upgrade to try. This one includes all the buttons that you've learned so far, plus I've modified the executor to send the make and break signals. Also, here's the KM file: Nice_Tracker_Wireless_keyboard.txt

Upgrade Code 0 = 6E F0 (Cable/1776) Nice Tracker Wireless keyboard (KM v8.22)
A1 00 FE FE 7E C1 00 0A 29 00 00 08 08 04 04 0C
0C 09 09 06 25 0E 2D 01 23 02 21 06 AD 06 63 09
4D 0C 4A 0E 6B 04 42 0E A3 08 4C 01 AB 0C 82 00
44 00 88 0D E4 08 84 0A C1 02 A9 06 C9 06 06 01
EF 02 ED 01 CD 0A A5 04 8C 09 85
End

Upgrade Protocol 0 = 01 A1 (S3C8+) Custom Protocol for Cable/1776 Nice Tracker Wireless keyboard (KM v8.22)
3D 92 12 8B 13 8D C4 10 01 08 00 EA 01 24 00 EA
01 24 92 7C 03 8E 01 0E F6 01 46 B6 05 11 8D 01
46
End
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
jon_armstrong
Expert
Posts: 1238
Joined: Sun Aug 03, 2003 9:14 pm
Location: R.I.P. 3/25/2005
Contact:

Post by jon_armstrong »

The Robman wrote:
jon_armstrong wrote:My question is: What is the relationship (if any) between F, C and X. I can't figure it out.
There isn't one, at least, not one involving XOR. While I can get the first xsum column to work by XORing 2 of the F columns together, I can't get any of the other 3 columns to work (though I can get close, which bugs me).

I just wrote a spreadsheet that tests every possible combination of columns XOR'd together and there isn't a match for the other 3 columns.
I don't want to admit how long I tried to find a consistent relationship. I would like a copy of your spreadsheet if that isn't giving away "trade secrets"
-Jon
Ironbreeze
Posts: 16
Joined: Wed Jun 16, 2004 8:54 am

Post by Ironbreeze »

The closest thing I can come up with is this...
where

Code: Select all

F------- M C-- X 
00000000 0 000 0 
Byte starts with LSB.
A will be F's Low Nibble
B will be F's High Nibble
and
U will be the nibble represented by the C-- and X

U = (RotLeftby1bit( A xor B)) + (A and B)

drop the carry bit of there is one.

example...

Code: Select all

A---B---   U---
01110011 0 101 1
A=0111
B=0011
U= 1011

U = (RotLeftby1bit( A xor B)) + (A and B)
U = (RotLeftby1bit( 0100 )) + (0011)
U = (1000) + (0011)
U = 1011



Seems to work in every case except one...

Code: Select all

01111010 0 101 1
A = 0111
B = 1010

U = (RotLeftby1bit( A xor B)) + (A and B)
U = (RotLeftby1bit( 1101 )) + (0010)
U = 1011 + 0010
U = 1000 ( not 1011 )

It's close, but not quite right. I've run out of time to look at it, but if you have something close Rob, maybe this will trigger what that other 5% is in your formula.
The Robman
Site Owner
Posts: 21886
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

Post by The Robman »

IB, you were so close (and how the hell did you figure it out anyway). The one flaw in your formula is that this is an LSB signal, so the ADD function must also be done in an LSB fashion.

In other words, before you add the two items together in the 3rd step, you must reverse the order of the bits. Then re-reverse the result to get the checksum.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
jon_armstrong
Expert
Posts: 1238
Joined: Sun Aug 03, 2003 9:14 pm
Location: R.I.P. 3/25/2005
Contact:

Post by jon_armstrong »

Rob, if you are going to tinker with the protocol (executor) to add the checkbyte, you might want to consider adding a feature to use the bottom bit (lsb first bit) that is always a zero (so far) and have it set the behavior whether you do a make|break command, or just the make only.

That way you could do a ctrl-alt -del command which is really ctrl(make)-alt(make)-del(make)-ctrl(break)-alt(break)-del(break). In practice you rarely need the three break commands.

IB and Rob (as always) very impressive decoding!
-Jon
Ironbreeze
Posts: 16
Joined: Wed Jun 16, 2004 8:54 am

Post by Ironbreeze »

Sorry so long in replying, I don't have the net at home. I live in the boonies.
(and how the hell did you figure it out anyway).
Just alot of staring and scratching my head until the parts came together :). As for reversing the bits, adding, then re-reversing the bits, I was doing this manually so I simply started the addition with the left most column and carried any bits toward the right. Same results, different method.
Now here's my question, do these companies typically make the validation data overly complicated like this? A simple (A XOR B) + (A AND B) would seem to be just as reliable. I see no benefit in them ROL the XOR results before adding. But I may be missing something, I typically do.
Actually, I have a second question. Did you figure out why the

Code: Select all

01111010 0 101 1
sample didn't work? Is it just bad data?
[/code]
The Robman
Site Owner
Posts: 21886
Joined: Fri Aug 01, 2003 9:37 am
Location: Chicago, IL
Contact:

Post by The Robman »

Ironbreeze wrote:do these companies typically make the validation data overly complicated like this?
No, in most cases they simply complement the signal. There are quite a few cases where they XOR some of the data together, usually at the BYTE level. The most complicated checksum that I've seen, prior to this example, is the 4DTV signal where each bit of the 4 bit checksum is an XOR of a different pattern of bits from the 8-bit command code.
Ironbreeze wrote:Actually, I have a second question. Did you figure out why the

Code: Select all

01111010 0 101 1
sample didn't work? Is it just bad data?
I think you made a typo in quoting that sample. I was going to work thru the sample in my original reply but then I checked all the data sampled from this keyboard so far and that sample isn't present.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Ironbreeze
Posts: 16
Joined: Wed Jun 16, 2004 8:54 am

Post by Ironbreeze »

Yep, you're right. I must have corrupted that sample while cutting and pasting to sort the samples to recognize any patterns. Thanks for spotting that, it was bothering me a bit.
That 4DTV signal sounds like a real "beat the head against the desk" problem. I would still be staring and scratching my head on that one.

Thanks again, now maybe I can get a little work done here instead of having my mind creep back to that problem every few minutes.

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

Post by The Robman »

When I decoded the 4DTV signal, I did it by spending many hours just looking at the binary and continually tweeking the formulae in a spreadsheet until all four checksum columns generated the correct results, but next time it will be alot easier because I can use the checksum code breaker spreadsheet that i developed trying to code break this keyboard.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Ironbreeze
Posts: 16
Joined: Wed Jun 16, 2004 8:54 am

Post by Ironbreeze »

Dang man, thats one heckuva spread sheet. I believe a can make out a faint image of Neo fighting Agent Smith in there.
Post Reply