AppleTV Event Client for Linux in development...

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #1
Alrighty then... just finished packaging my AppleTV event client for Linux. Sources are here. Download, untar, ./configure && make && sudo make install. Some source code borrowed from ATVTool 0.2 so lots of credit there.
What currently works; reading IR commands and sending them to XBMC, and emulating the standard LED behaviour (white unless an IR command is being received).
What doesn't work yet; pairing the remote. It currently sends the notifications to XBMC when you pair, but it doesn't actually pair yet. Also, "universal mode". I haven't really figured out how that's supposed to work.
Please let me know if you notice any differences in behaviour with XBMCHelper on AppleTV OS, or any problems whatsoever.
(This post was last modified: 2009-12-07 11:29 by Evinyatar.)
find quote
andrereis Offline
Junior Member
Posts: 30
Joined: Sep 2009
Reputation: 0
Post: #2
Evinyatar, the file name is "atvclient-0.1.1.tar.gz" but the archive is not gzipped, I spent a couple of minutes figuring out why "tar xzvf" wouldn't decompress it Eek
Better change the extension to just .tar, or gzip it. Will try it now, looks promising!
find quote
andrereis Offline
Junior Member
Posts: 30
Joined: Sep 2009
Reputation: 0
Post: #3
Well, some first experiences. Compiles and runs well here, the light is white and shuts off when a button is pressed. But XBMC doesn't move, regrettably. I'm running atvclient as root and xbmc as an unprivileged user (lirc is off). What should we look for in the logs for hints to why this is happening?

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
find quote
Philmatic Offline
Fan
Posts: 457
Joined: Nov 2009
Reputation: 1
Location: Santa Barbara, CA
Post: #4
Running 1.1 here, compiled fine, seems to start up fine, and button presses are being received by the ATV, but nothing registers with XBMC.

Startup:
Code:
xbmc@xbmc:~$ sudo atvclient
Creating socket...
Preparing button map...
Ready!

Key-presses:

Up:
Code:
25 87 ee 24 0b
Up
1 8db20c0
Down:
Code:
25 87 ee 24 0d
Down
2 8db2118
Left:
Code:
25 87 ee 24 08
Left
3 8db2188
Right:
Code:
25 87 ee 24 07
Right
4 8db21f8
Play/Pause:
Code:
25 87 ee 24 04
Play/pause
5 8db2268
Menu:
Code:
25 87 ee 24 02
Menu
6 8db22d8
Holding Play/Pause
Code:
26 87 ee 24 04
Play/pause hold
7 90ef348
Holding Menu:
Code:
26 87 ee 24 02
Menu hold
8 90ef3b8
find quote
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #5
Hmm... for some reason you have to start atvclient after xbmc (and if it was already running, restart xbmc after stopping atvclient). Otherwise xbmc won't pick up the events. I'll have to look into that later.
find quote
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #6
Fixed it. Silly mistake. I set up a GitHub repo at http://github.com/Evinyatar/atvclient which now contains the latest version.
find quote
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #7
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

That sounds like a useful addition. After the code cleanup and remote pairing that'll be the first thing I implement Smile
find quote
pouldam Offline
Member
Posts: 61
Joined: May 2009
Reputation: 0
Post: #8
Just downloaded and compiled it. However, when launching it, it just hangs and does not respond to key presses on the remote.

atv@atv:~$ sudo /usr/local/sbin/atvclient
Creating socket...
Preparing button map...
Paired to: 0
Ready!

Any idea? -- guess it has something to do with the pairing, but I have no idea how to do that.
find quote
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #9
Paired to 0 means it's not paired so that shouldn't be an issue. Does the led turn white when you start atvclient? Did you run it as root? Have you tried rebooting? If it still fails, pastebin me the output of dmesg and lsusb -v
find quote
pouldam Offline
Member
Posts: 61
Joined: May 2009
Reputation: 0
Post: #10
Evinyatar Wrote:Paired to 0 means it's not paired so that shouldn't be an issue. Does the led turn white when you start atvclient? Did you run it as root? Have you tried rebooting? If it still fails, pastebin me the output of dmesg and lsusb -v

OK, got it working now -- made a stupid error :o

Can this util be used somehow if you want to use another remote with more buttons (e.g. from an old DVD player) or is atvtool combined with LIRC the way to go then?
find quote
Philmatic Offline
Fan
Posts: 457
Joined: Nov 2009
Reputation: 1
Location: Santa Barbara, CA
Post: #11
I STILL can't get this working... I'm running Ubuntu 8.04 with Xfce and XBMC runs in its own session.

I run atvclient and I get what appears to be a working client, the led turns white, and the console is spitting out my IR commands but XBMC doesn't see it.

I'm running XBMC 9.11 Beta1, not Davilla's crystal branch. I have a keyboard and mouse hooked up.
find quote
Philmatic Offline
Fan
Posts: 457
Joined: Nov 2009
Reputation: 1
Location: Santa Barbara, CA
Post: #12
I should add that when I press a button on the remote, the led on the ATV turns off as if it's receiving it. I've installed the latest version of atvclient, still nada.

I thought it may have something to do with my sessions so I ran Xfce in regular desktop mode, opened up a console on the desktop, ran atvclient as root, then ran XBMC. Still nothing...
find quote
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #13
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.
find quote
Evinyatar Offline
Member
Posts: 58
Joined: Feb 2008
Reputation: 0
Location: Belgium
Post: #14
pouldam Wrote:Can this util be used somehow if you want to use another remote with more buttons (e.g. from an old DVD player) or is atvtool combined with LIRC the way to go then?
If you can see the IR commands in the console when running atvclient (in other words, if the remote is recognized by the IR receiver), then it can be made to work. I haven't found such a remote yet other than the standard Apple remote. If you have, I'd love to hear about it Smile
find quote
pouldam Offline
Member
Posts: 61
Joined: May 2009
Reputation: 0
Post: #15
Evinyatar Wrote:If you can see the IR commands in the console when running atvclient (in other words, if the remote is recognized by the IR receiver), then it can be made to work. I haven't found such a remote yet other than the standard Apple remote. If you have, I'd love to hear about it Smile

Thanks for clarifying -- although you confirmed what I feared. Guess I have to look into that LIRC-thingie... (said in somewhat trembling voice)...
find quote
Post Reply