title: UPNP Curl SetVolume fails with <faultcode>s:Client</faultcode> errorCode -111
body: <p>I am currently trying to play a sound file over wifi to a iDeaUSA w205 box.
  So far everything works except for the volume setting and I just don´t get the point. </p>
  
  <p>initiating: working</p>
  
  <pre><code>curl -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"' -d '
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;s:Body&gt;
          &lt;u:SetAVTransportURI
              xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"&gt;
              &lt;InstanceID&gt;0&lt;/InstanceID&gt;
              &lt;CurrentURI&gt;
                  &lt;![CDATA[http://192.168.178.46/naturesounds.ogg]]&gt;
              &lt;/CurrentURI&gt;
              &lt;CurrentURIMetaData&gt;&lt;/CurrentURIMetaData&gt;
          &lt;/u:SetAVTransportURI&gt;
      &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  ' 'http://192.168.178.61:49152/upnp/control/rendertransport1'
  </code></pre>
  
  <p>playing: working</p>
  
  <pre><code>curl -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Play"' -d '
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;s:Body&gt;
          &lt;u:Play
              xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"&gt;
              &lt;InstanceID&gt;0&lt;/InstanceID&gt;
              &lt;Speed&gt;1&lt;/Speed&gt;
          &lt;/u:Play&gt;
      &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;  
  ' 'http://192.168.178.61:49152/upnp/control/rendertransport1'
  </code></pre>
  
  <p>SetVolume: not working</p>
  
  <pre><code>curl -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: "urn:schemas-upnp-org:service:RenderingControl:1#SetVolume"' -d '
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;s:Body&gt;
        &lt;u:SetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"&gt;
           &lt;InstanceID&gt;0&lt;/InstanceID&gt;
           &lt;Channel&gt;Master&lt;/Channel&gt;
           &lt;DesiredVolume&gt;12&lt;/DesiredVolume&gt;
        &lt;/u:SetVolume&gt;
     &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  ' 'http://192.168.178.61:49152/upnp/control/rendertransport1'
  </code></pre>
  
  <p>I just don´t get the point, the curious thing is it is working with the <strong>Device Spy</strong> from <strong>Developer Tools for UPNP</strong></p>
  
  <p>This is the error I get in return, whatever errorcode -111 is, I have no idea.</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
  &lt;s:Body&gt;
  &lt;s:Fault&gt;
  &lt;faultcode&gt;s:Client&lt;/faultcode&gt;
  &lt;faultstring&gt;UPnPError&lt;/faultstring&gt;
  &lt;detail&gt;
  &lt;UPnPError xmlns="urn:schemas-upnp-org:control-1-0"&gt;
  &lt;errorCode&gt;-111&lt;/errorCode&gt;
  &lt;errorDescription&gt;Invalid Action&lt;/errorDescription&gt;
  &lt;/UPnPError&gt;
  &lt;/detail&gt;
  &lt;/s:Fault&gt;
  &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>And here the sniffed stuff from the Spytool including the return, which works there:</p>
  
  <pre><code>POST /upnp/control/rendercontrol1 HTTP/1.1
  HOST: 192.168.178.61:49152
  SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetVolume"
  CONTENT-TYPE: text/xml; charset="utf-8"
  Content-Length: 424
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;s:Body&gt;
        &lt;u:SetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"&gt;
           &lt;InstanceID&gt;0&lt;/InstanceID&gt;
           &lt;Channel&gt;Master&lt;/Channel&gt;
           &lt;DesiredVolume&gt;12&lt;/DesiredVolume&gt;
        &lt;/u:SetVolume&gt;
     &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;HTTP/1.1 200 OK
  CONTENT-LENGTH: 259
  CONTENT-TYPE: text/xml; charset="utf-8"
  DATE: Sun, 30 Oct 2016 15:54:42 GMT
  EXT:
  SERVER: Linux/2.6.21, UPnP/1.0, Portable SDK for UPnP devices/1.6.17
  
  &lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;s:Body&gt;
  &lt;u:SetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"&gt;&lt;/u:SetVolumeResponse&gt;
  &lt;/s:Body&gt; &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>Am I blind? Where is the difference, I just don´t see it. I think 111 is some connection refused in curl however that doesn´t explain why it is working from the tool and not from my raspberry pi (where I actually run the curl script) nor might a firewall issue be the problem because the first two curls do work.</p>
  
  <p><strong>EDIT : solution: it is rendercontrol1 not rendertransport1 for the volume</strong></p>
  
  <p>correct for volume, for everybody interested in this:</p>
  
  <pre><code>curl -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: "urn:schemas-upnp-org:service:RenderingControl:1#SetVolume"' -d '&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;s:Body&gt;&lt;u:SetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"&gt;&lt;InstanceID&gt;0&lt;/InstanceID&gt;&lt;Channel&gt;Master&lt;/Channel&gt;&lt;DesiredVolume&gt;12&lt;/DesiredVolume&gt;&lt;/u:SetVolume&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;' 'http://192.168.178.61:49152/upnp/control/rendercontrol1'
  </code></pre>
  
  <p>Apart from that this device loves to call some chinese sites for DNS. So much for iDea"USA" ;-) so you may wanna block it from calling home in your router.</p>