beafuture writes

Hi I found no URLBase node in the description.xml file, some UPNP client need this URL to determine how to get other XML file, otherwise will get error message like this “libupnpp/device/vdir.cxx:74::vdgetinfo: no entry for /description.xml/AVTransport.xml”.

In addition, I use the -P 40000 in command line or “upnpport = 40000” in configure file is invalid,upmpdcli also will use a random port.

medoc92 writes

Hi,

I had a look at the URLBase issue, and indeed, it is not set, I’ll fix it, but it’s not a completely trivial change, and I don’t want to disturb the just released 0.9.0. I could supply a patch if this is a serious issue for you. It would also be possible to just have a dirty workaround to just trim /description.xml in /description.xml/AVTransport.xml.

About the port, I tried, and it works with 50000 and above and not 40000. When it does not work, I dont get a random port but 49152 which is the default. I don’t know why 40000 does not work, and I’m not too interested either :)

beafuture writes

Thanks for your reply.

I have already put "upnpport=49152" into the configuration file, and then written "<URLBase >http://myip:49152</URLBase >" node into description.xml, music can be played normally.

But I found another problem again, it seems my client is really bad, but it is very popular in China,called baidu music .Problem is that the progress bar is always at 0:00 when music is played.I did some tests and found that when no User-agent header sent by client will cause this problem.

When i run this command ,the result is incorrect:

---- shell curl -d@post.txt http://192.168.1.50:49152/ctl/AVTransport -H SOAPACTION: "SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetPositionInfo"" -H "Host: 192.168.1.50" -H "Content-Type: text/xml; charset=\"utf-8\"" -H "User-Agent:"

This command work properly:


---- shell
curl -d@post.txt http://192.168.1.50:49152/ctl/AVTransport -H 'SOAPACTION: "SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetPositionInfo""' -H "Host: 192.168.1.50" -H "Content-Type: text/xml; charset=\"utf-8\""

It may be a upstream library problem.Of course, it will not affect everyone, I’m just interested in it, if not a bug, I still can change to other music clients.

Anyway, thank you very much for your work

beafuture writes

The content of post.txt:

<?xml version="1.0" encoding="utf-8"? >
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
   <s:Body >
      <u:GetPositionInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1" >
         <InstanceID >0</InstanceID >
      </u:GetPositionInfo >
   </s:Body >
</s:Envelope >

medoc92 writes

Hi, I tried to reproduce this, but I can’t I am attaching the small script I am using (all in one file, easier).

The result is the same if I suppress the user-agent line, or if I put a value, or if there is an empty value, it works in every case.

In any case, libupnp does the initial decoding of SOAP requests, so this would rather be a libupnp issue (http://pupnp.sourceforge.net/). I am testing with version Ubuntu Trusty libupnp 1.6.17-1.2

What I find strange is the "schemransport" thing in the SOAPACTION header ? when I try with it instead of schemas-upnp-org:service:AVTransport, I get errors with or without User-agent, but I did not investigate further.

Ok, can’t attach a shell-script so here it comes:

#!/bin/sh

set -x

curl -d@- \
http://192.168.4.6:49152/ctl/AVTransport \
-H 'SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetPositionInfo"' \
-H "Host: 192.168.4.6" \
-H 'Content-Type: text/xml; charset="utf-8"' \
-H 'User-Agent:' \
<<EOF
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
<s:Body ><u:GetPositionInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1" >
<InstanceID >0</InstanceID >
</u:GetPositionInfo >
</s:Body >
</s:Envelope >
EOF

echo

beafuture writes

Today I tried it, there is no way to reproduce the problem, then ignore it now,thanks very much.

medoc92 writes