CyberLink for Java


CyberLink for Java is a development package for UPnP™ developers. CyberLink controls these protocols automatically, and supports to create your devices and control points quickly.

UPnP™ * architecture is an open network to enable discovery and control of networked devices and services, such as media servers and players at home.

UPnP™ * protocols are based on many standard, such as GENA, SSDP, SOAP, HTTPU and HTTP. Therefore you have to understand and implement these protocols to create your devices of UPnP™.


* UPnP ™ is a certification mark of the UPnP™ Implementers Corporation.


The project is hosted on the following sites. Please check the following sites to know about CyberLink for Java in more detail.

Programming Guide

Using CyberLink in your project


I maintain a my personal repository of Maven, Cyber Garage Maven Repository, for my Java projects, and CyberLink is included in the repository too.

To use CyberLink in your project for Maven, add the following elements for the personal repository into your Maven project setting.



To use CyberLink for Java in your project for Android, please add the jar file in the my maven repository as an external library using the following property settings in the your project smile

Warning, important Some protocols of UPnP is based on multicast, but Android's emulator doesn't support multicast yet. Please check Android Emulator and Using the Android Emulator to know the network limitations in more detail.


Apache Felix

Apache Felix is an open source implementation of the OSGi Release 4 core framework specification. The UPnP base driver is based on CyberLinkForJava smile


Panasonic VIERA remote for Android

VIERA remote is a TV remote controller app for Panasonic VIERA TVs, both plasma TV and LCD TV, to let TV channel selection, input selection and volume control from Android terminals (of Google's Android 2.2 or later). CyberLinkForJava is used as the UPnP framework.

clink-example-vieraremote-01.gif clink-example-vieraremote-02.gif


IPv6 Appli-Contest 2003

The CyberLinkForJava was awarded an excellence winning entry in the IPv6 Appli-Contest 2003. Please check IPv6AppliContest2003 to know the contest in more detail.




If you have any problems using CyberLink, please use the tiny debugging tool which is included in CyberLinkForPerl, and send the output log as the following. To run the debugging tool, you have to be able to run Perl on your computer.

$ tar xvf <Net-UPnP-?.?.?.tar>
$ cd <Net-UPnP-?.?.?>
$ perl -Ilib examples/ > upnpchk.log


  • 2012-03-14 Satoshi Konno <>
      • Improved Device::getAbsoluteURL() to return the specified URL more correctly.
  • 2011-02-08 Satoshi Konno <>
      • Changed the trunk directory into 'trunk' instead of 'trunk/cyberlink'
      • Fixed some pom files to run normally.
  • 2011-09-16 Satoshi Konno <>
      • v2.1
  • 2011-09-15 Jaap <>
      • Fixed Service::getSCPDNode() to search the node more correctly.
      • Fixed Device::httpGetRequestRecieved() to get the local address from the request.
  • 2011-02-18 Hao Hu
      • Fixed Parser::parse() to get the port normally if the port isn't specified.
      • Fixed HTTPRequest::post() to set the timeout value correctly.
  • 2010-09-18 Robin V. <>
      • Fixed getSCPDNode() not to occur recursive http get requests.
  • 2010-09-09 Satoshi Konno <>
      • v2.0
  • 2009-11-11 Satoshi Konno <>
      • Added Device::getAbsoluteURL().
      • Improved Service::getSCPDNode() using Device::getAbsoluteURL().
      • Changed Parser::parser() to use ByteArrayInputStream instead of StringBufferInputStream because of bugs in Android v1.6.
  • 2009-10-07 Satoshi Konno <>
      • Changed HTTPMU::open() to bind the specified address and port for Android v1.6.
      • Fixed the thread name of SSDPSearchResponseSocket to use the correct local port.
      • Fixed XmlPullParser::parser() to set namespaces correctlly.
  • 2009-05-10 Satoshi Konno <>
  • 2009-01-10 Mirko Czesla <>
      • Logging: Improved logging where it was necessary. Changed some System.out to Debug class. In near future I will do this for all System.out, fill empty catch
  • 2008-03-29 Satoshi Konno <>
      • Added Device::isRunning() to know whether the device is running.
  • 2008-02-08 Satoshi Konno <>
      • Added Node::addValue().
      • Change JaxpParserparse() to use Node::addValue() instead of the setValue().
  • 2008-01-30 Satoshi Konno <>
      • Changed HTTPMUSocket::getLocalAddress() to return a brank string when the ssdpMultiGroup is null on Android m3-rc37a.
      • Changed SSDPNotifySocket::start() not to abort when the interface infomation is null on Android m3-rc37a.
      • Changed SSDPSearchSocket::start() not to abort when the interface infomation is null on Android m3-rc37a.
      • Changed SSDPSearchResponseSocket::start() not to abort when the interface infomation is null on Android m3-rc37a.
  • 2008-01-10 Satoshi Konno <>
  • 2007-08-23 Kazuyuki Shudo <>
      • Changed ThreadCore::stop() to stop more safety using Thread::interrupt().
      • Changed HTTPMUSocket::receive() to throw IOException.
      • Changed SSDPNotifySocket::run() and SSDPSearchSocket::run() to catch IOException of HTTPMUSocket::receive().
  • 2006-04-13 Satoshi Konno <>
      • Added XML.unescapeXMLChars().
      • Added setUserData() and getUserData() to set a user original data object to the following basic classes.
  • Action, Argument, ContolPoint, Device, Icon, Service and StateVariable.
  • 2005-08-30 Satoshi Konno <>
      • Changed HTTPRequest::post() to add a HOST headedr before the posting.
      • Changed HTTPSocket::post() to add a Date headedr to the HTTPResponse before the posting.
      • Changed HTTPDate::getDateString() to return the string of GMT.
      • Fixed HTTPPacket::set() to parse the chunk size as a hex string.
      • Fixed HTTPPacket::post() to output the chunk size as a hex string.
      • Fixed HTTPSocket::post() to output the chunk size as a hex string.
      • Fixed a bug of Device::getParentDevice() to return the parent device normally.
      • Fixed SSDP::getLeaseTime() to parse normally when the value includes extra strings such as white space.
  • 2005-05-28 Satoshi Konno <>
      • v1.7
      • Fixed a bug in XercesParser::parse() when the node has no value such as .
      • Changed StateVariable::getAllowedValueList() and AllowedValueList::getAllowedValue() to use AllowedValue instead of String as the member.
      • Added support for HTTP chunked stream to org.cybergarage.http.
      • Changed httpPostRequestRecieved() to return the bad request when the post request isn't the SOAP action.
      • Added Device::loadDescription(String) to load the description from memory.
      • Added Service::loadSCPD() to load the description from memory.
      • Change Parser::parse(String) to use StringBufferInputStream instead of URL.
      • Removed Service::setDescriptionURL() and Service::getDescriptionURL().
      • Changed httpGetRequestRecieved() to return the description stream using Device::getDescriptionData() and Service::getSCPDData() at first
      • Added close() in SSDPSearchSocket::stop().
      • Added test for null return from SSDPSearchSocket::receive() in run().
      • Added close() in SSDPNotifySocket::stop().
      • Added test for null return from SSDPNotifySocket::receive() in run().
      • Changed Device::announce() and byebye() to close the socket after the posting.
      • Changed Device::deviceSearchResponse() answer with USN:UDN::<device-type> when request ST is device type.
      • Changed Device::getDescriptionData() and Service::getSCPDData() to add a XML declaration at first line.
      • Added a new Device::setActionListener() and serQueryListner() to include the sub devices.
      • Changed ActionRequest::getActionName() to return when the delimiter is not found.
  • 2005-02-02 Satoshi Konno <>
      • v1.6.2
      • Fixed HTTPPacket::set() not to read over the content length when the stream is keep alive.
  • 2004-11-16 Satoshi Konno <>
      • v1.6.1
      • Fixed StateVariable::setValue() to compare only when the current value is not null.
      • Fixed Node::toXMLString() to convert from "'" to "'" instead of "\".
      • Fixed SubscriptionRequest::getSID() to loop between the getSID() and the hasSID().
  • 2004-11-16 Satoshi Konno <>
      • v1.6
      • Fixed ControlPoint::removeExpiredDevices() to remove using the device array.
      • Fixed HTTPRequest::getFirstLineString() and getHTTPVersion() no to return "HTTP/HTTP/version"
      • Added HTTPRequest::isHeadRequest().
      • Added HTTPPacket::setContentRange() and getContentRange().
      • Changed HTTPRequest::post(HTTPResponse) not to close the connection.
      • Changed HTTPRequest::post(String, int) to add a connection header to close.
      • Added a isOnlyHeader parameter to HTTPSocket::post().
      • Added a updateWithContentLength parameter to HTTPPacket::setContent().
      • Changed to HTTPPacket::set() not to change the header of Content-Length.
      • Changed HTTPServer::accept() to set a default timeout, HTTP.DEFAULT_TIMEOUT, to the socket.
      • Added HTTPPacket::init() and read().
      • Added HTTPRequest::isKeepAlive().
      • Added this class to allow ControlPoint applications to be notified when the ControlPoint base class adds/removes a UPnP device
      • Added HTTPStatus::isSuccessful() and HTTPRequest::isSuccessfule().
      • Removed a SOAP header from DIDLite::output()
      • Added support for Range header to HTTPPacket::getContentRange().
      • Added a MYNAME header to SSDP messages.
      • Added a fix to HTTPRequest::post() when the last position of Content-Range header is 0.
      • Added a Content-Range header to the response in HTTPRequest::post().
      • Changed the status code for the Content-Range request in HTTPRequest::post().
      • Added to check the range of Content-Range request in HTTPRequest::post().
      • Added support the intinite time and fixed a bug in Subscriber::isExpired().
      • Fixed a bug when Service::notify() removes the expired devices()
      • Fixed SSDPPacket::isRootDevice() to check the ST header.
      • Fixed Date::getInstance() to return GMT instance.
      • Fixed some methods of Date class to use HOUR_OF_DAY instead of HOUR.
      • Added Device::getStateVariable(serviceType, name).
      • Changed SSDP message to set the TTL as four.
      • Changed SSDPPacket::getRemoteAddress() to return the adresss instead of the host name.
      • Changed StateVariable::setValue() to update and send the event when the value is not equal to the current value.
  • 2004-08-10 Satoshi Konno <>
      • v1.5
      • Added support for Intel NMPR.
      • Added Device::setNMPRMode() and isNMPRMode().
      • Changed to advertise every 25%-50% of the periodic notification cycle for NMPR.
      • Added Device::setWirelessMode() and isWirelessMode().
      • Changed Device::start() to send a bye-bye before the announce for NMPR.
      • Changed Device::annouce(), byebye() and deviceSearchReceived() to send the SSDP messsage four times when the NMPR and the Wireless mode are true.
      • Fixed Device::announce() and byebye() to send the upnp::rootdevice message despite embedded devices.
      • Fixed Device::getRootNode() to return the root node when the device is embedded.
      • Fixed Service::announce() to set the root device URL to the LOCATION field.
      • Added ControlPoint::renewSubscriberService().
      • Changed ControlPoint::start() to create renew subscriber thread when the NMPR mode is true.
      • Changed Action::postControlAction() to set the status code to the UPnPStatus.
      • Changed StateVariable::postQuerylAction() to set the status code to the UPnPStatus.
      • Added Device::getParentDevice();
      • Changed Service::notify() to remove the expired subscribers and not to remove the invalid response subscribers for NMPR.
  • 2004-06-17 Satoshi Konno <>
      • v1.4.1
      • Changed HTTPRequest::post(HTTPResponse *) to close the socket stream from the server.
      • Changed HTTPPacket::getHeader() to compare using string::equals().
      • Changed SubscriptionRequest::setServie() to get the host address from the SSDP Location field when the URLBase is null.
  • 2004-05-12 Satoshi Konno <>
      • v1.4
      • Fixed to set HTTP v1.1 to SSDPRequest and SSDPResponse class.
      • Fixed setRequestHost() for Sony's UPnP stack when the URLBase has the path.
      • Changed to update the UDN only when the field is null.
      • Added some methods for StateVariable to get the AlloedValueList and the AllowedValueRange.
      • Added start(String target, int mx) and start(String target) to ControlPoint.
      • Added Device::isDeviceType().
      • Added StateVariable::hasAllowedValueList() and hasAllowedValueRange().
  • 2004-03-11 Satoshi Konno <>
      • v1.3.2
      • Changed to use the control URL when it is absolute.
      • Changed to get URLBase from the SSDP packet when the URLBase is null and the control URL is not absolute.
      • Added a multicast filter for the SSDP messages.
  • 2004-02-19 Satoshi Konno <>
      • v1.3.1
      • Fixed a HTTP server bug to return v1.1 instead of v1.0
      • Added a null line to SSDP messages for Intel UPnP tools
      • Added a header of xml version to setConetent() in SOAPRequest and SOPAResponse
  • 2004-01-13 Satoshi Konno <>
      • v1.3
      • Added automatic device advertiser
      • Added a XML parser interface, and kXML2 support.
      • Added automatic device disposer that remove expired devices from the control point
      • Changed action listener and query listener to return user error messages.
  • 2003-12-15 Satoshi Konno <>
      • v1.2
      • Improved the HTTP server using multithreading.
      • Updated a udn field by a generated uuid automatically.
      • Added Device::setActionListener() and Device::setQueryListener().
      • Added Service::setActionListener().
      • Added a Content-Length header to subscription responces.
      • Added Action::setAgumentValue(String name, int value).
      • Added Agument::setValue(int value).
      • Added Action::getAgumentIntegerValue().
      • Added Agument::getIntegerValue().
      • Fixed sending only IPv6 SSDP packets using a binding sockets.
      • Fixed a bug that can't send IPv6 SSDP packets.
      • Fixed missing escaping of reserved XML characters
  • 2003-06-02 Satoshi Konno <>
      • v1.1
      • Added IPv6 surpport.
      • Changed to bind to all local intrefaces.
  • 2003-03-16 Satoshi Konno <>
      • The first release.
Topic attachments
I Attachment Action Size Date Who Comment
PNGpng clink-example-flex-01.png manage 133.3 K 2013-09-03 - 03:02 SatoshiKonno  
GIFgif clink-example-vieraremote-01.gif manage 24.1 K 2013-09-03 - 02:54 SatoshiKonno  
GIFgif clink-example-vieraremote-02.gif manage 43.3 K 2013-09-03 - 02:55 SatoshiKonno  
PNGpng clinkjava-android-01.png manage 120.3 K 2011-09-15 - 16:04 SatoshiKonno  
GIFgif ipv6awardbig.gif manage 99.2 K 2010-01-18 - 14:36 SatoshiKonno  
PNGpng upnpapp.png manage 218.5 K 2010-01-18 - 14:34 SatoshiKonno  
Topic revision: r24 - 2014-03-28 - SatoshiKonno
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2014 by Satoshi Konno Powerd by TWiki logoTWiki.