Unoffical empeg BBS

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

Topic Options
#30707 - 07/05/2001 17:54 VNC Update
Ezekiel
pooh-bah

Registered: 25/08/2000
Posts: 2413
Loc: NH USA
The Dream: All around house remote control of empeg connected to stereo with visual feedback & streaming to Ipaq for network walkman.
---
The Equipment: 802.11b Wireless LAN, Ipaq 3600 with PCMCIA sleeve & Orinoco card, host PC with Winamp, and of course the trusty empeg with displayserver installed, VNC software.
---
My situation: I've had wireless music control in the house via an X10 RF mouse & winamp & Max10 software. I have an RCA cable running to the stereo downstairs from my PC, but this is prone to 60 cycle hum & is not very helpful when you want to know what song is next etc...
---
The progress:
This little project has had partial success. I've managed to control the empeg via the Ipaq but in two rather round-about ways, both of which require a PC running VNC server.
---
State of the state:

So far I've managed to control the music in two ways, neither of which are optimal. I have not managed to stream music to the Ipaq at all. Both control methods start with a VNC connection from the Ipaq to the host PC. From there the only difference is to control the displayserver applet or Winamp which is streaming from the empeg.

Both methods have their problems. Using winamp seems to be better so far. The more visual interface makes navigating between songs easier as the 5 way joystick/button does a good job of scrolling up and down between songs & selecting them. Using the stylus as a mouse is problematic, as the PC becomes confused by the positioning of the sylus taps, and often makes a drag window or moves a window you're trying to control. The keypad works well to control winamp. This & the joystick are the best way of controlling winamp remotely. Someone has written a network remote control for Palm, but I didn't find any for PocketPC.

Using the displayserver applet suffers from two things. The PC seems to send continuous taps when the stylus is positioned over the applet buttons which makes playlist & menu selection nearly impossible. Secondly the Ipaq-->VNC-->Displayserver-->PC-->Ipaq display lag is excessive which makes control even harder/impossible.

The limiting factors are the lack of java support on the Ipaq & the lack of a winamp control or player for Pocket PC. I've installed the Java 1.1 Beta for CE onto the Ipaq, so hopefully I'll be able to at least get Jemplode installed. However, since the test jars aren't even running yet, I have a ways to go.

As far as a network 'walkman' goes, I haven't found any mp3 players that will stream audio. The forthcoming Windows Media Player will stream, WMA only. Since I don't plan on re-encoding 1000's of files this doesn't help.
***
Moving forward: My next project will probably be trying to get Java to work on the Ipaq so I can use Jemplode & a serial cable for in-car song list generation and/or party time playlist generation via the network. I know virtually nothing about Java so any input/pointers would be greatly appreciated.

I am also going to attempt to set up VNC server on the empeg, but I'd still lack a player/control unless I can run displayserver via the loopback address in a browser in my VNC session. Again, any input is gratefully accepted, as I'm not a programmer. I know this is a high-overhead proposition for the empeg and may not work at all even if the loopback thing does work.
***
In conclusion:
Despite the setbacks having a VNC session from you handheld to your PC & controlling the empeg is WAY COOL!!! PHENOMINAL COSMIC POWER!!! itty bitty living space.... If you have the gear, it's at least a cool experiment. If you're considering purchasing the equipment just to do this, put your money in an X10 MouseRemote & wait a while. The VNC-Winamp-Displayserver stream worked well enough for me, but I'd have a hard time showing friends how to use it because of the unpredictable nature of the stylus actions.

Some technical gotchas to watch:
Make sure your wireless connection is set up properly. My SMC 7004WBR required a firmware flash before I consistent wireless connections (they were being dropped randomly).

Make sure you have the right VNC client build for your processor, pretty obvious but I'll say it nevertheless.

Always be sure to check 'Restrict pixels to 8-bit' when connecting the VNC client. Failure to do this crashes the VNC server (at least on W98se) while it eats 100% available resources & RAM. It is easily killed by Cntl-Alt-Delete if you catch it in time.

Otherwise, this is pretty easy.

Useful Links:
VNC (Virtual Network Computing): Home site http://www.uk.research.att.com/vnc/index.html
Arm Distribution of VNC Viewer from Conduits.com: http://www.conduits.com/ce/main.asp
Winamp www.winamp.com
Java for CE, Register & download http://developer.java.sun.com/developer/
You will need a CE registry editor to install this. One is available in the CE Developmenet kit here: http://www.microsoft.com/mobile/developer/default.asp (300MB download)

And of course Displayserver from Frank: http://empeg.dyndns.org/empeg/

-Zeke

just say you weren't paying much attention...
_________________________
WWFSMD?

Top
#30708 - 14/05/2001 17:37 Re: VNC Update [Re: Ezekiel]
Ezekiel
pooh-bah

Registered: 25/08/2000
Posts: 2413
Loc: NH USA
SUCCESS!

I have achieved excellent remote winamp (& hence empeg via displayserver) control. A gentleman named Victor Pavlov has written an XML server for winamp which works perfectly with Pocket IE. This plugin can be found by searching plugins for XML at winamp.com.

I don't have control of the empeg via the displayserver applet. How hard would an xml page/server on the empeg be? This approach seems strong.

A very happy,

Zeke


just say you weren't paying much attention...


Attachments
30218-XML Winamp from empeg stream.jpg (110 downloads)

_________________________
WWFSMD?

Top
#30709 - 15/05/2001 05:19 Re: VNC Update [Re: Ezekiel]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
I do not have much knowledge about XML; I thought an XML-server was just a plain HTTP-server serving XML-documents. I could make an HTML-page which contains buttons that send IR-codes to the empeg, but that would be quite slow.
I'm still investigating a native VNC-server for the empeg ( and receiver ).
Last time I struggled on the pixel format for transport efficiency, but if I would use a 256 color palette, a VNC-server should be quite easy to implement...



Frank van Gestel
_________________________
Frank van Gestel

Top
#30710 - 15/05/2001 09:22 Re: VNC Update [Re: fvgestel]
Ezekiel
pooh-bah

Registered: 25/08/2000
Posts: 2413
Loc: NH USA
Frank,
I think you're right about the XML server. The tricky bit seems to be coding the part that interfaces to the player software & XML support in the OS. I had to install MSXML3 from MS to get this to work, so I assume similar services would have to be available from the Linux kernel.

The CE VNC client has a 'Limit to 8 bits' option, so I don't think the host needs to know anything about the client, although if you don't set this on the CE client causes the host to crash (at least on my W98 machine). So far my main problem using VNC is speed. Refreshing a 1280x1024 desktop to a 240X320 screen is too slow to use. I think you're on the right track by limiting to an 8 bit pallet & plain interface. It would help the speed immensely as VNC likes to draw large untextured areas. However, there would might still be a stylus/mouse tapping issue. With VNC I end up dragging windows around a lot by mistake. Perhaps lower latency would help this.

The XML/HTML performance of the winamp plugin is quite good, although it does chew up some bandwidth refreshing the html window on the client every 10 seconds or so (configurable).

I've attached the help/config html page that came with the plugin, for those who're interested. It has some good basic information.

If you implement a VNC interface, you'd still have to run a player app on the empeg/RioReciever right? With XML that interface is just an html/xml page, so virtually any layout is possible and end users could code their own & install it. Just thinking out loud here...

-Zeke

just say you weren't paying much attention...
_________________________
WWFSMD?

Top
#30711 - 15/05/2001 09:27 Re: VNC Update [Re: Ezekiel]
Ezekiel
pooh-bah

Registered: 25/08/2000
Posts: 2413
Loc: NH USA
The attachment...

just say you weren't paying much attention...


Attachments
30272-VykTor_Manual.htm (118 downloads)

_________________________
WWFSMD?

Top
#30712 - 16/05/2001 13:08 Re: VNC Update [Re: fvgestel]
jane
enthusiast

Registered: 10/10/2000
Posts: 350
Loc: Copenhagen SW, Denmark
Hm... I think you are being a little pessimistic here.
I recently wrote a "jukebox" in an hour to play music with my
linux PC. Just text-links to bash-scripts that run for instance
"mpg123 xxx.mp3" or "killall mpg123" (to stop) or "aumix -v 80" (to set the volume).

The reaction time on these are instantanious. I use an iPAQ with the standard browser, and the redhat standard apache web server. (802.11b equipment from cisco/d-link)

Each shell-script again does an http redirect back to the
"indexing" page.

So, unless there is something I don't know about, I can't see any reason whatsoever that this should be slow.
I don't know the empeg/displayserver internals, but if there is some "startup delay", this could be solved (of course?) by running a displayserver-like process, and then providing
"entry points" for these http requests.

If I had the time and the sourcecode for displayserver, I'm sure I could do something like that without much pain.

Marius (Escort Cab + Mark II)


Top
#30713 - 16/05/2001 13:59 Re: VNC Update [Re: jane]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
You are right, a web page which start and ends songs on an open system works probably quite well; the only problem with the empeg is that I cannot tell it to play a certain song. As you said, you start up mpg123 with the name of the file, which isn't possible on the empeg. Displayserver lets you control the front-buttons of your empeg, which generate pseudo IR-codes. eg to fast-forward a file, you should hold down the right button, which will generate a sequence of IR-codes with a certain delay-time. Unfortunately these delay-times are shorter than the time it takes to click twice in your web-browser.
You could implement the kind of interface you are talking about on the empeg though, only not in an hour of so. Don't forget, you don't have access to convenient commands like killall or aumix, everything has to be coded in a low level language to make the running process as small and efficient as can be...
If I had to recode displayserver in perl, the size of the code was probably reduced by about 80%

If I had the time and the sourcecode for displayserver, I'm sure I could do something like that without much pain.
You can download the source; Unfortunately I cannot miss the time
This reminds me of Luke Skywalker : may the source be with you...

Frank van Gestel
_________________________
Frank van Gestel

Top
#30714 - 19/05/2001 09:23 Re: VNC Update [Re: fvgestel]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
the only problem with the empeg is that I cannot tell it to play a certain song.

Isn't there a way to send the player a serial command that tells it to play a specific FID? (I could be wrong?)

___________
Tony Fabris
_________________________
Tony Fabris

Top
#30715 - 20/05/2001 02:05 Re: VNC Update [Re: tfabris]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Isn't there a way to send the player a serial command that tells it to play a specific FID? (I could be wrong?)

emplode does manage to make the player start playing a FID of choice... Regreettably, the feature is not in open-sourced emptool :-( It is conceivable, though, to translate tune/playlist choice into sequence of menu commands (based on CVS dump and taking into account alphabetic playlist ordering).

Dragi "Bonzi" Raos
Zagreb, Croatia
Q#5196, MkII#80000376, 18GB green
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#30716 - 20/05/2001 03:13 Re: VNC Update [Re: bonzi]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
the feature is not in open-sourced emptool

Yes it is. It's just not called from anything. Do a grep for 'PlayFid' and 'SetPlayState' in lib/protocol.


Roger - not necessarily speaking for empeg
_________________________
-- roger

Top
#30717 - 20/05/2001 04:29 Re: VNC Update [Re: Roger]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Yes it is. It's just not called from anything. Do a grep for 'PlayFid' and 'SetPlayState' in lib/protocol.

A-ha! (BTW, is there a simple 'protocol-less' serial command to play a FID, too?)


Dragi "Bonzi" Raos
Zagreb, Croatia
Q#5196, MkII#80000376, 18GB green
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#30718 - 20/05/2001 08:25 Re: VNC Update [Re: bonzi]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
Yeah, '#' apparently. Followed by the FID in hex.

e.g. #100 would play the entire player.

It's undocumented, so don't rely on it not changing in future.



Roger - not necessarily speaking for empeg
_________________________
-- roger

Top
#30719 - 20/05/2001 09:04 Re: VNC Update [Re: Roger]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
That's great. I had been searching for something like that. I was thinking of integrating all serial commands into displayserver, ezekiel could interface quite easily. All song information is exported to javascript arrays, so anyone could program a simple player application, or even a backup utility,all in javascript!
I hope the ipaq supports javascript; vbscript could be added easily if needed.

Frank van Gestel
_________________________
Frank van Gestel

Top
#30720 - 20/05/2001 19:22 Re: VNC Update [Re: fvgestel]
Ezekiel
pooh-bah

Registered: 25/08/2000
Posts: 2413
Loc: NH USA
Frank,

I'm not a programmer, but I did find the following link which seems to summarize what's supported on PocketPC & Pocket Internet Explorer.


http://msdn.microsoft.com/workshop/languages/clinic/scripting08142000.asp

To sum up the article, it appears that Pocket Internet Explorer supports only JScript, which I assume is M$'s bastardized version of Javascript. Visual Basic is supported but not from within IE.

I'm excited that this has caught some interest on the BBS. I'm just starting to teach myself some C, and I had a hard time passing my manditory PASCAL program sophomore year.

I hope the link above is useful.

-Zeke


just say you weren't paying much attention...
_________________________
WWFSMD?

Top