Unoffical empeg BBS

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

Topic Options
#221187 - 13/03/2002 02:36 VNC server
tlilley
new poster

Registered: 20/12/1999
Posts: 19
Loc: Blacksburg, VA
File this under "proof of concept" and don't expect miracles

Note: you need to "know what you're doing" to use this right now.

Grab Frank's displayserver kit (see the Wish List thread on remote control) and install it per instructions. Edit his /sbin/init to remove the call to displayserver (cd /ds, etc.) and replace it with a call to vncd &

Point your vncviewer at port 5900 on your Rio Receiver. Note: the server is ultra-brittle and has many things hardcoded. For instance, you must use the -bgr233 option to vncviewer to force the right pixel format, since I don't actually handle the pixel format messages from the client right now.

Here's my sample vncviewer (Linux) invocation:

vncviewer -bgr233 -encodings raw 10.0.1.204

Right now, the server is incredibly naive and just continuously blasts update messages out over the network. Since each message is only 8KB, that will be line noise on a 10/100 switched segment, but it's still ugly. Since I'm pretty sure a VNC server is part of my Rio / Empeg destiny any way I slice it, I'll likely work on fixing all of this mess

My next step (after I get back to real work for a while) is to look at Frank's kernel hacks for displayserver, and see what I can learn from his work.


Attachments
1391-vncd (571 downloads)

_________________________
S/N 0141 Blue 20GB

Top
#221188 - 13/03/2002 02:43 Re: VNC server [Re: tlilley]
number6
old hand

Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
Don't forget to check what wfaulk did with his vnc server over in the Empeg BBS
as Bitt did something similar for the empeg and there may be a existing codebase you can use to save having to reinvent the wheel.

Have a search in the empeg BBS programming forum for vncserver.


Top
#221189 - 13/03/2002 03:06 Re: VNC server [Re: number6]
tlilley
new poster

Registered: 20/12/1999
Posts: 19
Loc: Blacksburg, VA
Hmm. Thanks for the pointer. Second time tonight I've discovered that I'm being redundant

It looks like that VNC server requires the Hijack kernel, which, as far as I can tell from searching around here, hasn't been ported yet. Since mine doesn't (currently) handle input, it doesn't need the Hijack kernel's button injector mechanisms.

I might wade into hacking up empegVNC to decouple its input handling, though. That way, it would be of use to people with and without the Hijack kernel, and also of use to hackers building "from scratch" (ie: discarding the monolithic player app).

Then again, I -could- just get back to my real work
_________________________
S/N 0141 Blue 20GB

Top
#221190 - 13/03/2002 03:35 Re: VNC server [Re: tlilley]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
the mods in the kernel allow you to write IR-codes to /dev/ir :
example code from displayserver.c :

struct empeg_ir_write {
int type;
long ircode;
} *irdata;

irfd = open("/dev/ir", O_WRONLY|O_CREAT|O_TRUNC);
irdata->type=0;
irdata->ircode=1;
rts = write(irfd, irdata, sizeof(irdata));
if (rts == -1 )
perror("Writing to IR device.");
close(irfd);


the type is actually allways zero
_________________________
Frank van Gestel

Top
#221191 - 13/03/2002 20:34 Re: VNC server [Re: fvgestel]
tlilley
new poster

Registered: 20/12/1999
Posts: 19
Loc: Blacksburg, VA
I can't seem to get this to work. That is, rts is showing me the 'correct' number of bytes written, but nothing's actually -happening- with the Receiver.

Do you have a list of the IR codes available?

Have you made available, or can you make available, the source for displayserver? I was only able to find what is apparently a quite old version that doesn't support the input / IR stuff.
_________________________
S/N 0141 Blue 20GB

Top
#221192 - 13/03/2002 23:36 Re: VNC server [Re: tlilley]
tlilley
new poster

Registered: 20/12/1999
Posts: 19
Loc: Blacksburg, VA
Okay, I originally didn't notice dsrec.c sitting right there in the tarball, but now I have. Apparently I'm completely blind. Whee.

Anyway, I've fixed the bug where I wasn't malloc'ing the irdata struct, but I'm still not getting any actual response from the receiver to my button injections.
_________________________
S/N 0141 Blue 20GB

Top
#221193 - 13/03/2002 23:46 Re: VNC server [Re: tlilley]
tlilley
new poster

Registered: 20/12/1999
Posts: 19
Loc: Blacksburg, VA
Okay, got it. In the original sample code snippet, you used sizeof(irdata), but that should be sizeof(*irdata). I should've caught that much earlier than this. Dur.

Thanks! It's accepting keypresses now (admittedly, with horrendous lag, but, hey. I can deal.)
_________________________
S/N 0141 Blue 20GB

Top
#221194 - 14/03/2002 00:17 Re: VNC server [Re: tlilley]
tlilley
new poster

Registered: 20/12/1999
Posts: 19
Loc: Blacksburg, VA
Here's a version with rudimentary keyboard control. Commands mimic the remote keys, not the front panel keys:

ENTER: enter
ESC: cancel
M: menu
P: play/pause
S: stop
>: FF
<: REW
UP ARROW: select up
DOWN ARROW: select down
RIGHT ARROW: volume up
LEFT ARROW: volume down

warning: there's an incredible amount of latency between the keypress and the Receiver's reaction. I haven't debugged that yet, but I suspect it's because I'm just blasting framebuffer updates out indiscriminantly.

I don't know whether or not I'll update this further, because I'm considering hacking on empegVNC, since it's much more nicely put together (this is a hack). However, anyone wanting source code is welcome to drop me a mail and I'll send it along.
_________________________
S/N 0141 Blue 20GB

Top