Discuss Navigation control without patchstick at the AppleTV 1 - Hackint0sh.org; Hi all,
I have spend a long time lurking on these boards but never posted. ...
Navigation control without patchstick
I have spend a long time lurking on these boards but never posted. I found some information today that others might find able to use.
DACP is the control protocol that the iPhone remote app uses to talk with the AppleTV. It has been reverse-engineered and it is document here: TunesRemote: Android DACP/iTunes Remote Control When this protocol was discovered, controls to move the on screen cursor did not exist yet. Today, I just found out from a friend that they have been found.
To send a 'menu' press you send a POST to the AppleTV on port 3689. The URL is:
http://xxx.xxx.xxx.xxx:3689/ctrl-int...-id=xxxxxxxxxx and set the body of post to be
"cmcc 0x00 0x00 0x00 0x01 0x30 cmbe 0x00 0x00 0x00 0x04 menu"
select is very similar instead you send
"cmcc 0x00 0x00 0x00 0x01 0x30 cmbe 0x00 0x00 0x00 0x06 select"
I add spaces around hex chars for easy read.
moving the cursor is not as easy, I have not had time to figure out values closely
prompt-id should increment with each command sent.
and in the body you send
"cmcc 0x00 0x00 0x00 0x01 0x30 cmbe 0x00 0x00 0x00" + lenth of following command:
for first time you send:
then after you send
when finished you send
on move and down, I do not know what time is suppose to be. I just see it being incremented. I also do not know what value x and y can be. It looks like the screen size but not sure.
Possibly this will help somebody write remotes for other devices.
These worked great.
Any chance you know how your friend came across the command set?
I've tried using Wireshark to trap packets between the iPhone remote app and the Apple TV, but it doesn't appear to be using this command set to navigate the Apple TV.
I do not know where the commands originate. All he send me was a log from Wireshark and said it should work.
How are you sending the values like "cmcc 0x00 0x00 0x00 0x01 0x30 cmbe 0x00 0x00 0x00 0x04 menu" in the post. I get a session ID from the Apple TV but I can't seem to get your commands to work.
this is what I am using,
curl -vvv -H "Viewer-Only-Client:1" -d 'cmcc 0x00 0x00 0x00 0x01 0x30 cmbe 0x00 0x00 0x00 0x04 menu' 'http://appletv.local:3689/ctrl-int/1/controlpromptentry?session-id=350705436' | python decode.txt
This is the response I get, and the command doesn't do anything:
HTTP/1.1 204 No Content
< Date: Sun, 14 Mar 2010 22:26:18 GMT
< RIPT-Server: iTunesLib/3.0 (Mac OS X)
< Content-Type: application/x-dmap-tagged
< Content-Length: 0
0 0 0 0 0 54 0 17 --:--:-- 0:00:03 --:--:-- 0* Connection #0 to host appletv.local left intact
* Closing connection #0
I think the -d parameter in Curl is messing up your command. I can verify that these commands work but the '0x' characters need to be sent as hex characters. You could possibly put them in a file and use the -F parameter but I'm not sure.
Originally Posted by mshepherd
Is there any chance you can post the wireshark file or send it via email. I have also wiresharked the AppleTV to Apple Remote and it does not appear to send the commands above for moving the on screen display. Menu, select etc works fine.
Any chance you can show some example code sent to ATV of what needs to be sent to do some simple moves like up down left right.
Originally Posted by nhesson
menu command string
This is how I send the menu command...
POST /ctrl-int/1/controlpromptentry?prompt-id=1&session-id=2005016342 HTTP/1.1$D,$A,User-Agent: Remote/1.2$D,$A,Viewer-Only-Client: 1$D,$A,Host: 192.168.1.30:3689$D,$A,Content-Length: 21$D,$A,$D,$A,cmcc$0,$0,$0,$1,0cmbe$0,$0,$0,$4,men u
Hope this helps
Hold select command
This is OK for simple NAV commands, but what about if you want to hold select to add to the "On-the-go" play list. Has anyone worked out that yet? I tried sending Touch down and then touch up, but it does nothing...
How are you using wire shark to listen to packets?
Last edited by ControlGadgetsGeoff; 04-07-2010 at 03:42 AM.
Reason: Dont want to release this
By Bugmaster in forum AppleTV 1
Last Post: 03-22-2008, 07:25 AM
By iMags in forum AppleTV 1
Last Post: 03-08-2008, 09:15 PM
By pgershon in forum AppleTV 1
Last Post: 09-19-2007, 02:27 PM