world leader in high performance signal processing
Trace: » upnp

Using UPNP Library

The home website of linux UPNP SDK: ”libupng” released v1.3.1 in Mar-2006. And there is a post on the website, saying:

“As of 2005-2006, the original developers did not have the time to work on libupnp any more and nobody expressed interest in taking over development of the main project. As a result, Michael Pfeiffer forked a new project, pupnp, where he has pledged to continue active development. This page is being left up for historical reference and in case there is ever a desire to return to the pre-fork code. In the meantime, we encourage those seeking a more current version of the library to go to the pupnp project.”

The latest release from pupnp ( has updated the library to v1.4.1.

We have ported and tested libupnp-1.4.1 on Blackfin uClinux.

Build the Library

To build libupnp for Blackfin uClinux, just select “Library Configuration” → “libupnp”. You should also enable the sample applications in “Blackfin test programs”.

  • The build system will generate a static library called libupnp.a
  • The test programs are called upnp_tv_device and upnp_tv_ctrlrpt

Run UPNP Samples

  • On the board, first enable multicast:
root:~> route add -net netmask eth0
  • Then launch upnp_tv_device:
root:~> ./upnp_tv_device
Initializing UPnP Sdk with
         ipaddress = (null) port = 0
UPnP Initialized
         ipaddress= port = 49152
Specifying the webserver root directory -- ./web
Registering the RootDevice
         with desc_doc_url:
RootDevice Registered
Initializing State Table
Found service: urn:schemas-upnp-org:service:tvcontrol:1
serviceId: urn:upnp-org:serviceId:tvcontrol1
Found service: urn:schemas-upnp-org:service:tvpicture:1
serviceId: urn:upnp-org:serviceId:tvpicture1
State Table Initialized
Advertisements Sent
  • On another machine, run the upnp_tv_ctrlrpt program. It should receive the advertisements from upnp_tv_device running on the board. You can type “Help” to see other commands.
host# ./upnp_tv_ctrlrpt



ErrCode     =  0

Expires     =  100

DeviceId    =  uuid:Upnp-TVEmulator-1_0-1234567890001

DeviceType  =

ServiceType =  urn:schemas-upnp-org:service:tvpicture:1

ServiceVer  =

Location    =

OS          =  Linux/, UPnP/1.0, Intel SDK for UPnP devices/1.4.0

Ext         =



Found Tv device
   1 -- uuid:Upnp-TVEmulator-1_0-1234567890001