Rio Central protocol

Posted by: AudunE

Rio Central protocol - 04/05/2007 09:51

Where can I find info about the protocol that the central uses? I would like to write an php-application that could communicate with the central and present the music on a web page.
Posted by: peter

Re: Rio Central protocol - 04/05/2007 13:11

The network protocol? It shipped on Rio Receivers first (with a Windows server) before the Central, so most people refer to it as the Receiver protocol. Here's one: http://www.dasnet.org/node/69 and I thought Roger had some pages too, but I can't find them now.

Also see this: http://www.jonq.com/jq/projects/ampachereceiver/

Peter
Posted by: tfabris

Re: Rio Central protocol - 04/05/2007 13:26

I wrote a VB application to do the same thing, once. Now that I'm using a Macintosh upstairs, I'm wishing for a cross platform solution, so when you finish your PHP project, let us all know, because I'm sure some of us would like to use it.

Within this thread is the information I used (based on conversations with Roger) to write the application. This is what you're looking for:
http://empegbbs.com/ubbthreads/showflat.php/Cat/0/Number/181786/an//page//vc/1
Posted by: AudunE

Re: Rio Central protocol - 04/05/2007 13:27

Just what I was looking for!

Thank you very much!
Posted by: tfabris

Re: Rio Central protocol - 04/05/2007 13:27

And if you can figure out how to hack the Rio Central to host that PHP page itself, even better...
Posted by: AudunE

Re: Rio Central protocol - 04/05/2007 13:49

Thanks for the additional info! I`ll report back here when I have produced some working code. This will be a fun project!

If it works well maybe we can put a small webserver with php on the central, don`t know if it is room in it with only 16MB of RAM...
Posted by: peter

Re: Rio Central protocol - 04/05/2007 13:59

Quote:
And if you can figure out how to hack the Rio Central to host that PHP page itself, even better...

...and announce the page's URL as the UPnP "presentation URL" in the SSDP "description.xml" file? Then your Central would appear in Network Neighbourhood automatically (on XP), and double-clicking it would open the page...

Peter
Posted by: AudunE

Re: Rio Central protocol - 09/05/2007 09:20

Strange. When using php-functions to read from the Central it takes 10 seconds before I get a response. If I call wget from php instead, I get imediate response. Well, as long as it works...
Posted by: AudunE

Re: Rio Central protocol - 09/05/2007 09:45

How can I list what albums a certain artist has?

I want to list the artist, select the artist, and then get a list of the albums for the selcted artist.
Posted by: peter

Re: Rio Central protocol - 09/05/2007 12:29

Quote:
How can I list what albums a certain artist has?

I want to list the artist, select the artist, and then get a list of the albums for the selcted artist.

To my slight surprise recently when engaged in (that traditional pastime round here of) writing a replacement Receiver server, the protocol doesn't allow you to do that. On a real Receiver, the artists lead straight to tracks, not albums.

In retrospect, putting those queries in the client was probably the Wrong Thing. The client could alternatively just have asked for FID 100, and it could have been the server's job to magic up, underneath there, whatever soup views it felt capable of offering.

Peter
Posted by: AudunE

Re: Rio Central protocol - 09/05/2007 19:49

Quote:

To my slight surprise recently when engaged in (that traditional pastime round here of) writing a replacement Receiver server, the protocol doesn't allow you to do that. On a real Receiver, the artists lead straight to tracks, not albums.



This surprised me too. I have no playlists on the Central, I usually play a complete album at a time. I guess I`ll have to find another way to sort that out, maybe look at the numbering of the fids and peeking at the tags. It is solvable, but a bit more cumbersome then I had hoped for Smart ideas are welcome!

I have found a cool mp3 flash player that I will include in the php-application. The php-code will produce playlists for this player and the player will grab the right tracks from the central. I have tested the player by making playlists manually and it works great!
Posted by: AudunE

son-of-init sources? - 31/05/2007 09:19

Is the sources for son-of-init on the central available? I`d like to see what it does and maybe modify it to start a webserver.

I think this is how the Central boots:
-kernel-image boots from flash
-kernel executes /bin/init
-init boots kernel-image from hd
-kernel executes /bin/son-of-init
-son-of-init does some mounting and starts the player

Is this how it goes?
Posted by: peter

Re: son-of-init sources? - 10/06/2007 09:59

Quote:
Is the sources for son-of-init on the central available? I`d like to see what it does and maybe modify it to start a webserver.

The sources aren't available IIRC, but you can probably do what you want by renaming son-of-init to son-of-init.stock, and writing an entirely new son-of-init that does your stuff and then exec's the stock one. Or do the same with "player".

Peter
Posted by: geeknerd

Re: son-of-init sources? - 14/06/2007 17:45

Quote:

I think this is how the Central boots:
-kernel-image boots from flash
-kernel executes /bin/init
-init boots kernel-image from hd
-kernel executes /bin/son-of-init
-son-of-init does some mounting and starts the player



If that's how it works, I'd suggest not calling the stock son-of-init and instead just writing your own. If son-of-init does do all the mounting, this could be the final piece to allow >128G hdds. I'd definitely be interested in helping with such an endeavor.

16M of RAM is more than it sounds like. (You young whippersnapers with your newfangled 4G of RAM, back in my day, 640k was enough for anyone!) I'd almost guarantee that you could run a web server on it. I have run an sshd instance, ftp server, sendmail, and some other stuff on my central. If you want, I could whip up an image where you could run a webserver in a chrooted environment.
Posted by: AudunE

Re: son-of-init sources? - 16/06/2007 07:54

Okay, then I will try to set up a ARM-cross-compiling on my ubuntu laptop and try to write a init program. I have found several web-servers with php-support that I can run on the Central. It would be great if I could run the php-application on the Central in stead of on a seperate computer.

Support for bigger drives, could that be written as a module, or do we need a new kernel?

Any tips on setting up the cross-compiling environment?
Posted by: geeknerd

Re: son-of-init sources? - 16/06/2007 12:17

HDD support requires a new kernel, I have tried to compile it as a module and it didn't work. I think I'm about 75% of the way to getting a working kernel.

I haven't had great success getting cross-compiling working, I just set up a debian dist in a chrooted environment on the central. Here's the instructions I wrote while getting it working.

http://empegbbs.com/ubbthreads/showflat.php/Cat/0/Number/223597/an/0/page/1#Post223597

The ARM processor compiles surprisingly fast.
Posted by: geeknerd

Re: son-of-init sources? - 16/06/2007 19:14

Oh, also, if you need a test environment, once I get my replacement HDD I can hook you up. I would generally do my dev under gentoo or cygwin, then after I had it working there, move it over and try it out under debian ARM.
Posted by: AudunE

Re: son-of-init sources? - 18/06/2007 12:14

I`ll see if I can get some work done this week