#4 Support for Sony's UPnP stack



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


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


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

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


  • Thomas Schulz

    Thomas Schulz - 2004-01-16

    Class org.cybergarage.upnp.control.ControlRequest

  • Satoshi Konno

    Satoshi Konno - 2004-01-17

    Logged In: YES

    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

    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

    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
    if (urlBase != null && 0 < urlBase.length()){
    try {
    URL url = new URL
    String basePath =
    int baseLen =
    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>
    String postURL = "";
    if (HTTP.isAbsoluteURL(ctrlURL) == true)
    postURL = ctrlURL;

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

    // 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() <=
    postURL = service.getRootDevice

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

    setHost(reqHost, reqPort);

  • Thomas Schulz

    Thomas Schulz - 2004-03-24

    Logged In: YES

    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

    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


    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