2008年8月11日

UPnP Control Point Operating Manual

UPnP Control Point
Operating Manual

0. Building Instruction (for UNIX)
Basically, these instructions are just a simple reference. If any error occurs,
try to solve them with your wisdom.

NOTE:
Due to some reasons, I have renamed the directory named "sample" in cyberLinkC/clinkc
to "upnp", so you should adjust the following steps depending on your own case.

Before building, you need to install some packages like automake and
libtool. At step (3), it will check your system and show you the required
libraries. You must install them before make. (In general, install the one
containing "dev".)

This program also uses CSOAP libraries to build a soap server to
communicate with the web page. Copy the directories named libcsoap and
nanohttp in libsoap (Of course you must build the libsoap first.) to
cyberLinkC/clinkc. Modify Makefile.am in cyberLinkC/clinkc/upnp/
upnpdump/unix:

Replace:
if HAVE_LIBTOOL
upnpdump_LDADD = ../../../lib/unix/libclinkc.la
with:
if HAVE_LIBTOOL
upnpdump_LDADD = ../../../lib/unix/libclinkc.la \ ../../../nanohttp/libnanohttp.la \
../../../libcsoap/libcsoap.la @XML_LIBS@

Now, it's time to build:

(1) cd cyberLinkC
(2) ./bootstrap
(3) ./configure
(4) make

For more details, take a look at INSTALL in cyberLinkC/clinkc.

1. Start the control point
(1) cd cyberLinkC/clinkc/upnp/upnpdump/unix
(2) ./upnpdump

2. Menu
The commands without the description are not expected to be used. Just ignore
them.

----------------------------------------------------------------------------------------

'p' : Print
Print the device list.
'c' : Control
Control one device.
'o' : Control (multiple actions)
'q' : Query
's' : Subscribe
'u' : Unsubscribe
'm' : Change MX value for M-Search
'r' : M-Search (rootdevice)
Do M-Search for rootdevices(Server, Renderer...etc).
'h' : M-Search (ssdp:all)
Do M-Search for all devices.
'v' : M-Search (urn:schemas-upnp-org:device:MediaRenderer:1)
Do M-Search for Renderer with major ver.1.
't' : M-Search (urn:schemas-upnp-org:device:MediaServer:1)
Do M-Search for Server with major ver.1.
'a' : Do all searches 2 times in a loop.
Do the above 4 kinds of M-searchs for 2 times.
'z' : Get file list
Get the media list from available Server.
'1' : Set URI and Play the first song
Play the first song.
'2' : Play the song
Play the current song.
'3' : Stop the song
Stop the current song.
'4' : Pause the song
Pause the current song.
'5' : Seek + 5%
Forward the song with 5% of the track length
'6' : Seek - 5%
Rewind the song with 5% of the track length
'x' : eXit
Exit the program. (May take a few seconds.)
----------------------------------------------------------------------------------------

3. Operation
After the CP (control point) starts, it will send discoverys and receive
advertisements send by other devices. In general, the devices in this UPnP
network will be added within a few seconds.

If, unfortunately, some devices cannot be found, it may be the cause of
network congestion. In this situation, you can do discoverys by yourself.
Simply use the M-Search command in the menu. Remember not to do M-
Search in a short period too frequently, or the delay of packet may cause
discovery problems. (e.g: the same device may be added for more than once.)

This CP also provides some commands similar to the web page that
controlling the renderer directly for a simple test. To play the media file,
make sure the servers and renderers has been added to the device list.
Press 'z' to get the file list first. Then press '1' to play the file and press other
keys for additional functions. Also, you can control the device by choosing
action with the Control command. Take SetAVTransportURI and Play for
example:

(1) Press 'c' and select one renderer.
(2) Select "urn:schemas-upnp-org:service:AVTransport".
(3) Select "SetAVTransprotURI".
(4) Enter "InstanceID" with '0' (zero).
(5) Enter "CurrentURI" (You can get the URI in advance by pressing 'z').
(6) Repeat (1) and (2), and then select "Play".
(7) Enter "InstanceID" with '0' (zero).
(8) Enter "Speed" with '1' (one).

The renderer is supposed to play the file if no error occurs.


--
My first simple document.
It's really essential for me to improve my English someday.

沒有留言: