FORUMS

Swappa’s New App Helps You Value Your Device

There comes a sad time in everyone’s life where you must part ways with your … more

Xiaomi Sold 34.7 Million Phones In 6 Months

2015 has been a phenomenal year for Xiaomi so far. With a stellar rise in 2014, 2015 saw … more

Sprint Reacts To Jab From T-Mobile

America’s cellular network space has always been a battle of the big four: Verizon, AT&T, … more

Floating Apps with Rovers – XDA App Review

There are a lot of great launchers to help customize your phone. Some Launchers allow … more

chromecast SSDP discovery

9 posts
Thanks Meter: 1
 
By offyoutoddle, Junior Member on 10th June 2014, 08:21 PM
Post Reply Subscribe to Thread Email Thread
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, 09:35 PM |#2  
Senior Member
Thanks Meter: 340
 
More
try port 8008 That seems to be used for ssdp in chrome
10th June 2014, 09:52 PM |#3  
OP Junior Member
Thanks Meter: 1
 
More
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, 10:20 PM |#4  
bhiga's Avatar
Recognized Contributor
Thanks Meter: 957
 
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 10:22 PM.
10th June 2014, 11:18 PM |#5  
Member
somewhere in good ol' Germany
Thanks Meter: 607
 
More
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, 09:37 PM |#6  
Senior Member
Thanks Meter: 340
 
More
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