Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

chromecast SSDP discovery

OP offyoutoddle

10th June 2014, 09:21 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
9 posts
Join Date:Joined: Apr 2010
Hi,

I'm trying to write an app that needs to discover the Chromecasts ip address. Since everything I've read indicates it uses SSDP, I have sent a UDP packet to the broadcast group address 239.255.255.250 on port 1900 as follows:


M-SEARCH * HTTP/1.1
MX: 5
ST: "upnp:rootdevice"
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900

everything on my network except my chromecast responds on port 1900. Does anyone know if this packet is not sufficient to get a Chromecast to reply, or if I need to listen on a different port to 1900? I'm really struggling to get anwhere with this and I can't figure out why!
10th June 2014, 10:35 PM   |  #2  
Senior Member
Thanks Meter: 327
 
1,906 posts
Join Date:Joined: Dec 2007
try port 8008 That seems to be used for ssdp in chrome
10th June 2014, 10:52 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
9 posts
Join Date:Joined: Apr 2010
Quote:
Originally Posted by Asphyx

try port 8008 That seems to be used for ssdp in chrome

just tried that and no different unfortunately. I get a response from my router still, (192.168.0.1) but not from the chromecast.

I think 8008 is the http tcp port that is used for RAMP commands isn't it?
10th June 2014, 11:20 PM   |  #4  
bhiga's Avatar
Recognized Contributor
Thanks Meter: 883
 
2,248 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by offyoutoddle

M-SEARCH * HTTP/1.1
MX: 5
ST: "upnp:rootdevice"
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900

everything on my network except my chromecast responds on port 1900. Does anyone know if this packet is not sufficient to get a Chromecast to reply, or if I need to listen on a different port to 1900? I'm really struggling to get anwhere with this and I can't figure out why!

DIAL Protocol Spec says your Search Target header (ST) needs to be
urn:dial-multiscreen-org:service:dial:1
Last edited by bhiga; 10th June 2014 at 11:22 PM.
11th June 2014, 12:18 AM   |  #5  
Member
somewhere in good ol' Germany
Thanks Meter: 597
 
52 posts
Join Date:Joined: Nov 2010
Take a look at the documentation here:
https://github.com/jloutsenhizer/CR-...umentation-WIP

The current APIv2 actually uses mDNS to discover Cast devices.
The Following User Says Thank You to deeper-blue For This Useful Post: [ View ]
11th June 2014, 10:37 PM   |  #6  
Senior Member
Thanks Meter: 327
 
1,906 posts
Join Date:Joined: Dec 2007
Quote:
Originally Posted by offyoutoddle

just tried that and no different unfortunately. I get a response from my router still, (192.168.0.1) but not from the chromecast.

I think 8008 is the http tcp port that is used for RAMP commands isn't it?

That may only be the port that the CCast uses to respond....Try the other suggestions I was only guessing since that was what Chrome reported as ssdp for CCast....But like I said it may be the response port and not the port that elicits the CCast to respond with it's info!
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes