• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7
AppleTV Event Client for Linux in development...
#16
According to this page the remote uses a NEC protocol. So in theory it should be possible to use other NEC remotes. I'll have to try programming my Harmony with some NEC codes and see if I can get that working.
Reply
#17
Evinyatar Wrote:According to this page the remote uses a NEC protocol. So in theory it should be possible to use other NEC remotes. I'll have to try programming my Harmony with some NEC codes and see if I can get that working.

Hmmm.... very interesting! If this works, will it somehow be possible to map more than 6 buttons (i.e. more buttons than on the standard ATV remote)?
Reply
#18
Yes. Though it actually already is possible using just the Apple remote. The remote sends an 8-bit remote ID with every button press. That ID identifies the remote, and can be changed by holding down menu and play/pause for 6 seconds. Taking that into account we can already record 6 * 256 different codes. Adjusting atvclient to interpret these as different events is just a minor adjustment. That way we can map 1536 buttons, which I reckon is plenty for anyone Smile

Update I just found out the receiver should in fact work with other remotes. But I haven't figure out how to tap into that functionality just yet. I'll try to get the OS X USB Debugging Kit running under AppleTV OS to see what's going on there.
Reply
#19
Tried to setup my programmable remote to act like diffent NEC devices, but without any success :-(

The idea of making atvclient recognize a single Apple remote as 6 different remotes sounds very interesting, but unfortunately (for me) is my programmable remote not able to learn the Apple remote, which makes it of very little interest to me -- it may be very useful for others though.

So once again back to the LIRC-thingie for me, I guess...
Reply
#20
Evinyatar Wrote:Update I just found out the receiver should in fact work with other remotes. But I haven't figure out how to tap into that functionality just yet. I'll try to get the OS X USB Debugging Kit running under AppleTV OS to see what's going on there.

Yes it does for >= 2.4 AppleTV versions. Apple does a trick where when the AppleTV boot, it's in IR compatibility mode to the older AppleTV versions, you can see this as the older AppleTVs refs a different kext driver name than the versions that can handle other remotes. Name change aside, there is some command sent to the IR controller that puts it into "new mode", then the HID events will contain new events that describe it. So under Linux, you are in "old mode" and if we can figure out how to change to "new mode" than we could use the AppleTV IR receiver with non-Apple IR remotes. Be aware that not all non-Apple IR remotes are recognized for example the IR remote for the MS MCE USB IR receiver is NOT recognized... go figure.
Reply
#21
I'll have to try to install Tiger and the developer tools on it then, and see if I can load the IR kext. Sounds like another weekend project Smile
Reply
#22
Evinyatar Wrote:I'll have to try to install Tiger and the developer tools on it then, and see if I can load the IR kext. Sounds like another weekend project Smile

The first is from the contents of a plist (forget which and where Smile , second is output from xbmchelper on the atv under AppleTV OS when seeing this non Apple remote.

Quote:{
"[0]" = {
CodePatterns = {
Down = {
CommandPattern = {"[0]" = -250837879; "[_0]" = 17179891034; };
Interval = 126013819.5;
RepeatPattern = {"[0]" = -250837879; "[_0]" = 17179891034; };
};
FastForward = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
FastRewind = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
Left = {
CommandPattern = {"[0]" = -250854267; "[_0]" = 17179891034; };
Interval = 125360422.5;
RepeatPattern = {"[0]" = -250854267; "[_0]" = 17179891034; };
};
Menu = {
CommandPattern = {"[0]" = -250864504; "[_0]" = 17179891034; };
Interval = 126005253;
RepeatPattern = {"[0]" = -250864504; "[_0]" = 17179891034; };
};
NextChapter = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; ;
Pause = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
Play = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
PlaySelect = {
CommandPattern = {"[0]" = -250857330; "[_0]" = 17179891034; };
Interval = 127637820;
RepeatPattern = {"[0]" = -250857330; "[_0]" = 17179891034; };
};
PreviousChapter = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
Right = {
CommandPattern = {"[0]" = -250821491; "[_0]" = 17179891034; };
Interval = 127723224;
RepeatPattern = {"[0]" = -250821491; "[_0]" = 17179891034; };
};
SkipAhead = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
SkipBack = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
Stop = {CommandPattern = {}; Interval = 0; RepeatPattern = {}; };
Up = {
CommandPattern = {"[0]" = -250870655; "[_0]" = 17179891034; };
Interval = 123026458.5;
RepeatPattern = {"[0]" = -250870655; "[_0]" = 17179891034; };
};
};
Custom = 1;
Name = sharp;
Version = 1;
};
}

2008-12-26 09:39:37.924 xbmchelper[204] Unknown button for cookiestring 280_
000000C501B6E519 0000555A F10C4485, 00000004
2008-12-26 09:39:38.007 xbmchelper[204] Unknown button for cookiestring 280_
000000C506A96D7D 0000555A F10C4485, 00000004
2008-12-26 09:39:38.090 xbmchelper[204] Unknown button for cookiestring 280_
000000C50B8C84F9 0000555A F10C4485, 00000004
2008-12-26 09:39:38.172 xbmchelper[204] Unknown button for cookiestring 280_
000000C5A3B8979D 0000555A F10CC48D, 00000004
2008-12-26 09:39:40.725 xbmchelper[204] Unknown button for cookiestring 280_
000000C5A8C91B18 0000555A F10CC48D, 00000004
2008-12-26 09:39:40.810 xbmchelper[204] Unknown button for cookiestring 280_
000000C5ADDA1CCC 0000555A F10CC48D, 00000004
2008-12-26 09:39:40.895 xbmchelper[204] Unknown button for cookiestring 280_
000000C61685213F 0000555A F10C8489, 00000004
2008-12-26 09:39:42.651 xbmchelper[204] Unknown button for cookiestring 280_
000000C61B772049 0000555A F10C8489, 00000004
2008-12-26 09:39:42.734 xbmchelper[204] Unknown button for cookiestring 280_
000000C620699704 0000555A F10C8489, 00000004
2008-12-26 09:39:42.817 xbmchelper[204] Unknown button for cookiestring 280_
000000C682E19CDC 0000555A F10C0481, 00000004
2008-12-26 09:39:44.469 xbmchelper[204] Unknown button for cookiestring 280_
000000C687B50808 0000555A F10C0481, 00000004
2008-12-26 09:39:44.550 xbmchelper[204] Unknown button for cookiestring 280_
000000C68C88F74A 0000555A F10C0481, 00000004
2008-12-26 09:39:44.633 xbmchelper[204] Unknown button for cookiestring 280_
000000C6915CF795 0000555A F10C0481, 00000004
2008-12-26 09:39:44.716 xbmchelper[204] Unknown button for cookiestring 280_
000000C707715C56 0000555A F10C4485, 00000004
2008-12-26 09:39:46.693 xbmchelper[204] Unknown button for cookiestring 280_
000000C70C631BB5 0000555A F10C4485, 00000004
2008-12-26 09:39:46.776 xbmchelper[204] Unknown button for cookiestring 280_
000000C71155961C 0000555A F10C4485, 00000004
2008-12-26 09:39:46.859 xbmchelper[204] Unknown button for cookiestring 280_
000000C716481387 0000555A F10C4485, 00000004
2008-12-26 09:39:46.942 xbmchelper[204] Unknown button for cookiestring 280_
000000C73EB1FFBC 0000555A F10C388E, 00000004
2008-12-26 09:39:47.620 xbmchelper[204] Unknown button for cookiestring 280_
000000C743B34422 0000555A F10C388E, 00000004
2008-12-26 09:39:47.704 xbmchelper[204] Unknown button for cookiestring 280_
000000C748C60A39 0000555A F10C388E, 00000004
2008-12-26 09:39:47.789 xbmchelper[204] Unknown button for cookiestring 280_
000000C74DD53C28 0000555A F10C388E, 00000004
2008-12-26 09:39:47.874 xbmchelper[204] Unknown button for cookiestring 280_
000000C7F6C15175 0000555A F10C1C88, 00000004
2008-12-26 09:39:50.708 xbmchelper[204] Unknown button for cookiestring 280_
000000C7FBA3E386 0000555A F10C1C88, 00000004
2008-12-26 09:39:50.790 xbmchelper[204] Unknown button for cookiestring 280_
000000C8009662D9 0000555A F10C1C88, 00000004
2008-12-26 09:39:50.873 xbmchelper[204] Unknown button for cookiestring 280_
000000C80588DC8A 0000555A F10C1C88, 00000004
2008-12-26 09:39:50.956 xbmchelper[204] Unknown button for cookiestring 280_
000000C80A7B6B30 0000555A F10C1C88, 00000004
2008-12-26 09:39:51.039 xbmchelper[204] Unknown button for cookiestring 280_
000000C82B25A208 0000555A F10C1C88, 00000004
2008-12-26 09:39:51.587 xbmchelper[204] Unknown button for cookiestring 280_
000000C8301797E2 0000555A F10C1C88, 00000004
2008-12-26 09:39:51.670 xbmchelper[204] Unknown button for cookiestring 280_
000000C834FADA77 0000555A F10C1C88, 00000004
2008-12-26 09:39:51.752 xbmchelper[204] Unknown button for cookiestring 280_
000000C8EDD06953 0000555A F10C6487, 00000004
2008-12-26 09:39:54.853 xbmchelper[204] Unknown button for cookiestring 280_
000000C8F2E1535B 0000555A F10C6487, 00000004
2008-12-26 09:39:54.938 xbmchelper[204] Unknown button for cookiestring 280_
000000C8F7E307CC 0000555A F10C6487, 00000004
2008-12-26 09:39:55.022 xbmchelper[204] Unknown button for cookiestring 280_
000000C91AA36F9A 0000555A F10CE48F, 00000004
2008-12-26 09:39:55.605 xbmchelper[204] Unknown button for cookiestring 280_
000000C91FC32E93 0000555A F10CE48F, 00000004
2008-12-26 09:39:55.691 xbmchelper[204] Unknown button for cookiestring 280_
000000C924E37618 0000555A F10CE48F, 00000004
2008-12-26 09:39:55.777 xbmchelper[204] Unknown button for cookiestring 280_
000000C956A94336 0000555A F10C0C89, 00000004
2008-12-26 09:39:56.615 xbmchelper[204] Unknown button for cookiestring 280_
000000C95BAA5B7A 0000555A F10C0C89, 00000004
2008-12-26 09:39:56.698 xbmchelper[204] Unknown button for cookiestring 280_
000000C9608D7E1A 0000555A F10C0C89, 00000004
2008-12-26 09:39:56.781 xbmchelper[204] Unknown button for cookiestring 280_
000000C97AF580B4 0000555A F10CF48E, 00000004
2008-12-26 09:39:57.221 xbmchelper[204] Unknown button for cookiestring 280_
000000C980155A3C 0000555A F10CF48E, 00000004
2008-12-26 09:39:57.307 xbmchelper[204] Unknown button for cookiestring 280_
000000C98535B67D 0000555A F10CF48E, 00000004
2008-12-26 09:39:57.393 xbmchelper[204] Unknown button for cookiestring 280_
Reply
#23
andrereis Wrote:I'll make a feature request too: if you could let the user choose the active/receiving LED colors it'd be really great. Personally, I'd like at least to be able to choose the low-intensity white, and if it could turn red when the remote was talking, well that would be really awsome. But the low-intensity version would be good for my (very) dark room Smile
I've added a couple of options in the latest version at github that allow you to change the colors and brightness. Run atvclient -h for more info. I've also changed the init script ("atvclient" in the root of source distribution) so that it accepts options from a config file in /etc/default/atvclient. Simply create that file and add something like:
Code:
OPTIONS="-B"

@davilla; that .plist confirms my suspicion that it's the OS doing all the IR decoding, which makes me believe we can still get it to work with the MCE remote. But I don't think it's going to be easy... Since the MCE remote doesn't use any fancy IR frequency I believe the hardware should support it just fine, but the software just doesn't recognize the buttons. But this is all just speculation until I can find that magic command.
Reply
#24
Evinyatar Wrote:@davilla; that .plist confirms my suspicion that it's the OS doing all the IR decoding, which makes me believe we can still get it to work with the MCE remote. But I don't think it's going to be easy... Since the MCE remote doesn't use any fancy IR frequency I believe the hardware should support it just fine, but the software just doesn't recognize the buttons. But this is all just speculation until I can find that magic command.

Not really the OS (as in kext) but it's in the internal USB IR controller itself, All the plist does is tell frontrow on the atv how to map the commands to frontrow buttons. You get the events from xbmbhelper regardless if you have mapped the non-apple remote or not. So the IR controller in "new mode" knows how to handle IR decode and translation into an HID event for a certain set of IR remotes. Figure out how to flick it into "new mode" and out will come those non-apple IR HID events.
Reply
#25
Try 42... that seems to solve everything.
Reply
#26
Evinyatar Wrote:Could you turn on debug logging, restart XBMC and pastebin the log for me? If atvclient is spitting out the commands to the console it means XBMC is not listening on the correct UDP port.

Alright look, how am I supposed to know that "Allow programs on this system to control XBMC" is what allows XBMC to be controlled by ATVClient?

BlushBlushBlush
Reply
#27
Thank you for your work on this, its working for me but I have to manually run it.

I know I read somewhere how to get this to run at boot, but I can't seem to find it now, does anyone have the link handy?
Reply
#28
Philmatic Wrote:Alright look, how am I supposed to know that "Allow programs on this system to control XBMC" is what allows XBMC to be controlled by ATVClient?
I honestly thought this was enabled by default. I should probably write up a manual Smile

TeknoJnky Wrote:Thank you for your work on this, its working for me but I have to manually run it.
There's an init script called simply "atvclient" in the root of the distribution. Just copy that to /etc/init.d/ and run
Code:
rc-update.d atvclient default
Any command line arguments you want to pass to atvclient at bootup can be added in /etc/default.d/atvclient:
Code:
OPTIONS="-B"
Reply
#29
ah, yeah!

Code:
sudo update-rc.d atvclient defaults

tho Smile

edit: hmm, still doesn't seem to work after adding to init.d

is the option required? I'm not using any option when starting manually, just sudo atvclient

but now it also seems to keep running after control c'ing out of the manual run
Reply
#30
The option is, well, optional Smile If it's still running that probably means the init thing did work. What does '/etc/init.d/atvclient stop' say?
I just quickly wrote up a basic how to at http://wiki.github.com/Evinyatar/atvclie...ubuntu-804
Let me know if I missed anything.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
AppleTV Event Client for Linux in development...0