JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Microsoft MCE Keyboard Remote
Goto page Previous  1, 2, 3 ... 10, 11, 12, 13  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Keyboards
View previous topic :: View next topic  
Author Message
Barf
Expert


Joined: 24 Oct 2008
Posts: 790

PostPosted: Wed Sep 27, 2017 8:26 am    Post subject: Reply with quote

With all respect for Rob's work, there must be a simpler solution! In similar situations, CRC checksums are often used. Kevin Timmerman seems to be an expert in that area; has someone thought about asking him?

Quote:
What really boggles my mind is that I can't find tech specs on this out on the web.

Yes. I have not found anything either. KODI often has a lot of MCE related info, but I have not searched there. Trying to mail Microsoft?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Wed Sep 27, 2017 9:23 am    Post subject: Reply with quote

Barf wrote:
With all respect for Rob's work, there must be a simpler solution! In similar situations, CRC checksums are often used.

I'm open to suggestions. The final checksum that I derived is below, how would you have come up with it?

Here's the formula for the checksum:
Code:
1 = a:12345 b:
2 = a:678   b:34
3 = a:12678 b:1567
4 = a:3467  b:13568
5 = 1a:3568 b:14578

Where
a = OBC
b = Modifier (ie, shift, alt, etc)

The numbers refer to the bits in the byte, counting from left to right, numbered from 1 to 8 (ie, the way Excel does it).
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Wed Sep 27, 2017 9:53 am    Post subject: Reply with quote

vickyg2003 wrote:
I'm interested in the logic (plain english) as to what you did in your program to crack this. I don't expect to ever be able to do this on my own.

Here is the source code for my program:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14701

Basically, my approach was to load all the data into the program and then try to find a formula where the generated data matches one of the checksum bits. Obviously, if you only look at 1 entry there are infinite possibilities but when you look at all the data, there are only a few possibilities. The way to imagine what I did is to look at the Binary tab in my MCE.xls spreadsheet and view the checksum bits, one column at a time, so the more rows of data you have, it narrows the possible formula options. Then, look at the signal data.

First, assume that there is only 1 bit used for the checksum, so basically see if any of the vertical columns of data bits matches any of the vertical columns of checksum bits.

Next, assume that 2 bits are used, so try all the possible 2-bit combinations to see if any of them generate results that will match any of the checksum bit columns.

Next try 3 bits, then 4, then 5, etc, all the way up to 16 bits.

To do this, I created a file of all the data bits and their corresponding checksum, then I loaded this into a table in the program. Then I created a second table for the checksums where each column is a row.

I created 16 indexes and set them all to zero for starters. Then I looped through values 1 thru 16 for the #16 index. For each loop pass, if the index is not zero, I use the value in the index to grab a data bit and add it to a running total. At the end, I divide the total by 2 and grab the remainder (this is how I "XOR" the bits in COBOL).

Next, I increment the #15 (ie, going from 0 to 1) and then loop #16 from value 2 (ie, #15 plus 1) thru 16. Then I increment #15 again, and loop #16 from 3 thru 16. Etc, etc until #15 exceeds value 16, then I increment #14 by 1 and set #15 to 2 (ie, #14 plus 1), and loop #16 from 3 thru 16. And so it goes on.

At the lowest level of the loop, I calculate a proposed checksum value for every row of data and then compare this to the 5 checksum values (vertical columns) that I have and if there's a match, I report it.

When I was just using the mouse data, I got several possibilities for each checksum bit, but when I introduced the keyboard data too, the number of possibilities for each drastically reduced.
vickyg2003 wrote:
I never would have thought to reuse bits....

What do you mean by "reuse bits"? Are you referring to the fact that a data bit might be used in more than one checksum bit? If so, that is how it usually is. I was heavily involved in cracking the checksum for the 4DTV signals, way back when, and creating an executor that would generate the checksum, and in that case, bits are certainly reused.
vickyg2003 wrote:
Anyway I tried these values for UP with the calculated checksum
1111000 0000000 00
1111010 0000000 00
1111011 0000000 00
1111001 0000000 00

They have been arranged in order of how far they will travel in that 1 second interval

If this were you, what would you do next?

I'm not clear on what you're trying to do here, could you elaborate?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6952
Location: Florida

PostPosted: Wed Sep 27, 2017 11:14 am    Post subject: Reply with quote

The Robman wrote:


vickyg2003 wrote:
I never would have thought to reuse bits....

What do you mean by "reuse bits"?

Its a matter of small print and dyslexia. My mistake. I was reading I1 as H.

Quote:

vickyg2003 wrote:
Anyway I tried these values for UP with the calculated checksum
1111000 0000000 00
1111010 0000000 00
1111011 0000000 00
1111001 0000000 00

They have been arranged in order of how far they will travel in that 1 second interval

If this were you, what would you do next?

I'm not clear on what you're trying to do here, could you elaborate?

I grouped the bits into their logical groups to make it easier for me to deal with.
YYYYYYY XXXXXXX RL
I was hunting in the data bits to see if there was a toggle in here, So I was looking at those two bits that seem to be to the right of what the linux driver was using as the SIGN bit. What I found is those were directly involved in the speed that the mouse travels. As I have said, the pointer will only move for 1 second, then it stops. I have really poor hand eye coordination so I like things that move rather slow, but this is glacier speed. It takes 17 button hold to move across the screen. That equates to 17 seconds. That is very slow even for me, and I suspect most people would find this to be unacceptable.

Edit: I found an acceptable up speed , but it still quits repeating and needs multiple presses..... lots of trial and error to get 10 the 8 directions to move acceptably. ......
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Wed Sep 27, 2017 2:16 pm    Post subject: Reply with quote

So the mouse data is really: YYYYSSS XXXXSSS RL where:
YYYY = 1111 for up, 0000 for down
XXXX = 1111 for left, 0000 for right

and SSS is the speed?

what are the speed values?

And btw, I have re-written my program so that it will be easier to adapt for different lengths of checksum and/or data, and I've added comments to it, to make it (hopefully) easier to read.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14701
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6952
Location: Florida

PostPosted: Wed Sep 27, 2017 4:29 pm    Post subject: Reply with quote

The Robman wrote:
So the mouse data is really: YYYYSSS XXXXSSS RL where:
YYYY = 1111 for up, 0000 for down
XXXX = 1111 for left, 0000 for right

and SSS is the speed?

what are the speed values?


No
YYYYSYY
Where S is the Sign
and YYYY YY is the speed.

1111000 0000000 00
Takes 4 presses to reach the top of the screen

1011000 0000000 00
Takes 1 press to reach the top of the screen,

1101000 0000000 00
takes 2 presses to reach the top of the screen, but it is too fast to select anything like a menu

I have a wired mouse and if it is plugged in while testing the IR mouse command after using one of these faster commands, my own mouse jumps all over the screen with the slight bump of my desk.... Like the last Mouse-Move needs to be terminated.


Quote:


And btw, I have re-written my program so that it will be easier to adapt for different lengths of checksum and/or data, and I've added comments to it, to make it (hopefully) easier to read.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14701


Good I'll see if I can still read COBOL, lol....
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Wed Sep 27, 2017 5:14 pm    Post subject: Reply with quote

I'm still not following. The code that we previously had for UP was 1111010, and the code for DOWN was 0000110. And what does "sign" mean here? Is it + or -? Are you saying that the first 4 bits aren't always 1111 or 0000?

1111010 - UP (at what speed?)
0000110 - DOWN (at what speed?)
1111000 - UP, Takes 4 presses to reach the top of the screen
1011000 - UP, Takes 1 press to reach the top of the screen
1101000 - UP, takes 2 presses to reach the top of the screen

what would the faster/slower DOWN codes look like?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Thu Sep 28, 2017 8:17 am    Post subject: Reply with quote

Just FYI, I have written a combo protocol that generates the checksum and combines both the keyboard and mouse buttons into one. It's huge and I haven't started testing it yet, so I don't expect it to work right out of the box. If you're curious and want to test it, try learning the signals then convert them back to binary and then see where it goes wrong, and if you feel up to it, try fixing the executor code.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14702
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6952
Location: Florida

PostPosted: Thu Sep 28, 2017 9:35 am    Post subject: Reply with quote

I think we've got the cart before the horse here. I'm going to rewrite my mouse protocol to make it easier for me to make changes to the x y values for testing. I'm trying to find an ideal speed for our x y values. This mouse needs to move at a slow enough rate to be stopped on an individual item. Since the data doesn't seem to have a toggle bit. perhaps there is a timed interval where everything needs to be set to 0000000 0000000 00 like the MCE keyboard key up final frame....I think the "toggle frame needs to occur at timed intervals. I'm thinking its not every other frame since the codes harmony created based on learns all showed the Y X R L repeating.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6952
Location: Florida

PostPosted: Fri Sep 29, 2017 6:24 pm    Post subject: Reply with quote

I made some progress on the mouse executor and then i broke it Crying or Very sad
I tried adding a NOP frame after frame 4
00001000 00000 0000000 0000000 00 11111
And then reload the resend the original signal.
The pointer would not move.

I then tried adding a pause after frame 64,32 and finally frame 16. The 16th frame is ABOUT where the computer stops reacting to signals
A 92000u pause there caused a slight studder in the movement across the screen. Unfortunately The pause did break dragging. The old selection was lost and new items were selected. So that is where we are missing some information. That also shows why the Harmony learns never captured the frame. I was going to try the NOP signal at that point but I managed to clobber something and now the signals have the bumps in the wrong spot.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Fri Sep 29, 2017 8:36 pm    Post subject: Reply with quote

I got the combo protocol to work, with built-in checksum generator, so that's looking good. And once you decide how best to handle the mouse stuff, I can add some tweaks for that too.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14702
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Sat Sep 30, 2017 3:03 pm    Post subject: Reply with quote

Vicky, can you test this upgrade to verify that it actually work? Also, let me know what you've worked out regarding tweaking the mouse buttons.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6952
Location: Florida

PostPosted: Sat Sep 30, 2017 4:23 pm    Post subject: Reply with quote

The Robman wrote:
Vicky, can you test this upgrade to verify that it actually work?

Yep, it works. A and [ and arrows were tested. Very short range of movement, as before.
Quote:

Also, let me know what you've worked out regarding tweaking the mouse buttons.
Will do. Right now I've messed it up and need to start over yet again!
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18277
Location: Chicago, IL

PostPosted: Sat Sep 30, 2017 6:46 pm    Post subject: Reply with quote

I had to make a compromise with the mouse buttons. As the keyboard OBCs don't reach 128, I am using the MSB as an indicator that mouse buttons are needed. However, the mouse needs all 16 bits, so what I am doing is testing one of the other bits to decide whether the MSB needs to remain set or now. This was fine when the first 4 bits were either 1111 or 0000 but of course, you're changing that, so depending on what you end up with, my logic may need to be revised.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6952
Location: Florida

PostPosted: Sat Sep 30, 2017 7:19 pm    Post subject: Reply with quote

i'm going to leave them 1111 or 0000 everything else is too fast to be useful. It was impossible to select a check box or do stop on a menu line when I fooled with the first 4 digites...... I finally found my idiotic mistake that I spent HOURS looking for. It was SOoooo obvious!. I now have the mouse working with drag too. It seems that there is a timing issue. If I add a 30000u pause after 8 frames, I can move the mouse all the way across the screen. That pause is short enough to not break the drag. I tried dividing that 30000 by 8 and adding it to the leadout time but that didn't help. The mouse still had limited motion when I changed the timeout to 10800 to 14550.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Keyboards All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 10, 11, 12, 13  Next
Page 11 of 13

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Get Smart! the band's official homepage Rockabilly Central