Unoffical empeg BBS

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

Topic Options
#55563 - 06/01/2002 07:35 Player control over ethernet.
richyrich
new poster

Registered: 06/01/2002
Posts: 8
Hi folks, I've had a looksy around and I can't find a simple way of controlling the empeg (running dev. image 2b5) via ethernet. The emptool app gives me the access to obviously take a goosy at the playlists etc, but I want to be able to do the simple things in life like "play" "stop" "next track" "previous track" to start with and then move onto the more complicated stuff later. It's all part of my master plan to be able to control the thing via my moby phone running gprs to my static IP at home and then route certain http requests to a constantly on linux machine which can then translate these to the player. I'm really not quite sure what the real pratical use for this would be apart from if I'm sitting outside and can't use the remote due to sunlight, machine inside etc etc, and and obviously for the main reason "because I can". Cheers, Rich.

Top
#55564 - 06/01/2002 07:43 Re: Player control over ethernet. [Re: richyrich]
beaker
addict

Registered: 19/08/2000
Posts: 588
Loc: England
As far as I'm aware there isn't any way yet of doing this over Ethernet. Only Serial at the moment. Someone please correct me if I'm wrong.
_________________________
Marcus 32 gig MKII (various colours) & 30gig MKIIa

Top
#55565 - 06/01/2002 07:46 Re: Player control over ethernet. [Re: beaker]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Emplode does it over ethernet, so it is possible.

-ml

Top
#55566 - 06/01/2002 08:01 Re: Player control over ethernet. [Re: mlord]
beaker
addict

Registered: 19/08/2000
Posts: 588
Loc: England
Oh yeah, I'm sure it's possible I just don't know of any app that does it at the moment, apart from Emplode of course but that's very limited in functionality.
_________________________
Marcus 32 gig MKII (various colours) & 30gig MKIIa

Top
#55567 - 06/01/2002 08:03 Re: Player control over ethernet. [Re: beaker]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Limited, yes.. but it does know how to do it.

And so will you once you place a sniffer (eg. Linux box running tcpdump) onto the network and then do a few point-and-click's.

Cheers

-ml

Top
#55568 - 06/01/2002 09:31 Re: Player control over ethernet. [Re: beaker]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Sniffing emplode's trafic is one way (complicated by the fact that emplode only has controls for play/pause and tune/list enqueueing). Alternative could be to run displayserver and emulate its Java client.
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#55569 - 06/01/2002 10:27 Re: Player control over ethernet. [Re: bonzi]
mschrag
pooh-bah

Registered: 09/09/2000
Posts: 2303
Loc: Richmond, VA
Take a look at the CommandRequestPacket in emptool:

#define COM_PLAYFID 3 // Start playing a specific FID.
#define COM_PLAYSTATE 4 // Play/pause the unit.
#define COM_BUILDMULTFIDS 5 // Start building a list of FIDs for playing.
#define COM_PLAYMULTFIDS 6 // Last list of FIDs for playing.

typedef struct tagCommandRequestPacket
{
EmpegPacketHeader header;
int command;
int parameter0;
int parameter1;
char parameter2[256];
} CommandRequestPacket;

I'm not sure if there is a command parameter for NEXT and PREV ... Empeg guys -- is there?

Mike

Top
#55570 - 06/01/2002 10:31 Re: Player control over ethernet. [Re: bonzi]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
complicated by the fact that emplode...

This is complicated by the fact that the protocol only has features for play/pause and enqueuing. Adding track skip and other hoopy stuff is on the list...
_________________________
-- roger

Top
#55571 - 06/01/2002 10:38 Re: Player control over ethernet. [Re: Roger]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#55572 - 06/01/2002 10:51 Re: Player control over ethernet. [Re: mschrag]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
No, there isn't.
_________________________
-- roger

Top
#55573 - 06/01/2002 12:32 Re: Player control over ethernet. [Re: richyrich]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Displayserver will let you remotely control the player over ethernet with a Java applet.
_________________________
Tony Fabris

Top
#55574 - 07/01/2002 12:41 Limited success so far... [Re: richyrich]
richyrich
new poster

Registered: 06/01/2002
Posts: 8
FWIW, I've started hacking into the emptool code. I've managed to get it to play something if you're in the right directory and you spell the track correctly (yes I snaffled most of the code from the lookup bit). However, now my troubles start due to the unix buffering with perl (which I'm using to control it). I guess I could make the entire thing some kind of TCP service, which would probably benefit others in the long run, but for now I'm just piping via STDOUT and STDIN. If anyone's interested in what I've written, I'll try and publish a diff when I've made it as tidy as the original code..... Any takers ??

Top
#55575 - 07/01/2002 12:57 Re: Limited success so far... [Re: richyrich]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Umm ISTR that you can solve some of your buffering issues by doing something like this:

open ( SERIAL, ">/dev/ttyS0");
SERIAL->autoflush(1);

You might have to use the FileHandle module to make use of autoflush.
_________________________
- Tony C
my empeg stuff

Top
#55576 - 07/01/2002 13:14 Re: Limited success so far... [Re: tonyc]
ClownBurner
member

Registered: 05/09/2000
Posts: 174
Loc: Irvine, CA USA
Or even simpler, just set autoflush to 1 globally at the beginning of your perl script, like this:

$|++;
_________________________
_____________ James Mancini

Top
#55577 - 07/01/2002 16:11 Re: Limited success so far... [Re: ClownBurner]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
My understanding is that $| only modifies the flushing in the currently selected filehandle.
_________________________
Bitt Faulk

Top