DACP COMMAND
#1
Question 
Im doing a program for sending DACP command to control the iphone from my software, I've manage to get the port, ip, dacp id and active remote header of the DACP server which is my phone.

My problem now is to send commands to the server(my phone). I just want to know how do Kodi does it. I tried to parse the exact command format but im getting nowhere. I also tried to open the log and use the format but it didn't work.
Reply
#2
This should help imo

https://github.com/xbmc/xbmc/blob/master...cp.cpp#L26

Either my code or the link to the protocol...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
I saw that and the protocol, I tried to understand the code in the file.Open and file.Write(because I think it is the one that sends the command, am I right about that?) but it is hard for me because when I'm trying to extract the functions used, it just keeps getting bigger and bigger.
Reply
#4
Give me an example with your ids and i tell you what you need to send through the tcp socket
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
maybe this would make it clearer: the file open/write is just http submit. accessing of an url.
Reply
#6
(2016-10-26, 07:46)Memphiz Wrote: Give me an example with your ids and i tell you what you need to send through the tcp socket

DACP ID: E148E6C216D9CE6A
ACTIVE REMOTE: 2600433454
PORT: 50362
IP: 10.42.0.52

I also noticed that in the avahi-browse and the remote control port displayed by the shairplay application is different. are these two thing differents?
avahi-browse :50362
shairplay : remote control port : 58635


(2016-10-26, 12:12)ironic_monkey Wrote: maybe this would make it clearer: the file open/write is just http submit. accessing of an url.

Thank for that information. The log shows the URL of that command but there is added option like the active remove header according to the protocol from nto and my problem is I don't know what to write to the port Smile
Reply
#7
wireshark is your friend

http://pastebin.com/qcyiTmDd
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
thanks memphiz!

Can you please tell me if im corret.

Since I know the port and the ip, should i bind it to a tcp socket and write the data you've given to me in that socket?
Reply
#9
Just an update. I've managed to do it using libcurl! Thanks for the support everyone! Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
DACP COMMAND1