Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#297935 - 04/05/2007 09:51 Rio Central protocol
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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.
_________________________
- Audun E -

Top
#297936 - 04/05/2007 13:11 Re: Rio Central protocol [Re: AudunE]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
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

Top
#297937 - 04/05/2007 13:26 Re: Rio Central protocol [Re: AudunE]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31563
Loc: Seattle, WA
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
_________________________
Tony Fabris

Top
#297938 - 04/05/2007 13:27 Re: Rio Central protocol [Re: peter]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
Just what I was looking for!

Thank you very much!
_________________________
- Audun E -

Top
#297939 - 04/05/2007 13:27 Re: Rio Central protocol [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31563
Loc: Seattle, WA
And if you can figure out how to hack the Rio Central to host that PHP page itself, even better...
_________________________
Tony Fabris

Top
#297940 - 04/05/2007 13:49 Re: Rio Central protocol [Re: tfabris]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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...
_________________________
- Audun E -

Top
#297941 - 04/05/2007 13:59 Re: Rio Central protocol [Re: tfabris]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
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

Top
#297942 - 09/05/2007 09:20 Re: Rio Central protocol [Re: peter]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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...
_________________________
- Audun E -

Top
#297943 - 09/05/2007 09:45 Re: Rio Central protocol [Re: AudunE]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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.
_________________________
- Audun E -

Top
#297944 - 09/05/2007 12:29 Re: Rio Central protocol [Re: AudunE]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
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

Top
#297945 - 09/05/2007 19:49 Re: Rio Central protocol [Re: peter]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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!
_________________________
- Audun E -

Top
#297946 - 31/05/2007 09:19 son-of-init sources? [Re: AudunE]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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?
_________________________
- Audun E -

Top
#297947 - 10/06/2007 09:59 Re: son-of-init sources? [Re: AudunE]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
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

Top
#297948 - 14/06/2007 17:45 Re: son-of-init sources? [Re: AudunE]
geeknerd
member

Registered: 24/09/2003
Posts: 148
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.

Top
#297949 - 16/06/2007 07:54 Re: son-of-init sources? [Re: geeknerd]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
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?
_________________________
- Audun E -

Top
#297950 - 16/06/2007 12:17 Re: son-of-init sources? [Re: AudunE]
geeknerd
member

Registered: 24/09/2003
Posts: 148
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.

Top
#297951 - 16/06/2007 19:14 Re: son-of-init sources? [Re: geeknerd]
geeknerd
member

Registered: 24/09/2003
Posts: 148
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.

Top
#297952 - 18/06/2007 12:14 Re: son-of-init sources? [Re: geeknerd]
AudunE
journeyman

Registered: 08/10/2004
Posts: 53
Loc: Trondheim, Norway
I`ll see if I can get some work done this week
_________________________
- Audun E -

Top