#4 Support for Sony's UPnP stack

open
None
5
2004-03-16
2004-01-16
No

Hi,

I am working with some Sony UPnP applications. Sonys
adressing scheme for services and actions is different to
the others (like Intels or Atinavs) but still conform with
the standard (UPnP? Device Architecture v1.0.1 Draft, p.
25 and p.27). Sony uses the following addressing scheme
in the devices root document:

As base address it uses a hostname with an additional
path in the URI, like

<URLBase>http://hostname/mediaserver</URLBase>

All service specific URIs (like SCPDURL, controlURL and
eventSubURL) are relative to the URLBase like

<controlURL>/musicServer/actionsURI</controlURL>

As consequence the total address would be the
concatenation of both URIs which is not supported by the
Cyberlink stack yet. It would be nice to have that
support.

I fixed it manualy by altering the org.cyberlink.upnp.
control.ControlRequest.setRequestHost() method. Maybe
there is a better way to include the support. Attached
there is my ControlRequest.java class as example.

Cheers, Thomas

Discussion

  • Thomas Schulz

    Thomas Schulz - 2004-01-16

    Class org.cybergarage.upnp.control.ControlRequest

     
  • Satoshi Konno

    Satoshi Konno - 2004-01-17

    Logged In: YES
    user_id=559351

    Are URIs of your Sony devices are not relative such as the
    controlURL ?

    I checked my Sony device, Cocoon CSV-EX9, but the URIs
    are relative. The UPnP SDK version is bellow.

    Cocoon CSV-EX9:
    MontaVista Linux/2.1 UPnP/1.0 SONY NSC SDK (UPnP
    Core)/1.3.4

    I want to know your problem in more detail. Could you send
    me the descriptoin files ?

     
  • Satoshi Konno

    Satoshi Konno - 2004-03-16
    • assigned_to: nobody --> skonno
     
  • Satoshi Konno

    Satoshi Konno - 2004-03-20

    Logged In: YES
    user_id=559351

    Hi Thomas,

    I will add the following codes for your reported problem.
    Please check it :-)

    protected void setRequestHost(Service service)
    {
    String ctrlURL = service.getControlURL();

    // Thanks for Thomas Schulz (2004/03/20)
    String urlBase = service.getRootDevice
    ().getURLBase();
    if (urlBase != null && 0 < urlBase.length()){
    try {
    URL url = new URL
    (urlBase);
    String basePath =
    url.getPath();
    int baseLen =
    basePath.length();
    if (0 < baseLen) {
    if (1 <
    baseLen || (basePath.charAt(0) != '/'))

    ctrlURL = basePath + ctrlURL;
    }
    }
    catch (MalformedURLException
    e) {}
    }

    // Thanks for Giordano Sassaroli
    <sassarol@cefriel.it> (05/21/03)
    setURI(ctrlURL, true);

    // Thanks for Giordano Sassaroli
    <sassarol@cefriel.it> and Suzan Foster (09/02/03)
    // Thanks for Andre <andre@antiheld.net>
    (02/18/04)
    String postURL = "";
    if (HTTP.isAbsoluteURL(ctrlURL) == true)
    postURL = ctrlURL;

    if (postURL == null || postURL.length() <=
    0)
    postURL = service.getRootDevice
    ().getURLBase();

    // Thanks for Rob van den Boomen
    <rob.van.den.boomen@philips.com> (02/17/04)
    // BUGFIX, set urlbase from location string
    if not set in description.xml
    if (postURL == null || postURL.length() <=
    0)
    postURL = service.getRootDevice
    ().getLocation();

    String reqHost = HTTP.getHost(postURL);
    int reqPort = HTTP.getPort(postURL);

    setHost(reqHost, reqPort);
    setRequestHost(reqHost);
    setRequestPort(reqPort);
    }

     
  • Thomas Schulz

    Thomas Schulz - 2004-03-24

    Logged In: YES
    user_id=839568

    Hi, Konno-San;=)

    sorry for the late answer, I ignored somehow the post before
    your last post to this thread. Here are the relevant parts of
    the description file: (is attached)

    In this case the URI in <URLBase> has path information in
    addition to the IP address and the port. If this happens the
    <service> URIs have to be relative with no leading "/". I am
    testing the fixes which should be fine.

    Best regards, Thomas

     
  • Thomas Schulz

    Thomas Schulz - 2004-03-24

    extract of description file

     
  • Satoshi Konno

    Satoshi Konno - 2004-03-27

    Logged In: YES
    user_id=559351

    Hi Tomas,

    I checked your description file. Thanks :-) I will add the fixed
    to the next version of CyberLink.

    I would like to know about the Sony UPnP device. Could you
    tell me the product name ?

     
  • Thomas Schulz

    Thomas Schulz - 2004-04-02

    Logged In: YES
    user_id=839568

    Hi,

    the latest Sony VAIO series have different MediaServer
    pre-installed (Audio,Video,Picture and TV). These MediaServer
    are using the specific way of adressing. They also have nice
    designed ControlPoints installed.

    Cheers, Thomas

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks