I tested both MediaGate v1.7 and MediaGate v2.0 in PC's Java SE JVM. The v1.7 works fully, but the v2.0 does NOT. I guess the cause is the default XML parser libraries used by the v2.0 is not available in Java SE JVM. However, in Android, with org.xmlpull.v1, the MediaGate v2.0 still cannot work -- cannot be 'find' even by the UPnP Inspector tool program.
I downloaded your UPnP framework, cgupnpjava - Revision 164 - trunk, and made an Android project for the media server using MediaGate. I have made my project run successfully on an Android v2.2 mobile phone, but the UPnP function does NOT work fully. The SSDP notify packets were sent out correctly while starting the program. Later, however, the UPnP client, e.g. the UPnP Inspector tool program or the Sony PS3 PlayStation game machine, could NOT 'find' the MediaGate server.
I have used a network packet capturing tool program to debug this problem. I found the UPnP client did talk to the the MediaGate server, but could NOT seem to get enough data from the MediaGate server.
Is it a problem of the XML parser? In my Android project, by following your guide document, I have removed XercesParse.java and kXML2Parser.java. I check the execution result of the loadDefaultXMLParser() method of the UPnP.java, the default XML parser is XmlPullParser. Is there any further note which I should also know?
The following URL link is the captured network packets of the MediaGate v2.0 (run on Android mobile phone)
The following URL link is the captured network packets of the MediaGate v1.7 (run on PC)
MediaGate is my old implementation for UPnP/AV Media Server specification, and
I didn't check the execution with latest JVM yet.
However I will check your problem from now.
Thanks for your detail reports.
My further study:
The difference between CyberLinkForJava v1.7 and CyberLinkForJava v2.0 is that there is the lack of (xmlns="urn:schemas-upnp-org:device-1-0") in the device description sent by v2.0.
My preliminary conclusion:
Probably a problem with the XML parser, i.e. CyberGarage’s XmlPullParser.java, Parser.java and/or Android’s org.xmlpull.v1
My analysis is shown as follows:
(I). The data from the captured network packet while the UPnP device description is sent to the UPnP Inspector:
(see also the attached three files, V20_SendDeviceDescription.txt , V17_SendDeviceDescription.txt and ReplyToGetDescriptionXML_comparison-bt-v17-v20.png)
(Cyber Media Gate v2.0)
\r\n<?xml version="1.0" encoding="utf-8"?>\n<root>\n <specVersion>\n <major>1</major>
(Cyber Media Gate v1.7)
\r\n<?xml version="1.0"?>\n<root xmlns="urn:schemas-upnp-org:device-1-0">\r\n\t<specVersion>\r\n\t\t<major>1</major>
(II). The XML file of the UPnP device description downloaded from the MediaGate’s HTTP server myself via a web browser:
(see also the attached XML file, V20_description.xml and V17_description.xml)
<?xml version="1.0" encoding="utf-8"?>
(IV). The XML parser is different:
The attachments of my last reply are available at the following URLs:
Log in to post a comment.