This package contains a number of modules that provide various parts of the functionality needed to perform upnp functions from Tcl.
The package depends on the following external packages:
- wibble (server side only)
The package provides the following modules:
ssdpThe ssdp package provides the low level infrastructure for the discovery step of UPnP networking. It takes care of sending out advertisements, periodically refreshing them, and responding to searches.
The ssdp package creates an ssdp command with the following subcommands:
- ssdp agent
- Return a standard user agent string
- ssdp detection <operation> <target> <cmdprefix>
- Specify a cmdprefix to invoke when the specified target is advertised.
- ssdp provide <struct>
- Start advertising the specified device and service structure.
- ssdp remove
- Stop advertising and remove all advertised devices from the network.
- ssdp search <target>
- Initiate a search for a device or service.
upnpThe upnp package provides functionality for the higher layers of UPnP networking,
The upnp package creates a upnp command with the following subcommands:
- upnp advertise <specfile> ?<base>?
- Advertise devices and services described in the specified specfile.
- upnp discover <target> ?<cmdprefix>?
- Try to locate the specified device or service on the network. Also listen for any future providers of the device or service. When a device or service is located, the control functions advertised by the service or services of the device are created as commands in a unique namespace per device, named after the uuid of the device. When everything has been set up, the command prefix is invoked with the name of the namespace appended as an extra argument.
- upnp revoke
- Revoke all advertised devices and services.
didlThe didl package provides functionality to facilitate the implementation of some UPnP services that exchange information in a DIDL-Lite XML structure.
The didl package creates a didl command with the following subcommands:
- didl build <data>
- Create a DIDL-Lite XML document from the data dict.
- didl parse <doc>
- Parse a DIDL-Lite XML document into a dict.
The demos directory contains a few demo programs. These can be executed before the package is installed using the demo script.
The mbrowser demo looks for media servers on your network and then allows you to browse the available media. If there are images in a format Tk supports, you can view them by clicking on their name.
The mbrowser demo is designed to use a standard icon set, although it will work without it On linux you can just create a symbolic link called icons to the installed icon set of your liking, for example: ln -s /usr/share/icons/oxygen demos/icons
On other platforms you can download an icon set like Tango and place that in the icons subdirectory under the demos directory.
The mserver demo implements a UPnP media server. It will serve files under demos/mediaserver/library to interested UPnP consumers. Either place your content under this directory, or make demos/mediaserver/library a symbolic link to where your content is located.