Sony API discovery process and the Sony STR-DN1080

458 Views Asked by At

re: https://developer.sony.com/develop/audio-control-api/hardware-overview/discovery-process

Hello. I have an APAC region Sony STR-DN1080 AVR. I am able to control said AVR via the API just fine. I just cannot discover supported Sony devices using SSDP.

It seems that the AVR is periodically advertising itself to the network via UDP, but it is not responding to any multicast requests using the format described in the docs.

The Web API service does not even reply when I replace the "ST: ...." line with ST: upnp:rootdevice or ST: ssdp:all. Other devices on my network do reply, but not the Web API service. The built-in UPnP/DLNA service does respond however.

Here is my packet:

String msg = "M-SEARCH * HTTP/1.1\r\n" +
    "HOST: 239.255.255.250:1900\r\n" +
    "MAN: \"ssdp:discover\"\r\n" +
    "MX: 1\r\n" +
    "ST: urn:schemas-sony-com:service:ScalarWebAPI:1\r\n" +
    "USER-AGENT: me\r\n" +
    "\r\n" ;

Is there something I am missing? Thanks in advance.

1

There are 1 best solutions below

0
On

Solution. I couldn't get the required response from the Sony STR-DN1080 with the specified M-SEARCH broadcast no matter how I tried. So instead, this is what I did:

  1. use the tag ST: ssdp:all\r\n in the M-SEARCH broadcast.
String msg = "M-SEARCH * HTTP/1.1\r\n" +
    "HOST: 239.255.255.250:1900\r\n" +
    "MAN: \"ssdp:discover\"\r\n" +
    "MX: 1\r\n" +
    "ST: ssdp:all\r\n" +
    "\r\n" ;
  1. build a Set of the IP addresses of all replying devices.
  2. search each device in Set for the existence of this file: {ip address}:8008/ssdp/device-desc.xml.
  3. scan through each line of that XML file for string "STR-DN1080".

It's not where I wanted to end up, but it works.