chromecastssdp

Chromecast android app is not discovering custom receiver


I wrote a java chromecast receiver app which accepts M-SEARCH broadcast messages and responds with HTTP/1.1 200 message. Android app also invokes device-desc.xml files once the response is sent. But android app doesn't show the receiver name. But Fling application (https://github.com/entertailion/Fling) is able to discover the receiver without any issue.

Any help would be greatly appreciated.

Request from Chromecast android app

M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Response from JAVA receiver app

HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
EXT:
LOCATION: http://10.0.0.4:8008/ssdp/device-desc.xml
ST: urn:dial-multiscreen-org:service:dial:1
USN: uuid:{UUID}
BOOTID.UPNP.ORG: 7339
CONFIGID.UPNP.ORG: 7339

device-desc.xml hosted on 8008

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:r="urn:restful-tv-org:schemas:upnp-dd">
    <specVersion>
    <major>1</major>
    <minor>0</minor>
    </specVersion>
    <URLBase>http://10.0.0.4:8008</URLBase>
    <device>
          <deviceType>urn:schemas-upnp-org:device:dail:1</deviceType>
          <friendlyName>Lava2</friendlyName>
          <manufacturer>Google Inc.</manufacturer>
          <modelName>Eureka Dongle</modelName>
        <UDN>uuid:{UUID}</UDN>
        <serviceList>
            <service>
                <serviceType>urn:schemas-upnp-org:service:dail:1</serviceType>
                <serviceId>urn:upnp-org:serviceId:dail</serviceId>
                <controlURL>/ssdp/notfound</controlURL>
                <eventSubURL>/ssdp/notfound</eventSubURL>
                <SCPDURL>/ssdp/notfound</SCPDURL>
            </service>
        </serviceList>
    </device>
</root>    

Solution

  • If you are using the official Android SDK, you need to know that the discovery method is now based on mDNS and not UPnP any more.