Menu

MediaGate v2.0 cannot be 'find' by UPnP

Longan
2011-01-10
2013-05-02
  • Longan

    Longan - 2011-01-10

      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?

     
  • Satoshi Konno

    Satoshi Konno - 2011-01-12

    Hi,

    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.

    Regards,

    Satoshi Konno

     
  • Longan

    Longan - 2011-01-13

    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)

    (Cyber Media Gate v2.0)

    <?xml version="1.0" encoding="utf-8"?>
    <root>
       <specVersion>
          <major>1</major>
          <minor>0</minor>
       </specVersion>

    (Cyber Media Gate v1.7)

    <?xml version="1.0"?>
    <root xmlns="urn:schemas-upnp-org:device-1-0">
          <specVersion>
                 <major>1</major>
                 <minor>0</minor>
          </specVersion>

    (IV). The XML parser is different:

    (Cyber Media Gate v2.0)

    XMLPull

    (Cyber Media Gate v1.7)

    Apache Xerces

     

Log in to post a comment.