Page 2 of 5

Posted: Fri Dec 04, 2009 8:23 pm
by tildajones
vickyg2003 wrote:Tilda, Its going to take a while to get this up and running, don't expect anything before next weekend. Make sure to click on the "Notify me " checkbox, so you'll be notified when things happen in this thread.

Could you to find some technical information for me. I need to know how long the menu key needs to be held down, and how much time the multi-part signals have to fit in.
http://code.google.com/p/atv-xbmc-launc ... n306&r=306
Line 354 of the source code for the XBMCHelper definitely shows a maximum keypress timeout of 500ms. I will continue digging to see if there is a maximum overall time for the multi-part signal (at this time I assume not as long as each keypress happens within the 500ms window).

http://xbmc.org/forum/showpost.php?p=32 ... stcount=18
MaestroDD is the XBMC developer who worked on the XBMCHelper universal mode, and his post in the above thread still has me thinking that the menu hold keypress sends a separate ir code. You both know way more about remote codes than I do; can you make any sense of that thread?

Again this will amazing if we can get it worked out.

Oh here is bit of nice news that makes this ATV HTPC project even nicer:
http://xbmc.org/forum/showthread.php?t=55042
The Broadcom Crystal HD decoder works in the mini PCIe slot in the ATV allowing the ATV to handle 1080p signals. If this is indeed true, a simple mod to swap the wifi card for the crystal hd card, makes this the cheapest HTPC on the market with 1080p support and a killer front end (XBMC). Too bad there is no DVR code in XBMC (maybe a future release). $149 for a refurb ATV from Apple + $20 Crystal HD + free XBMC patchstick code == ultimate HTPC < $200!

I'm really excited!

Posted: Sat Dec 05, 2009 10:04 am
by vickyg2003
Tilda, here is the first attempt at putting something together.

apple tv xmbc attempt

Posted: Mon Dec 07, 2009 11:57 am
by vickyg2003
I updated the link above after finding a better way to set the protocol flags to get the signal I wanted, and got rid of a second repeat frame that I didn't see, because it looked like a part of the next signal.
Apple xbmc second attempt

I also created another version that incorporates a 500ms pause after a keypress so that the Long Menu Keypress and the 2 part keypresses don't get confused with the 3 part keypresses, and will make this macro friendly. It also introduces a small pause between each key press, which might not be necessary. Its 20 bytes larger than the protocol above.

Apple xbmc with pause

First frame = data frame
Ditto = a repeat frame (Lead-In On, half Lead-in Off, 1 on)

Long press = First Frame + 5 dittos Total Duration 530ms
Short press = First Frame + 1 ditto

2 part signal
Long Menu + Short press

3 part signal
Long Menu + Short press + Short press


I put these together believing the listening time is 500ms. I think the long press of the Menu key, causes the device to listen for 500ms for another signal. If none found, it is a long Menu, otherwise it is a mult-part signal.

Posted: Mon Dec 07, 2009 4:19 pm
by vickyg2003
Oops, my EFC's were 8 to high for all the three part signals. Fixed that too.

Posted: Wed Dec 09, 2009 8:38 pm
by tildajones
I greatly appreciate your hard work, and I look forward to trying your updates. I will report back to this thread. It will be a few days before I can get to it, however; this is an extremely busy time of the year at work.

Posted: Fri Dec 18, 2009 3:43 pm
by tildajones
Alright. I finally have some time off (unless work calls me in while on my vacation.... again). I apologize for the delay.

I will report back on my progress soon.

Posted: Mon Dec 21, 2009 9:25 am
by tildajones
I completed the first draft of the keymap.xml for the apple remote in universal mode. Is there a section here to post something like that? Ideally, I would like to house the protocol, upgrade file, and keymap all in the same place.

I should have some time later today or tomorrow to finally test out vicky's new protocol and device upgrade (huge thanks here!!!).

Posted: Mon Dec 21, 2009 10:19 am
by vickyg2003
tildajones wrote:I completed the first draft of the keymap.xml for the apple remote in universal mode. Is there a section here to post something like that? Ideally, I would like to house the protocol, upgrade file, and keymap all in the same place.

I should have some time later today or tomorrow to finally test out vicky's new protocol and device upgrade (huge thanks here!!!).
When you get it tested, zip it up with the upgrade and post it inthe MISC upgrades folder, where the other AppleTV upgrades are. I would think the protocol and upgrade are useless without the xml.

Once you report on whether this works or not, I'll work on a JP1.2 version of the executor.

Posted: Mon Dec 21, 2009 8:18 pm
by tildajones
I was able to begin testing your upgrade tonight.

The universal mode button sequences that begin with the MENU button held do appear to be firing all the ir commands in the sequence specified. This is huge! There are, however, two problems I have come across.

First, the universal mode button sequences are not firing with the correct timing; so, the AppleTV is interpreting them as a series of individual keystrokes rather than a single command. I hope I explained that correctly.

Second, some of the button to function mappings differ from the mappings at http://code.google.com/p/atv-xbmc-launc ... versalMode. For example, left is button id 3 rather than button id 4. This is most likely something I can fix tonight.

I will look for more information on the exact delays needed for the button sequences and get back to you.

Thanks again for your help.

Posted: Tue Dec 22, 2009 5:47 am
by vickyg2003
tildajones wrote:I was able to begin testing your upgrade tonight.

The universal mode button sequences that begin with the MENU button held do appear to be firing all the ir commands in the sequence specified. This is huge! There are, however, two problems I have come across.

First, the universal mode button sequences are not firing with the correct timing; so, the AppleTV is interpreting them as a series of individual keystrokes rather than a single command. I hope I explained that correctly.
So do you think the long menu press isn't long enough?
Do you have some sort of error log that would indicate whether we are getting into the long key press or not?

Also there were some single long presses? Are these firing as long presses? This should be just a matter of tweaking the repeats.

Posted: Tue Dec 22, 2009 8:37 pm
by vickyg2003
Tilda, I'm not sure which of the upgrades you were doing. I want you to be able to proceed without having to wait for me. Below is the upgrade that has the pause in it. Since we suspect the MENU key is not being held long enough, find the Bold "05" below and increase it, until you start getting the long menu. From the first post in this thread I thought the hold had to be 400ms and currently we are sending one frame followed by 400ms of dittos. But it seems that doesn't qualify as a long press. Try changing this to 0A and see what it does.

Upgrade protocol 0 = 01 FF (S3C8+) Apple tv xmbc protocol wpause (PB v4.01)
43 8D 31 8B 14 C7 5C 08 08 01 21 01 06 01 21 03
31 D4 FD 11 A7 08 B7 FF 10 E6 0D 05 E4 06 07 E4
05 06 E6 05 3F 18 07 37 1C 14 F6 FF 60 18 07 37
1E 14 90 C1 F0 C1 F6 FF 53 18 07 8D FF 46 18 07
37 1F 03 E6 0D 01 F6 FF 53 F6 FF 74 AF 3F 5F 6F
9F AF CF 56 C1 07 38 C1 2C 00 A7 12 4D FF 19 05
F6 01 73 F6 01 46 E6 29 5C E6 0D 01 57 7C 2C 02
F6 FF 76 AF 2C 07 C6 C0 00 01 0A FE 1A FC 2A FA
AF
End


This current instruction reads
LD $0D,#05h

You should see that in the dissasembly in IR. We want to change the current value to be something longer, I'd start with 0A which doubles the number of repeats.

Posted: Mon Dec 28, 2009 2:07 pm
by tildajones
Changing the hold to 09 (800ms, I believe) is the lowest value that activates a long press. I tested this using the MENU HOLD mapping. With this 09 value, the MENU HOLD performs the exact same action as holding the menu key on the Apple remote.

The multiple key sequences are still not functioning properly. I am going to play around with it a little bit more to make sure it is not my keymapping that is causing the problem.

Oh, I did notice one other issue. On the Apple remote, there does not appear to be an UP HOLD and DOWN HOLD. When you hold up on the Apple remote, it sends the up press repeatedly. Is it possible to have the up and down function this way?

Posted: Mon Dec 28, 2009 6:52 pm
by vickyg2003
tildajones wrote:Changing the hold to 09 (800ms, I believe) is the lowest value that activates a long press. I tested this using the MENU HOLD mapping. With this 09 value, the MENU HOLD performs the exact same action as holding the menu key on the Apple remote.
800ms, hmm I wonder what that 400ms was in the first post in this thread.
If the wrong one is firing, this could be me.
The multiple key sequences are still not functioning properly. I am going to play around with it a little bit more to make sure it is not my keymapping that is causing the problem.
Are any of the three digit sequences firing anything?
Oh, I did notice one other issue. On the Apple remote, there does not appear to be an UP HOLD and DOWN HOLD. When you hold up on the Apple remote, it sends the up press repeatedly. Is it possible to have the up and down function this way?
It would be easiest if I switch all single press keys to repeat while held. Since the repeat time is so long we might as well do it that way.

Posted: Mon Dec 28, 2009 8:17 pm
by vickyg2003
Upgrade protocol 0 = 01 FF (S3C8+) Apple tv xmbc protocol wpause (PB v4.01)
43 8D 31 8B 14 C7 5C 08 08 01 21 01 06 01 21 03
31 D4 FD 11 A7 08 B7 FF 10 E6 0D 0A E4 06 07 E4
05 06 E6 05 3F 18 07 37 1C 14 F6 FF 63 18 07 37
1E 17 90 C1 F0 C1 F6 FF 56 18 07 8D FF 49 18 07
37 1F 06 E6 0D 01 E6 29 5D F6 FF 56 F6 FF 77 AF
3F 5F 6F 9F AF CF 56 C1 07 38 C1 2C 00 A7 12 50
FF 19 05 F6 01 73 F6 01 46 E6 29 5C E6 0D 01 57
7C 2C 02 F6 FF 79 AF 2C 07 C6 C0 00 01 0A FE 1A
FC 2A FA AF
End

This protocol will hold the single press keys and the long repeat is set to 0A, 1 more than the minium needed to cause long key press.

BTW Are you using RM or KM for your device upgrade? And do you know how to change the protocol in your upgrade file?

In KM you just need to paste it into the notes area. In RM you are supposed to be able to suck it in off the clipboard, but RM is real finicky when it comes to how it appears on the clipboard.

Posted: Wed Dec 30, 2009 7:56 am
by tildajones
I use RM.

To change the protocol in RM:
Advanced->Manual Settings->Import Protocol Upgrade

That will copy the protocol off the clipboard and into the upgrade file. Thanks for adding the repeat to the single keypress. It works like a champ.

I have not successfully fired any of the three digit sequences. I know there are some errors with my keymap file (apparently, button ids have changed in the latest release candidate). This is probably why the three digit sequences are not working. I will work on this from my end in the next few days.

It's coming along nicely!