Philips Streamium MC-i200 – Streaming Protocol

PC-Link Protocol

This is a mirror of the protocol description on http://www.siteswap.org/streamium/protocol.html.

  • PC-Link Client: Streamium
  • PC-Link Server: PC

Here's an example PC-Link client server interaction (note that the HTML headers have been omitted):

1) Client sends the following UDP broadcast on port 42591:

<PCLinkClient>
  <Version>1.0</Version>
  <Name>MC-i200</Name>
  <VendorID>Philips</VendorID>
  <IP>1694607552</IP>          <- IP address and port of client
  <Port>51111</Port>           <- in little endian format
</PCLinkClient>                (in this example IP:192.168.1.101 Port:42951)

2) Server responds by making a TCP connection to the client on port 42951 (not 42591):

<PCLinkServer>
  <Version>1.0</Version>
  <VendorID>MUSICMATCH</VendorID>
  <name>Nathan's MP3s</name>
  <ShortName>Nathan's MP3s</ShortName>
  <IP>1677830336</IP>                   <- IP address and port of server
  <Port>51111</Port>                    <- in little endian format
</PCLinkServer>                         (in this example IP:192.168.1.100 Port:42951)

3) TCP connection is closed and the client makes a TCP connection to the server on port 42951 and sends a requestnavdata tag:

<requestnavdata>                    I don't know what most of these xml tags are,
  <reqparameters>                   but the only ones that seem to be important
    <fpsv>30</fpsv>                 for my purposes are <nodeid> and <numelem>.
    <iamsv>101</iamsv>              Since <nodeid> is not included here it is
    <nc12>313911855841</nc12>       assumed to be a request for node 0.
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <serviceid>1</serviceid>
  <numelem>32</numelem>             <- maximum number of nodes to send
</requestnavdata>

4) Server responds by sending the contents of node 0:

<contentdataset>        Node 0 is the top node and in this case contains
  <contentdata>         links to nodes 1 through 5.  This is where you
    <name>Artist</name> Select how to browse your mp3s (by Artist, Album,
    <nodeid>1</nodeid>  Genre, Playlist, or Track)
    <branch/>
  </contentdata>        Maximum number of nodes we should send at a time
  <contentdata>         (see previous) is 32.  Since there are only 5
    <name>Album</name>  nodes total linked to node 0 we can send them
    <nodeid>2</nodeid>  all at once and totnumelem = numelem.
    <branch/>
  </contentdata>
  <contentdata>
    <name>Genre</name>
    <nodeid>3</nodeid>
    <branch/>
  </contentdata>
  <contentdata>
    <name>Playlist</name>
    <nodeid>4</nodeid>
    <branch/>
  </contentdata>
  <contentdata>
    <name>Track</name>
    <nodeid>5</nodeid>
    <branch/>
  </contentdata>
  <totnumelem>5</totnumelem>   <- total number of nodes to be sent
  <fromindex>0</fromindex>     <- offset from beginning of node list
  <numelem>5</numelem>         <- number of nodes sent with this response
</contentdataset>

5) Client requests the contents of node 1:

<requestnavdata>
  <reqparameters>
    <fpsv>30</fpsv>
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <nodeid>1</nodeid>           <- request node 1 (browse by artist)
  <serviceid>1</serviceid>
  <numelem>32</numelem>
</requestnavdata>

6) Server responds with the first 32 elements of node 1:

<contentdataset>
  <contentdata>
    <name>Ben Folds Five</name>
    <nodeid>286</nodeid>
    <branch/>
  </contentdata>
  ...                      <- 30 nodes omitted to make this more readable
  <contentdata>
    <name>Mick Karn</name>
    <nodeid>201</nodeid>
    <branch/>
  </contentdata>
  <totnumelem>57</totnumelem>  <- 57 nodes total (57 different artists in this collection)
  <fromindex>0</fromindex>
  <numelem>32</numelem>     <- only the first 32 are sent this time
  <alphanumeric/>
</contentdataset>

7) Client requests the rest of the contents of node 1:

<requestnavdata>             Here the <fromindex> tag is added
  <reqparameters>            to tell the server where it left
    <fpsv>30</fpsv>          off last
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <nodeid>1</nodeid>         <- request node 1
  <serviceid>1</serviceid>
  <fromindex>32</fromindex>  <- but start list from the 32nd element
  <numelem>32</numelem>
</requestnavdata>

8) Server responds with the rest of the elements in node 1:

<contentdataset>
  <contentdata>
    <name>Monty Python</name>
    <nodeid>22</nodeid>
    <branch/>
  </contentdata>
  ...                  <- 23 nodes omitted to make this more readable
  <contentdata>
    <name>Yoshihiro Hanno meets Mick Karn</name>
    <nodeid>221</nodeid>
    <branch/>
  </contentdata>
  <totnumelem>57</totnumelem>
  <fromindex>32</fromindex>   <-
  <numelem>25</numelem>       <- 25 elements listed starting from the 32nd element
  <alphanumeric/>
</contentdataset>

9) Client requests contents of node 286 (artist Ben Folds Five):

<requestnavdata>
  <reqparameters>
    <fpsv>30</fpsv>
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <nodeid>286</nodeid>   <- request node 286
  <serviceid>1</serviceid>
  <numelem>32</numelem>
</requestnavdata>

10) Sever responds with contents of node 286 which in this case happens to be only one node and it is a playable node (it is the song "Brick"):

<contentdataset>
  <contentdata>
    <name>Brick (Dance Remix)</name>   The url here points back to the pc-link server with
    <nodeid>285</nodeid>               a path to the actual file.
    <playable/>
    <url>http://192.168.1.100:42951/F%3A%2FMy%20Music%2FBlueDisk%20Kazaa%2F(Ben_Folds_Five)_Brick_(Dance_Remix).mp3</url>
    <title>Brick (Dance Remix)</title>
    <album></album>                    This url could really point anywhere though.
    <trackno></trackno>                It could point to a mp3 stream on the internet,
    <artist>Ben Folds Five</artist>    or it could point to a mp3 file on a webserver
    <genre>Booty Bass</genre>          or mp3 server hosted on your PC.  The pc-link
    <year></year>                      server has to be able to mp3 server as well if
    <bitrate>128000</bitrate>          you want to point this url to it.  My pclink.pl
    <playlength>232</playlength>       script doesn't do this, so if you want to serve mp3s
  </contentdata>                       you'll have to install apache or some other web or mp3 server.
  <totnumelem>1</totnumelem>                      
  <fromindex>0</fromindex>             Note that the bitrate and playlength can be omitted.
  <numelem>1</numelem>                 The streamium uses the playlength to produce a percent
  <alphanumeric/>                      complete bar, but if omitted it will just show the time played.
</contentdataset>                      (bitrate is in bits, playlength is in seconds)

At this point the pc-link client has the url for the ben folds five song and can connect to the server specified by the url and request the mp3 with a http get command.

That's all folks!

Same again with XML markup

Here are the same requests and responses again with XML markup and without the comments in the code:

1) Client sends the following UDP broadcast on port 42591:

<PCLinkClient>
  <Version>1.0</Version>
  <Name>MC-i200</Name>
  <VendorID>Philips</VendorID>
  <IP>1694607552</IP>
  <Port>51111</Port>
</PCLinkClient>

2) Server responds by making a TCP connection to the client on port 42951 (not 42591):

<PCLinkServer>
  <Version>1.0</Version>
  <VendorID>MUSICMATCH</VendorID>
  <name>Nathan's MP3s</name>
  <ShortName>Nathan's MP3s</ShortName>
  <IP>1677830336</IP>
  <Port>51111</Port>
</PCLinkServer>

3) TCP connection is closed and the client makes a TCP connection to the server on port 42951 and sends a requestnavdata tag:

<requestnavdata>
  <reqparameters>
    <fpsv>30</fpsv>
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <serviceid>1</serviceid>
  <numelem>32</numelem>
</requestnavdata>

4) Server responds by sending the contents of node 0:

<contentdataset>
  <contentdata>
    <name>Artist</name>
    <nodeid>1</nodeid>
    <branch/>
  </contentdata>
  <contentdata>
    <name>Album</name>
    <nodeid>2</nodeid>
    <branch/>
  </contentdata>
  <contentdata>
    <name>Genre</name>
    <nodeid>3</nodeid>
    <branch/>
  </contentdata>
  <contentdata>
    <name>Playlist</name>
    <nodeid>4</nodeid>
    <branch/>
  </contentdata>
  <contentdata>
    <name>Track</name>
    <nodeid>5</nodeid>
    <branch/>
  </contentdata>
  <totnumelem>5</totnumelem>
  <fromindex>0</fromindex>
  <numelem>5</numelem>
</contentdataset>

5) Client requests the contents of node 1:

<requestnavdata>
  <reqparameters>
    <fpsv>30</fpsv>
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <nodeid>1</nodeid>
  <serviceid>1</serviceid>
  <numelem>32</numelem>
</requestnavdata>

6) Server responds with the first 32 elements of node 1:

<contentdataset>
  <contentdata>
    <name>Ben Folds Five</name>
    <nodeid>286</nodeid>
    <branch/>
  </contentdata>
  ...
  <contentdata>
    <name>Mick Karn</name>
    <nodeid>201</nodeid>
    <branch/>
  </contentdata>
  <totnumelem>57</totnumelem>
  <fromindex>0</fromindex>
  <numelem>32</numelem>
  <alphanumeric/>
</contentdataset>

7) Client requests the rest of the contents of node 1:

<requestnavdata>
  <reqparameters>
    <fpsv>30</fpsv>
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <nodeid>1</nodeid>
  <serviceid>1</serviceid>
  <fromindex>32</fromindex>
  <numelem>32</numelem>
</requestnavdata>

8) Server responds with the rest of the elements in node 1:

<contentdataset>
  <contentdata>
    <name>Monty Python</name>
    <nodeid>22</nodeid>
    <branch/>
  </contentdata>
  ...
  <contentdata>
    <name>Yoshihiro Hanno meets Mick Karn</name>
    <nodeid>221</nodeid>
    <branch/>
  </contentdata>
  <totnumelem>57</totnumelem>
  <fromindex>32</fromindex>
  <numelem>25</numelem>
  <alphanumeric/>
</contentdataset>

9) Client requests contents of node 286 (artist Ben Folds Five):

<requestnavdata>
  <reqparameters>
    <fpsv>30</fpsv>
    <iamsv>101</iamsv>
    <nc12>313911855841</nc12>
    <setnc12>907310010777</setnc12>
    <uid>0</uid>
  </reqparameters>
  <nodeid>286</nodeid>
  <serviceid>1</serviceid>
  <numelem>32</numelem>
</requestnavdata>

10) Sever responds with contents of node 286 which in this case happens to be only one node and it is a playable node (it is the song "Brick"):

<contentdataset>
  <contentdata>
    <name>Brick (Dance Remix)</name>
    <nodeid>285</nodeid>
    <playable/>
    <url>http://192.168.1.100:42951/F%3A%2FMy%20Music%2FBlueDisk%20Kazaa%2F(Ben_Folds_Five)_Brick_(Dance_Remix).mp3</url>
    <title>Brick (Dance Remix)</title>
    <album></album>
    <trackno></trackno>
    <artist>Ben Folds Five</artist>
    <genre>Booty Bass</genre>
    <year></year>
    <bitrate>128000</bitrate>
    <playlength>232</playlength>
  </contentdata>
  <totnumelem>1</totnumelem>
  <fromindex>0</fromindex>
  <numelem>1</numelem>
  <alphanumeric/>
</contentdataset>

Comments