PDA

View Full Version : series2 OSD kind of working, but why does osdwriter fork?



Xybyre
10-21-2003, 03:40 PM
Since osdwriter is currently the only known way to display to the screen for series2 (correct?), I'm trying to make it display a created-on-the-fly png. This could simulate text2osd, as well as open up new options for OSD displays. In particular, I am trying to get the YAC listener to display caller id info in a small box.

I have ported libpng and gdlib to MIPS. I am able to create a 720x480 png file dynamically, and I use "osdwriter myfile.png -share" to put it on the screen. Then I kill osdwriter, delay a user-specified number of seconds, and then clear the display with "osdwriter blank.png -share". Then I kill osdwriter again.

This appears to work fine for non-transparent images, but transparent images appear ghosted. That is, I see two of the same image overlayed, each offset by a number of pixels. I verified this with a full-screen image in /tvbin. What happens is: osdwriter displays the image, then it forks another osdwriter to display it again. However, the second instance displays the image at a slightly different location. I can see the image shift to the left immediately after it appears.

Does anybody know why osdwriter spawns another copy of itself? I'm trying to read through the disassembly of osdwriter, but I'm not really familiar with mips. I'd like to supress that second instance of osdwriter, to see if it will fix the problem. Anybody good at reverse-engineering mips programs?

David Bought
10-21-2003, 03:56 PM
Originally posted by Xybyre
I'd like to supress that second instance of osdwriter, to see if it will fix the problem.


echo 'int fork() { return(1234); }' > fork.c ; cc -shared fork.c -o fork.so ; LD_PRELOAD=fork.so ./osdwriter myfile.png -share

Xybyre
10-22-2003, 10:13 AM
Thanks for the tip, David! That's a neat trick! It will come in handy in the future as well.

When I use a fork() that returns non-zero, the programs quits and I get no display at all. When I use a fork() that returns zero, I get the double-image, and the program hangs until I kill it with Ctrl-C. So I guess the first osdwriter simply spawns the second one and quits, while the second one displays the image and hangs around.

Time for me to look through the osdwriter disassembly again...

mmccurdy
10-23-2003, 03:24 PM
If you get the OSD to work on the series 2, please post it. I tricked out my series 2 before realizing that many cool apps are just for series 1.

Does the "Screen" function under tivoweb work on a series two or would this also be waiting on the build of a replacement newtext2osd?

-Mark

mmccurdy
10-23-2003, 08:00 PM
I took a full size png, made it fully transparent, then overlayed a box with text on it. On display, it displays with perfect transparency. I haven't created the on-the-fly png creator yet. My next move. Like you said, if this mimics newtext2osd parameters, it's a good drop-in.

TheWickedPriest
10-23-2003, 10:41 PM
The "Screen" function in TivoWeb doesn't write to the screen, just simulates the screen in your browser, and translates your actions to the appropriate remote commands. On the other hand, there is an add-on module for TivoWeb to write stuff to the screen; that, indeed, doesn't work.

The one time I tried "osdwriter -share", I got the shadow effect on menus afterwards, until I rebooted. Guess I'll have to try it again...

mmccurdy
10-23-2003, 10:51 PM
What I meant to say is that the "Screen" module only shows the show name. I assume it should show a screenshot in my browser but it doesn't. Is this supported in Series 2?

TheWickedPriest
10-23-2003, 11:00 PM
It works fine on my HDVR2 (although I'm not using the stock TivoWeb -- I can't comment on that). It may not be intuitive... OK, my Tivo was in Standby just now; I start up TivoWeb, click on "Screen", and my options are "TiVo", "back", and "refresh". If I click on "TiVo", I get "DIRECTV Central", with the expected options. And so on.

mmccurdy
10-24-2003, 10:04 AM
I have just the same three menu items on the "Screen" field. I just assumed it shows a screenshot of what's playing. I looked at the code, and it's too complicated to just display the show name and three menu items.
I just assume go to "info" if all I get is the title name.

Juppers
10-24-2003, 10:13 AM
The screen module does not, and never has shown a screen shot. It is basically something that shows you what is currently on your TiVo screen, and can occasionally be easier to use than web remote for some functions. I don't believe it was ever considered completed by the author, but cool enough to be included into tivoweb.

Xybyre
10-24-2003, 10:36 AM
Well, after some more experimenting, I discovered that osdwriter does not properly display indexed .pngs with transparency. The transparency setting seems to be ignored.

I created an RGBA png under Photoshop and displayed it with osdwriter, and it showed up correctly. Next, I modified fly to create truecolor images with the alpha channel enabled (it currently only creates paletted images). That did the trick! I can see caller-id on my TV now. :)

There are two more things for me to do. One is to find a large GD font. The largest font that comes with gdlib is still small when viewed on the TV. Or I could rebuild gdlib with the TTF library...

Then I would probably modify the yac client to create the png and display it. Currently, my yac client calls a shell script, which creates a fly script and calls fly to render the png. Then the script calls my 'osd' script, which calls osdwriter to display the png, waits a number of seconds, then kills osdwriter and calls osdwriter again with a blank png (and then kills it again).

Third (ok, I don't count good), I could write a new 'text2osd' that emulates the one for series1. However, I don't know what the existing one does, or how it looks...

mmccurdy
10-24-2003, 11:36 AM
Do you overlay text only a transparent 720x480 image or can you place a smaller png at a specific offset in the window.

Do you get the shadowing effect on menus after displaying any image?

Must osdwriter be rerun with a transparent gif in order to remove your osd text?

Xybyre
10-24-2003, 12:09 PM
I'm not sure what you mean by your first question, but you can create any kind of image you want using the gd library (or any other means, really). There's no way to tell osdwriter to draw a smaller image where you want, but you can fake this by creating a 720x480 transparent image and drawing your smaller image on that.

You will get the shadow effect on menus until you 'clear' your image by drawing a blank image with osdwriter. This is why I use two calls to osdwriter: one to draw my image, and another to draw the blank image. You also need to kill the extra osdwriter processes that get spawned.

mmccurdy
10-24-2003, 01:04 PM
Without killall or awk, I haven't found a method for killing running osdwriter processes automatically.

I ran osdwriter on a 720x480 png from gimp. It looked good. I then killed it and ran my clear.png being a 720x480 fully transparent image. I killed osdwriter again. With this looking normal again, I hit the guide button and all ugly hell broke loose. The guide is shadowed about 10 pixels to the right. Rebooting isn't an option, so do you think this is because I did transparencies incorrectly on the clear png file?

Also post your packages used. fly, libpng, libgd? I haven't figured out the cross-compiling technique yet.

Xybyre
10-24-2003, 02:15 PM
You can get the pid using ps, grep, and cut, which you should already have on the tivo.

When you clear your image, use a 1x1 png. This should fix the problem you're seeing.

Fletch319
10-24-2003, 06:18 PM
Xybyre - First off EXCELLENT work. I know a lot of us on this board have been looking for a solution to the no text2osd problem for a long time. I think you have a great start and are very near a valid solution.


I have been playing around with your ideas for the past few nights. Please let us know if you need any help testing stuff as i'm sure others are eager to get a working solution and are willing to help out in any way we can.

Once you get what you feel is a decent solution it would be awesome if you could post any files/scripts you used to implement it. Although some of us can do the cross compiling ourselves many can not and posting those files would be very helpful also!

Keep up the good work!!!!!

mmccurdy
10-26-2003, 04:01 AM
I'm posting the mips files needed to run fly on Tivo series 2. Copying this to your Tivo and adding the appropriate LD_LIBRARY_PATH and regular PATH (for the fly binary) will get you the ability to create a PNG on the fly containing text, or whatever. I suggest moving "fly" to your binary directory for organizational reasons. Easily emulate the functionality of newtext2osd and callerid is at your fingertips.

http://poweredbysarcasm.com/mips/fly.tgz

Be gentle, it's my home website.

Reminder: "osdwrite <pngfilename> -share" will display your fly generated picture. The same command displaying a 1x1 pixel transparent png will return the original display. Don't forget to kill the osdwrite processes afterwards using:
kill `ps x | grep [o]sdwriter | cut -F' ' -f3`
(the [o] in there keeps the grep from being included in the kill list... little unix trick)
(test this without the kill to ensure I posted this from memory correctly. )

Have fun and share advances with Tivo hacks.

-Mark

TheWickedPriest
10-26-2003, 05:21 PM
Thanks Mark. A couple of points: "-F" is not recognized as a parameter for "cut"; I think you meant "-d". However, that method fails once more than a thousand processes have been run, since then there's only one leading space. Instead, I suggest taking the first five bytes via "-b". (I'm assuming that the process IDs cycle at 64K, so the field will never be longer than 5 characters; but I'm not sure if that's still true.) The leading spaces are ignored by "kill". (In fact, the whole "cut" command can be ommitted, and it will still work, though it will print error messages for everything after the number.)

Also, the "[o]" trick doesn't work reliably. (In fact, I'm not sure it works at all -- even without it, I sometimes didn't get the grep command in the results, and sometimes did.) What does work is to explicitly filter "grep" back out of the results.

So, my command line looks like this:

kill `ps x|grep osdwriter|grep -v grep|cut -b -5`

There's probably a better way to do it, but the above will always work.

BTW, how about the source for "fly"? Also, I think that package could be cut way down by linking against the standard libc, etc., that are already on the Tivo. Not to mention, what's libX11 doing in there? :-)

mmccurdy
10-26-2003, 10:30 PM
I haven't figured out how to staticly compile the libraries into the one fly binary, so from the previous message, I linked to my package of all required libraries. I edited the fly Makefile to suit my needs. If anyone sees a way to trim the library requirements, it will help in the long run.

On the topic of fly, without in-depth research, what's the command to make a truecolor png with an alpha channel. A previous message said this fixed the shadowing.....

I'm going to consider using Imagemagick instead of fly for run-time image manipulation. It's leaps beyond fly, but perhaps that will be why I don't want it. Speed is necessary for OSD's.

Good call on the kill command. I am so used to grep or killall that I hadn't used cut much.

http://poweredbysarcasm.com/mips/fly-2.0.0-mips.tgz

Mark

TheWickedPriest
10-27-2003, 03:58 AM
I tried osdwriting some non-fullscreen images, with interesting results: The image appeared twice, once in the upper left corner and once exactly centered onscreen. Then, when I went back to a menu, it appeared both in its normal location and in the window where the centered image had been. Presumably the same thing is happenning with 720x480 images -- and I can sometimes see them being drawn, and then jumping sideways a little -- which makes me wonder if 720x480 isn't quite the maximum size. I haven't tested that yet (nor have I tried transparent images), though I did try some much larger images, which weren't displayed, and just made the Tivo hang for a few seconds.

ronnythunder
10-27-2003, 11:34 AM
maybe i'm offbase here, but wouldn't it seem that osdwriter would be a fairly simple piece of code that could be substantially reverse engineered with strace and/or some disassembly? that might let us come up with a custom writer that we can control.

ronny

Fletch319
10-27-2003, 12:24 PM
First off disassembly is never easy. I have already done so. From my observations this program is only designed to display images so there doesn't seem to be any other way of controlling it to display what we want (besides what has been accomplished here so far).

The only real way to display text only would be to figure out how tivoapp does it and use that. But that will not be easy.

As I see it we almost have a viable caller id solution here. If YAC or elseed were modified to simply pipe text to a script that would call FLY (which would generate the png) then osdwriter to display the png/clear it then the script could kill the processes.

Of course all of this could be compiled into a new sort of text2osd for series2 but unfortunately that is a bit beyond my abilities at this point.

Feedback??

ronnythunder
10-27-2003, 02:10 PM
what i meant was: write our own so we can get rid of this forking buisness. it'd still just display pngs, i.e. the base function wouldn't change.

great work so far, though, guys...

ronny

Fletch319
10-27-2003, 03:05 PM
it would definately be possible but it seems like a lot more work than to just use the kill command with grep. Although an application without that problem would be better it may not be worth the effort.

Xybyre
10-27-2003, 03:12 PM
hey, it's great to see I'm not the only one working on this!

To create a truecolor image with an alpha channel, use gdImageCreateTrueColor(), then call gdImageSaveAlpha(img, 1). This fixes any display problems with osdwriter.

The only libraries needed by fly should be libfreetype.so.6, libgd.so.2, libjpeg.so.62, libpng.so.3, libpng12.so.0.1.2.5. That's what they are for mine, anyway (plus, this is from memory, so I could have missed something). Of course, libfreetype & libjpeg are not needed if you didn't build it into gdlib.

I also noticed a performance problem with using shell scripts & fly. I don't get the caller-id display until almost the third ring. I wrote a stand-alone program that uses gdlib to create my caller-id box, and it seems a little faster.

However, my yac client only receives a message for the first call. Subsequent calls aren't received. This is with the yac client from sunflowerhead.com. I verified this using 'yac -D' and the Yac listener test dialog on the Yac server. I didn't change any of the source code. Anybody else seeing this problem? If I restart yac, it will receive [only] the next call again.

mmccurdy
10-27-2003, 05:23 PM
My goal for myself is to roll all these libraries into fly itself staticly with altered code to make system calls to thereby emulate newtext2osd. Xybyre brought up a good point on how speed is of the essence. If this app only gets the data after the first ring, it may take an extra ring (or two) to display the message. By then, I can reach for my callerid phone...

Xybyre
10-27-2003, 06:33 PM
Keep in mind that staticly-linked programs take up a lot of memory and disk space. A static fly is around 2 MB (4MB if you include libc & libm), versus a dynamic one at 56 KB. It may make sense if you use rarely-used libraries that most people don't already have. However, they will take up much more memory, which the TiVo doesn't have much of. The TiVo would probably benefit from using shared libraries where possible, although I do understand your desire for an independent executable.

btw, I patched the yac client to work on my HDVR2. Apparently, it doesn't like it when the client shuts down the server socket and creates another one right away. I just re-used the same server socket instead of closing it and reopening it. dunno if anybody else is having this problem...

Now that everything is working for me, I will clean up the code and do a little more testing before I make it available to all.

zooloo
10-27-2003, 10:25 PM
Nice to see stuff happening with OSD, i put this aside awhile ago after getting limited responses to my original post on the subject back in June -

http://www.dealdatabase.com/forum/showthread.php?threadid=24865

and mainly because I was having some nasty memory problems, probably due to memory defrag, when running a number of the osdwriters followed by kills.

I noticed that sometimes memory would be allocated by osdwriter, and after the kills it wouldn't all be freed, eventually it would crash my hdvr2 with a nasty white-noise audio output.

Has anyone run into this yet?

-zooloo

mmccurdy
10-28-2003, 12:43 AM
I tested altering the image from 720x480 to something smaller that didn't create the shadow. The answer is 708x480. Here's my bash script that outputs the OSD using fly. No alpha channels, no truecolor needed. Fast enough to respond to callerid data.

It's not emulating newtext2osd yet, but here are the files that will get you goin. I've included as comments the true series1 file's arguments that will need to be emulated.

New bash shell script:
http://poweredbysarcasm.com/mips/newtext2osd

Repost:
5MB
http://poweredbysarcasm.com/mips/mips.tgz

160KB
http://poweredbysarcasm.com/mips/fly-2.0.0-mips.tgz

embeem
10-28-2003, 02:15 AM
1st: whoever keeps bitching about the screen module, knock it off; the screen module takes the text from the tivo screen and translates it into hyperlinks, nothing more and far from perfect. (try it sometime the tivo itself is in a menu)

2nd: using a png and osdwriter is kludge

Yeah it's cute and all, but time is far better spent reverse engineering the actual OSD than tweaking pngs.

That said, OSD on the series2 is quite different than that of the series1 and looks to be quite the pain in the ass. Access to the OSD is through the /dev/bcmgfx device, there are are a dozen or so different ioctl comands which need to be mapped out {AllocateSurface, InitSurface, CreateSubSurface. Display, unDisplay ... } -- in a word Ugh.

TheWickedPriest
10-28-2003, 03:52 AM
Originally posted by embeem
1st: whoever keeps bitching about the screen module, knock it off;No one was bitching about it; he just didn't get how it was supposed to work.


2nd: using a png and osdwriter is kludgeDuh. However, it works, and works now. When there's something better, that'll be great, but it's silly to say that we shouldn't start with the easy way just because it's a kludge.

mmccurdy
10-28-2003, 09:01 AM
Oh wow, we all thought osdwriter was as efficient as it gets since it requires converting text to an image then killing the app afterwards. Cut us some slack. If we had the rfc so-to-speak for OSD on a series 2, we'd be working that way. Until then, I want the easy fix.

If you can add details, we're all for it.

TheWickedPriest
10-31-2003, 11:48 PM
Originally posted by Xybyre
Next, I modified fly to create truecolor images with the alpha channel enabled (it currently only creates paletted images).Xybrye, could you please post your patches for fly to accomplish this? I get good images with the stock fly, until I enable transparency; then the palette is all screwed up. It works for white on black (= transparent), but nothing else. Using size 708x480 helps, but not enough.

Another useful mod might be to save the PNGs without compression; but that would have to be done in gdlib.


The largest font that comes with gdlib is still small when viewed on the TV.Yeah. It looks like these should be easy to build -- see gdfont*.c. The comments say they were created with "bdftogd". I found that; now to find some BDF fonts. :-) I do have one that's 11x19, a little bigger than "giant".


Or I could rebuild gdlib with the TTF library...It would be neat to be able to use the TT fonts already present, for a unified look.


Third (ok, I don't count good), I could write a new 'text2osd' that emulates the one for series1. However, I don't know what the existing one does, or how it looks... Me neither. Anybody got screenshots of this?

My very minor contribution: Here's my current modification of mmccurdy's newtext2osd:



#!/bin/bash
#
# Here are the original Series 1 newtext2osd arguments
# newtext2osd -s seconds -w file -f color -b color -d file
# newtext2osd -s seconds -f color -b color -x xpos -y ypos -t text

if [ ! -n "$2" ]; then
echo "Usage: newtext2osd \"<string to display>\" <length to display>"
exit;
fi

cd /var/tmp

text=$1
len=$[9 * ${#text}]
offset=$[(708 - $len) / 2]

cat <<EOF | fly -q -o tmp.png
new
size 708,480
type png
fill 0,0,0,0,0
frect $[$offset - 4],228,$[$offset + $len + 4],251,200,200,200
string 0,0,0,$offset,232,giant,$text
transparent 0,0,0
EOF

print tmp
sleep $2
clear


This puts the text inverted in a box in the center of the screen. It doesn't work quite like I first intended, because of the palette issues (I had to change the colors); but there are some points of interest: one less temp file created, and the centering scheme. This is probably about as far as I'd want to go with a shell script. :-) I'd do what you did and build directly on gdlib, but I don't have a cross-compiler set up right now.

Oh, and "print" is this separate script I made earlier:



osdwriter $1.png -share
kill `ps x|grep osdwriter|grep -v grep|cut -b -5`


while "clear" is this:



osdwriter /tvbin/nothing.png -share
kill `ps x|grep osdwriter|grep -v grep|cut -b -5`


I probably should integrate those, or at least "source" them instead of calling them.

TheWickedPriest
11-01-2003, 04:51 AM
OK, here are some bigger fonts I made for libgd and fly. These are taken from vga11x19.bdf, 10x20.pcf, and 12x24.pcf. Not tested on my Tivo since I still don't have the cross-compiler set up, but they work great on my x86 Linux box. Note: I'm using the latest gd, 2.0.15, rather than 1.8.4.

TheWickedPriest
11-03-2003, 06:54 AM
No takers, eh? Yet, that stupid "Almost there" screen I posted in another thread shows 35 downloads. Go figure...

Anyway, here's a small refinement to the script -- no more temp files:



#!/bin/bash

killosd() {
kill `ps x|grep osdwriter|grep -v grep|cut -b -5`
}

if [ ! -n "$2" ]; then
echo "Usage: newtext2osd \"<string to display>\" <length to display>"
exit;
fi

text=$1
len=$[9 * ${#text}]
offset=$[(708 - $len) / 2]

cat <<EOF | fly -q | osdwriter /proc/self/fd/0 -share
new
size 708,480
type png
fill 0,0,0,0,0
frect $[$offset - 4],228,$[$offset + $len + 4],251,200,200,200
string 0,0,0,$offset,232,giant,$text
transparent 0,0,0
EOF

killosd
sleep $2
osdwriter /tvbin/nothing.png -share
killosd

Xybyre
11-03-2003, 11:12 AM
TheWickedPriest, thanks for verifying the problem with indexed PNGs even at 708x480. I was seeing it too, but had not done enough testing to be sure. I had rewritten my yac client to create an indexed image, and couldn't see the black box around my white text.

Fly is easy enough to modify to create truecolor images. One of my previous posts listed the two functions needed. However, I'm in the middle of some modifications, so I can't create a usable patch right now. I'm modifying it to allow use of TrueType fonts.

I built a gdlib that supports TrueType fonts, and it works well with YAC to display an easily-readable caller-id box on the TV. However, yac seems slow at times, either because I'm using truecolor, or because I'm using TrueType fonts (or both). Sometimes I don't get the caller id box until after the third ring. I will try it again using your fonts, to see if it improves performance.

To anybody who wants to help me test this, please PM me.

thanks,
Xybyre

Xybyre
11-03-2003, 12:33 PM
Okay, I've found the cause of the performance problem. It is the saving of the true-color PNG file that is taking a long time.

It takes 2.6 seconds to create and save a true-color PNG file with an alpha channel. It takes 0.3 seconds to create and save an indexed PNG file. Just the saving part takes 2.5 seconds for the true-color PNG. Saving with no compression for the PNG does not seem to help.

I takes almost no time at all to create the image itself (0.1 seconds). Using a TrueType font adds about 0.2 seconds.

Looks like we are stuck with white-only for the caller id info unless we can figure out how to save the file faster...

mmccurdy
11-03-2003, 01:40 PM
Xybyre, please post your yac.c changes. I didn't see any external calls to newtext2osd like I expected to see in the source. I appreciate everyone's work on getting OSD working. Now if we can only do it like MyWorld does it!

TheWickedPriest
11-05-2003, 08:25 AM
Originally posted by Xybyre
It takes 2.6 seconds to create and save a true-color PNG file with an alpha channel. It takes 0.3 seconds to create and save an indexed PNG file. Just the saving part takes 2.5 seconds for the true-color PNG. Saving with no compression for the PNG does not seem to help.I've just been reading PNG: The Definitive Guide (http://www.libpng.org/pub/png/book/), and I think I've found the source of this: it's the "filtering" step, which is applied before zlib compression. It's not done in paletted images, only in truecolor. If we can turn that off, it might do the trick.

Xybyre
11-05-2003, 11:54 AM
Originally posted by TheWickedPriest
I've just been reading PNG: The Definitive Guide (http://www.libpng.org/pub/png/book/), and I think I've found the source of this: it's the "filtering" step, which is applied before zlib compression. It's not done in paletted images, only in truecolor. If we can turn that off, it might do the trick.

Excellent work! Disabling filtering in gdlib shaves off another second. Now it takes 1.6 seconds to save a truecolor png. Disabling compression saves another 0.10 seconds, so that doesn't make much of a difference (but we'll take what we can get).

A 1.3 second penalty for truecolor may be tolerable for most of us, but there may be more things we can do to optimize further. Do you have any other suggestions? In the meantime, I'll start reading through that book myself...

Also, I finally figured out why osdwriter forks! It needs to call setsid(). The setsid() man page states that the process must fork and call setsid() from the child process. That doesn't help with the hang problem, but now I know. :)

On a more interesting note, while I was tracing osdwriter, I discovered that it was hanging on the _newselect() function. I wrote my own select() to do an exit(0), put it in a shared library, and ran "LD_PRELOAD=select.so osdwriter myfile.png -share" (thanks to David Bought for this trick), and now osdwriter terminates without me having to kill it! (I also tried returning 0 and -1, but then select() got called in an infinite loop)

We are getting close to a usable solution now! :cool:

Xybyre
11-06-2003, 06:56 PM
After spending more hours on this, I have managed to optimize gdlib truecolor PNG saving to acceptable levels!

The conversion from gdlib's internal format to PNG image format went from 0.30 seconds to 0.15 seconds. Not too much of an improvement, but every bit helps.

The actual file saving went from 1.3 seconds to 0.3 seconds! Digging through the documentation, I found some functions for setting the libpng zlib compression options. Using no compression saved 0.2 seconds, but using the fastest compression setting saved 0.5 seconds. I also changed the compression memory level and window bit size, which helped a lot.

Long story short, yac now takes 0.5 seconds to display caller id info! Using a TrueType font adds about 0.2 seconds. I did try the fonts posted by TheWickedPriest, but they were too skinny, and didn't look good, IMHO.

I have a fly that can create true-color images and allows the use of TrueType fonts. The bad news is that stupid me did a "ln -s ../fly2/fly.c fly.c" in ./fly1, when ../fly2/fly.c was linked to ../fly1/fly.c. doh! Now my source code is gone. :( ./fly1 had my MIPs environment, and ./fly2 had my native linux environment. Argh!! why doesn't "ln" warn you?!! <sigh>

I'm pretty happy with what I have now, so I'll clean up the code (mostly removing debug statements) and post my binaries shortly.

mmccurdy
11-07-2003, 12:13 AM
Great work. I've been too swamped to really pour time into this for awhile. I'm left with a compiled elseed app that picks up and displays the caller id along with a working albeit inefficient fly-calling script. My problem is getting the binary to call the OSD script and avoiding a segmentation fault. blah!

Looking forward to your binaries and source, Xybyre.

Xybyre
11-10-2003, 12:41 PM
You can download my distribution package for libgd, yac, and fly at http://www.xybyre.net/tivo/

Installation and usage instructions are in the readme.txt.

libgd contains some speed optimizations. Specifically, filtering is disabled, PNG compression options have been tweaked, and pointer arithmetic was used to replace array element references.

yac has been modified to create true-color images with an alpha channel, and it calls "osd" to display the generated image.

"osd" is my shell script for displaying a PNG using osdwriter. It preloads a shared library to replace the select() function in osdwriter so that osdwriter quits instead of hanging.

"fly" has been modified to support the creation of truecolor images as well as TrueType fonts. fly is not needed by yac or any of its libraries. This is just thrown in as a bonus. :p

I'll post my source code patches later when I have some time.

Fletch319
11-10-2003, 03:38 PM
Let me be the first to congradulate you on your work! I know a lot of people have missed the text2osd on the series1. Although this may be an odd way to solve the issue it definately beats nothing. I do have one question. I know you need a YAC server to provide the callerid information. Can we use the tivo as the yac server as well? Although i never had a series 1 i believe that's what elseed was correct? Of course many of us have the phone lines disconnected so you would need to make a special cable described in other threads that prevents dialout but still allows callerid info in.

Can we adapt this solution so the tivo is the YAC server as well?

Thanks again for all your hard work Xybyre!

TiVoByte
11-10-2003, 05:27 PM
I have been testing this for a few days, all I can say is GREAT WORK. Once you have the caller ID habit, you really need your fix.
My S1 had yac running for quite some time.

Also, I'm not the sharpest knife in the drawer, Xybyre took the time to help me with my ineptness. Great guy. The distribution is dork (me) proof.

Fletch, I don't think server software was ever released for the Tivo. Don't you have at least one PC on all of the time that can act as the server? I can count 5 in my house that are on all of the time, not counting any test PC's.

Robert

P.S. YAC Rocks!

Fletch319
11-10-2003, 05:28 PM
yah i have 6 servers running right now. I was merely asking to see if it was an option. Not that i really planned on doing it myself.

TiVoByte
11-10-2003, 05:30 PM
Xybyre

Just a thought, you might want to change the title, or create a new thread Series 2 OSDWRITER and or YAC client.

Robert

tivomaster
11-10-2003, 06:30 PM
Thanks Xybyre. This works great..

Does anyone know where I can get a copy of the displaytext module for tivoweb? I would love to get it working with this new capability.....

Xybyre
11-10-2003, 06:53 PM
I am currently working on emulating newtext2osd. So far, it works great, except I don't have a wide mono-spaced font, plus I don't know what the colors are. Can someone PM me with the list of color numbers and their corresponding colors (RGB values would be great)?

The built-in giant font is kinda small, but you will be able to specify your own TrueType font (& specify a size) with my newtext2osd. If anyone happens to know of a good font to use for this, please let me know.

thanks,
Xybyre

TiVoByte
11-10-2003, 07:22 PM
Xybyre

I just tried Courier with YAC and it is monospaced. I always use this font when posting listings from telnet terminal sessions (we do this a lot at work) Make terminal session cut & past line up.

Robert

mmccurdy
11-11-2003, 01:07 AM
Using Xybyre's yac as is, I used an unaltered elseed source compiled for MIPS. I created /etc/elseed.conf containing only:
YacClient 127.0.0.1

Tada. server and client on the Tivo. No need for Windows (thank god). I'm a debian linux guy.

Using the Debian linux mips tree has been an easy way to get apps on the Tivo without compiling anything although I did compile fly, elseed, etc locally. Get the debian .deb file for mips at
ftp://ftp.debian.org/debian/pool/main/
**Don't get the latest version.** Tivo isn't running with the proper supporting libs by default. Uncompress the deb by using "ar x <filename.deb>" then remove debian* and control*. The remaining data.tgz will have the mips files to straight copy to Tivo.

TiVoByte
11-11-2003, 08:35 AM
Mmccurdy

Is there anything else that might be interesting to us in Debian distribution?

I admit I'm confused as to why anyone would want to plug their tivo into a phone line, I thought getting it unplugged was on of the main goals in hacking? I know some have modified cables so they can get caller ID without allowing the system to call out.

If all you run is Linux, why not put the elseed on your non-Tivo system?

Just wondering

Robert

TheWickedPriest
11-11-2003, 08:47 AM
Thanks Xybyre. The new version of fly is nice; I just have a few comments:

1. You added some new text output that isn't suppressed by fly's "-q" option. This breaks the use of stdout, which breaks piping to osdwriter (with /proc/self/fd/0). Piping is faster than writing a temp file, so it's very desirable to have "-q" working.

2. When not using a TrueType font, the text always comes out as the transparent color, regardless of the color specified for it. (This may only be in truecolor mode.) Only "string" is affected, AFAICT.

3. The "transparent" command seems no longer to work unless it appears before the specified color is used. I can see how this could arise as a consequence of truecolor, but it's different from the old version.

4. Is there any way to turn on anti-aliasing? I keep getting the message "antialiasing disabled" (one of those messages that isn't supressed by "-q"), but that's all I see about it. I think the original Tivo software is using it, as the text rendered by fly in the same font doesn't look quite as smooth.

Here's my latest tweak of that script... it prints shadowed text in FranklinGothicLight, which is the font the Tivo software uses for most things. I haven't adjusted the centering to compensate for the new (variable-width) font, but it's still fairly close. It's slow as hell, and still pretty limited; but anyway:



#!/bin/bash

#fname=ArialBlack
fname=FranklinGothicLight
#fname=Monaco
#fname=Verdana
font=/tvlib/font/$fname.ttf
fsize=20

killosd() {
kill `ps x|grep osdwriter|grep -v grep|cut -b -5`
}

if [ ! -n "$2" ]; then
echo "Usage: newtext2osd \"<string to display>\" <length to display>"
exit;
fi

text=$1
len=$[9 * ${#text}]
offset=$[(708 - $len) / 2]

cat <<EOF | fly -q -o /var/junk.png
new2
size 708,480
type png
transparent 1,1,1
fill 0,0,1,1,1
string 0,0,0,$[$offset + 2],234,$fsize.$font,$text
string 200,200,200,$offset,232,$fsize.$font,$text
EOF

osdwriter /var/junk.png -share
killosd
rm /var/junk.png
sleep $2
osdwriter /tvbin/nothing.png -share
killosd

mmccurdy
11-11-2003, 08:48 AM
Plug the phoneline into the Tivo for no dependencies on another machine.
The best thing is no phone line, yes, but if you run the program 31fixsub.tcl daily, it won't update your software on the calls.

I likes me some callerid! WOO!

TiVoByte
11-11-2003, 09:31 AM
WickedPriest. The readme.txt indicates that -a will disable anti-aliasing. Here are the rest of the options.

-t S set time CID info is on screen [default 5 seconds]
-s N set font size to N points [default 14] (only if yac.ttf is used)
-r N right_margin (in pixels) [default 40]
-b N bottom_margin (in pixels) [default 30]
-x N x-padding around text (in pixels) [default 10]
-y N y-padding around text (in pixels) [default 8]
-o N set background transparency to N [default 20]
0 (opaque) - 127 (transparent)
-a disable text anti-aliasing
-p P set port for yac to listen on [default 10629]
-D run yac in debug mode

Xybyre
11-11-2003, 11:03 AM
Originally posted by TheWickedPriest
Thanks Xybyre. The new version of fly is nice; I just have a few comments:

1. You added some new text output that isn't suppressed by fly's "-q" option. This breaks the use of stdout, which breaks piping to osdwriter (with /proc/self/fd/0). Piping is faster than writing a temp file, so it's very desirable to have "-q" working.

Sorry, I didn't think about that. fly was mainly just a testing tool for me. Unfortunately, my fly source got wiped out with a stray 'ln' command, so I won't be able to fix it any time soon. Come to think of it, one thing you can do to fix this is to use a hex editor and replace the beginning of the offending strings with a null character (00).


2. When not using a TrueType font, the text always comes out as the transparent color, regardless of the color specified for it. (This may only be in truecolor mode.) Only "string" is affected, AFAICT.

oops. This bug resulted from a fix for transparent text. See my response to #4 below...


3. The "transparent" command seems no longer to work unless it appears before the specified color is used. I can see how this could arise as a consequence of truecolor, but it's different from the old version.

Multiple colors may be transparent (or semi-transparent) in truecolor mode, and specifying a color to be transparent one time doesn't mean that color always has to be transparent. I _did_ consider this, however, so you may specify a transparent color by using -1,-1,-1 for the color. Unfortunately, it is fairly complicated to simulate the behavior of indexed images, since fly would have to go back and reprocess the input again, remembering the last transparent color in the input.



4. Is there any way to turn on anti-aliasing? I keep getting the message "antialiasing disabled" (one of those messages that isn't supressed by "-q"), but that's all I see about it. I think the original Tivo software is using it, as the text rendered by fly in the same font doesn't look quite as smooth.

One of the problems I was running into was using transparent text. Using anti-aliasing with transparent text would cause the text to not show up at all. That's why I disabled it. I made it an option in Yac, but didn't have a chance to update fly with the option.

TheWickedPriest
11-11-2003, 02:52 PM
Originally posted by TiVoByte
WickedPriest. The readme.txt indicates that -a will disable anti-aliasing.No, I was talking about fly, not yac. (I don't really care about yac, actually -- I don't even have caller ID.)

Xybyre
11-11-2003, 04:00 PM
Since some people have expressed interest in a Series2 elseed, I have built elseed 0.6.0 with my OSD routines. You will need to get my yac package first, and then extract http://www.xybyre.net/tivo/elseed.tgz to /var/hack/bin. I've replaced all of elseed's display options with the ones from yac. If you're interested, please try it out and send me some feedback via PM.

This should be a drop-in replacement for the existing elseed. The only changes are to the display routines. Display options (font size, caller id box position, etc) are the same as for yac, so refer to the readme.txt in the yac package.

warning: I have not tested this at all. My HDVR2 is not close to a phone jack, so it's not convenient for me to test this. However, if someone is kind enough to do the testing, I will create a separate elseed distribution package once it is confirmed to be working properly.

erhan
11-11-2003, 06:41 PM
It works!!!!

I just installed yac and elseed and it works right out of the box. I can see the called id on the lower right corner of the screen and the default font is perfectly acceptable. Works great.

Great job....

Erhan

erhan
11-11-2003, 06:43 PM
Just remembered something, perhaps not directly related to this but still a question.

What will happen if elseed is running and TiVo wants to make the daily call? Will it fail?

Juppers
11-12-2003, 12:19 AM
Are you planning on releasing the source changes you made to yac? I really want to remove the hard coded path for the blank.png

Xybyre
11-12-2003, 12:41 PM
elseed is confirmed to be working (thanks, Erhan!), so I have added it to my OSD package.

My patches for yac and elseed are now available. You can get them from http://www.xybyre.net/tivo/. Some of it's a little messy, but I figure I'd go ahead and post it or else I may never get around to it.

Although I'm still working on newtext2osd, the version I have is currently working as a drop-in replacement for the original newtext2osd. Some parameters are ignored, and new ones are added (to support TTF fonts, font size, disable anti-aliasing, etc.). It will automatically use /var/hack/home/osd.ttf if it exists, or you can use an option to specify any TTF file to use. btw, 15-point Courier New Bold is pretty close to the original font size.

You can check it out if you'd like: http://www.xybyre.net/tivo/newtext2osd.tgz. Comments and suggestions are welcome.

tivomaster
11-12-2003, 02:06 PM
Originally posted by Xybyre

Although I'm still working on newtext2osd, the version I have is currently working as a drop-in replacement for the original newtext2osd. Some parameters are ignored, and new ones are added (to support TTF fonts, font size, disable anti-aliasing, etc.). It will automatically use /var/hack/home/osd.ttf if it exists, or you can use an option to specify any TTF file to use. btw, 15-point Courier New Bold is pretty close to the original font size.

You can check it out if you'd like: http://www.xybyre.net/tivo/newtext2osd.tgz. Comments and suggestions are welcome.

I tried it and it works.
Pretty cool..

I had to set
export LD_LIBRARY_PATH=/var/hack/lib

How do I make this path stick short of putting it in my hackinit file and rebooting?

I would also dearly love to get ahold of a copy of the Display text via OSD module that Gary Davis wrote. However, the link that the tivoweb homepage points to (http://www.webguild.com/tivo/) is dead and has been dead for some time. Anyone have a copy archived?

[Edit]... Never mind on the display text tivoweb module. I got ahold of Gary and his site is back up... Now to see if I can get it working with Xybyre's newtext2osd....

David Bought
11-12-2003, 04:54 PM
Originally posted by tivomaster
How do I make this path stick short of putting it in my hackinit file and rebooting?

Don't exit the shell.

tivomaster
11-12-2003, 09:57 PM
Originally posted by David Bought
Don't exit the shell.

Thanks David, I kinda already figured that one out....

Is there any negative to setting the LD_LIBRARY_PATH in the hackinit or rc.sysinit etc. file?

From what I read the if I set the LD_LIBRARY_PATH in the startup script it would append that search path on the shared library calls all of the programs from then on. Would this be a bad thing? Or would it be better to write a shell script that does the path thing then calls newtext2osd then exits?

tivomaster
11-15-2003, 08:25 AM
Originally posted by Xybyre

Although I'm still working on newtext2osd, the version I have is currently working as a drop-in replacement for the original newtext2osd. Some parameters are ignored, and new ones are added (to support TTF fonts, font size, disable anti-aliasing, etc.). It will automatically use /var/hack/home/osd.ttf if it exists, or you can use an option to specify any TTF file to use. btw, 15-point Courier New Bold is pretty close to the original font size.

You can check it out if you'd like: http://www.xybyre.net/tivo/newtext2osd.tgz. Comments and suggestions are welcome.

xybre:
Any updates to newtext2osd? I am currently using it to feed Gary Davis's displaytext tivoweb module and it is working like a champ although there are several switches that the old one supports that yours doesn't. Do you plan on making it 100% compatible?

Xybyre
11-16-2003, 12:01 AM
I have posted a new set of binaries at http://www.xybyre.net/tivo/newtext2osd.tgz. It contains an updated newtext2osd, osd script, and jpegwriter. Please give me some feedback if you try them out.

I had to make some changes to the 'osd' script to support some of the Series1 newtext2osd options.

I also threw in jpegwriter (to display weather maps from Tivo Control Station). I've been using Tivo Control Station, and almost everything is working as expected. I get text pages on-screen, weather maps, etc. I may need to change the default time delay for newtext2osd to match the Series1 version. jpegwriter is also pretty slow (it has to convert from jpg to png).

Also, I still don't know what the Series1 newtext2osd colors are. Mine just uses white-on-black text.

didjit
11-16-2003, 07:44 AM
Are you running TCS on an HDVR2?

Didjit

Xybyre
11-16-2003, 10:13 AM
Originally posted by didjit
Are you running TCS on an HDVR2?

Yes. It didn't work out of the box, however. I kept getting segmentation faults until I commented out the "trap ignore 1" line in starttcs. Everything else seems to work, after editing the prefs file.

tivomaster
11-19-2003, 06:30 PM
I have noticed an anomoly with the newtext2osd version 1.1 whenever I execute the command I get the below posted in the kernal log....

Nov 19 23:38:02 (none) kernel: WARNING: Positioning surface at odd X coordinate: 359

Why?

Xybyre
11-21-2003, 10:30 AM
Originally posted by tivomaster
I have noticed an anomoly with the newtext2osd version 1.1 whenever I execute the command I get the below posted in the kernal log....

Nov 19 23:38:02 (none) kernel: WARNING: Positioning surface at odd X coordinate: 359

Why?

Sorry, I have not had time to look into this further. One thing I do know is that the message is not logged from newtext2osd or any of the other programs I have worked on. Another person reported the same warning with elseed.

I have searched all of my source trees and came up empty, so this message appears to be coming from one of the TiVo's programs/drivers.

I'll keep you updated if I find out anything else.

lazarus18
11-24-2003, 05:43 PM
Using the Debian linux mips tree has been an easy way to get apps on the Tivo without compiling anything although I did compile fly, elseed, etc locally. Get the debian .deb file for mips at
ftp://ftp.debian.org/debian/pool/main/
**Don't get the latest version.** Tivo isn't running with the proper supporting libs by default. Uncompress the deb by using "ar x <filename.deb>" then remove debian* and control*. The remaining data.tgz will have the mips files to straight copy to Tivo.

I did get elseed working, which is great. So thanks to all for that. But I had a question about the above. I know others may look down on me for it, but I have always preferred nano as my editor of choice. I tried the above method to get nano-tiny. When I try to run it I get :

bash-2.02# nano-tiny
nano-tiny: error while loading shared libraries: cannot open shared object file: cannot load shared object file: No such file or directory

Are there any additional steps required to this method of using Debain-MIPS or do some binaries work while others just won't?

-Rob

erhan
12-21-2003, 09:50 AM
For those of you on 4.0, elseed and yac causes the Tivo to hang after running 4-6 hours. I have now fully confirmed that the hangs are caused by elseed, even if there are no calls coming in. Since Xybyre never posted the source code of his yac code I cannot debug this. Besides I was never too happy with all the dynamic libraries loaded.

Oh well.

Xybyre
12-22-2003, 11:42 PM
I did post my source code patches to all of the open-source code that I've modified (yac, elseed, openSSH). They've been available on my web site for quite a while (although a separate download from the binaries); I posted an announcement in this thread when I put them up.

Feel free to recompile them as static executables if you prefer. However, static executables are ~2MB each, which is why I used dynamic libraries.

Regarding the hang, I'd be interested to know if the same thing happens when you use the unmodified elseed. This would at least isolate the problem. However, since this problem still happens when there are no incoming calls, I would suspect the problem to lie in the original code. I only made changes to the OSD routines.

erhan
12-23-2003, 01:01 PM
Thanks Xybyre, didn't realize the source code was there.


Regarding the hang, I'd be interested to know if the same thing happens when you use the unmodified elseed
Also thinking along the same lines, I now recompiled elseed 0.6 with all OSD calls commented out (only logging the call) and will test it tonight.

erhan
12-25-2003, 03:48 PM
Turns out the hangs had nothing to do with the OSD stuff Xybyre added in. My guess is that there was already some bug, but versions before 4.0 tolerated it.

In any case, I tracked the problem down to the part where elseed waits on the modem for 60 seconds and loops repeatedly. Perhaps something goes bad with the repeated select() calls, who knows. I changed it so that it now waits until there is a call, displays the caller id and exits (using -e). This hopefully releases the device, memory, etc. Then restart it in a shell script after about 5 seconds.

So far, it seems to be working.

hp2003
12-27-2003, 10:30 AM
Will the Elseed 0.6.0 from Xybyre work on a DSR7000???

I downloaded and installed on my Tivo and it gave me - Cannot execute binary file. I unzip and transferred again making sure I did it binary. But, same error.


Thanks in advance.

Disco
12-31-2003, 01:51 AM
Will the Elseed 0.6.0 from Xybyre work on a DSR7000???

I downloaded and installed on my Tivo and it gave me - Cannot execute binary file. I unzip and transferred again making sure I did it binary. But, same error.


Thanks in advance.

Elseed on DSR7000 w/3.1.1b works fine...
I'm using sleeper's ISO, visited http://www.xybyre.net/tivo/
clicked on "S2 OSD tools" link to download the file, decompressed file in
/var/hack and read the included readme.txt file and looked over an elseed
readme file (not included in the pkg) to get it going. Works fine on my
DSR7000 w/3.1.1b.

hp2003
12-31-2003, 06:25 AM
Elseed on DSR7000 w/3.1.1b works fine...
I'm using sleeper's ISO, visited http://www.xybyre.net/tivo/
clicked on "S2 OSD tools" link to download the file, decompressed file in
/var/hack and read the included readme.txt file and looked over an elseed
readme file (not included in the pkg) to get it going. Works fine on my
DSR7000 w/3.1.1b.

Disco Thanks for your help. I got elseed to run, but couldn't see the caller id on the tv screen. Is there something else to do other than just running elseed. Do you add the elseed to your rc.sysinit.author to run everytime, or what do you do to make it run all the time.

Thanks

Disco
12-31-2003, 05:16 PM
Disco Thanks for your help. I got elseed to run, but couldn't see the caller id on the tv screen. Is there something else to do other than just running elseed. Do you add the elseed to your rc.sysinit.author to run everytime, or what do you do to make it run all the time.

Thanks

So far it works fine from the command line while I'm telneted into the dtivo... so while in /var/hack/bin execute it with ./elseed -D and hit enter and observe the debug messages on the screen to see what's happening, you should see modem init and return OK, you should see ring messages, etc.

I don't have it working from my start-up script however... if anyone has successfully kicked elseed off into the background with something like this line please let me know:
/var/hack/bin/elseed &
as far as I can tell from ps -e output elseed is running in the background, but it is not logging calls or showing caller ID graphic on the screen, so it is in some 'zombie' state. Same behavior occurs when kicked off into the background from the command line.

Any assistance would be appreciated!

hp2003
12-31-2003, 05:36 PM
Disco,

I have run it from the command line also, I get Modem OK, and then it shows rings but nothing on the screen.

I just haven't tried the debug mode yet, but I will.

Thanks

DocTauri
12-31-2003, 05:51 PM
This is one of the big things that's kept me from going to all S2 DTivos (this and HMO, which appears to be coming along pretty good too!)

Now, I got elseed installed and running (HDVR2), it shows the CID info in the lower right corner, but I'd like to see it at the top, centered (ala elseed's default on my S1's). So, not sure which option to set, I did elseed -r 40 -b 30 -x 10 -y 8 -e (S1 elseed defaults), but then it wouldn't display any info on the screen. On closer examination, there was an error on the box that read:
/var/hack/bin/osd: osdwriter not found

What am I missing (obviously osdwriter?)

Also, has anyone gotten larger fonts working?

Thanks for the help, and for the hard work!
Doc

Disco
12-31-2003, 06:59 PM
Disco,

I have run it from the command line also, I get Modem OK, and then it shows rings but nothing on the screen.

I just haven't tried the debug mode yet, but I will.

Thanks

Be sure that your library environment variable is set:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib

See if this does the trick to get it to display the caller ID image on the screen.

michaelt
01-01-2004, 12:30 AM
Anyone had any luck with TCS on 4.0 (+) ?

Bushido
01-01-2004, 04:04 AM
Sorry for jumping in late and sounding n00bish, but now that I've Monte'd my HDVR2, got my USB ethernet adapter and got the latest version of TivoWeb installed and running, I'd like to see how I can manipulate some text on my DTivo. I tried to send some mail to myself with TivoWeb's "send mail" feature, but it only works when I go to the DirecTV Central screen.

I've looked at the beginning of this thread, but wanted to see how someone from scratch can get the basics up and running. I don't care for the YAC/Caller ID feature, as I don't have that on my telephone anyway. But, what do I need exactly, where do I install it, what do I need to change, and how do I get up and running?

Kudos to everyone involved. My goal is to send a message remotely while my wife is watching her soaps to bring me a beer upstairs when I need one. I(Just kidding!)

erhan
01-01-2004, 09:48 AM
It's actually pretty easy. Download the s2osd tools from xybyre's site (http://www.xybyre.net/tivo/), extract them to /var/hack (location is important), then you're all set.

You will need to set your PATH and LD_LIBRARY_PATH as such:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib
PATH=$PATH:/var/hack/bin
export LD_LIBRARY_PATH PATH
then try the various tools in /var/hack/bin. For example newtext2osd will display the text on your screen. Almost all tools will respond to -h flag and will show you the command line arguments.

For the beer situation, may I suggest the use of yac client? If you install yac server on your PC it will not only display the caller id (of course, PC must be plugged in to the phone line) but you can also send messages from the yac server.

tivomaster
01-01-2004, 10:20 AM
Although I'm still working on newtext2osd, the version I have is currently working as a drop-in replacement for the original newtext2osd. Some parameters are ignored, and new ones are added (to support TTF fonts, font size, disable anti-aliasing, etc.). It will automatically use /var/hack/home/osd.ttf if it exists, or you can use an option to specify any TTF file to use. btw, 15-point Courier New Bold is pretty close to the original font size.

You can check it out if you'd like: http://www.xybyre.net/tivo/newtext2osd.tgz. Comments and suggestions are welcome.

Xybyre, Are you going to release the source to newtext2osd?

Disco
01-01-2004, 02:57 PM
So far it works fine from the command line while I'm telneted into the dtivo... so while in /var/hack/bin execute it with ./elseed -D and hit enter and observe the debug messages on the screen to see what's happening, you should see modem init and return OK, you should see ring messages, etc.

I don't have it working from my start-up script however... if anyone has successfully kicked elseed off into the background with something like this line please let me know:
/var/hack/bin/elseed &
as far as I can tell from ps -e output elseed is running in the background, but it is not logging calls or showing caller ID graphic on the screen, so it is in some 'zombie' state. Same behavior occurs when kicked off into the background from the command line.

Any assistance would be appreciated!

Not the most elegant solution to this problem but it works to kick off elseed from the startup script:

(1) in /etc/rc.d/rc.sysinit.author ensure that you have these lines, at the bottom of the file BUT above the sleep 300 line (if you have one):
# adding elseed support
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib
cd /var/hack/bin
/var/hack/bin/elseed.sh &

(2) create a new file /var/hack/bin/elseed.sh with the following content (not optimized content... just a quick edit of another file on my part so you can reduce it down to your liking):
#!/bin/bash
#Enviroment Variables
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/modules
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib
export TERM=xterm
export PS1='\h:\w$ '
cd /var/hack/bin
/var/hack/bin/elseed

(3) ensure this script is executable with:
chmod 755 elseed.sh

(4) restart your dtivo
/sbin/restart

(5) test it out by calling your # after complete reboot and when you're viewing a channel, should see the caller ID pop-up.

Disco
01-03-2004, 01:37 AM
Not the most elegant solution to this problem but it works to kick off elseed from the startup script:

(1) in /etc/rc.d/rc.sysinit.author ensure that you have these lines, at the bottom of the file BUT above the sleep 300 line (if you have one):
# adding elseed support
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib
cd /var/hack/bin
/var/hack/bin/elseed.sh &

(2) create a new file /var/hack/bin/elseed.sh with the following content (not optimized content... just a quick edit of another file on my part so you can reduce it down to your liking):
#!/bin/bash
#Enviroment Variables
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/modules
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib
export TERM=xterm
export PS1='\h:\w$ '
cd /var/hack/bin
/var/hack/bin/elseed

(3) ensure this script is executable with:
chmod 755 elseed.sh

(4) restart your dtivo
/sbin/restart

(5) test it out by calling your # after complete reboot and when you're viewing a channel, should see the caller ID pop-up.

I'm up and running with the above, but if you want to try a quick solution (untested by me, but should work in theory), use the nohup command on the elseed exec line rc.sysinit.author:

nohup /var/hack/bin/elseed &

and forget about elseed.sh! Post back here if it works or not.

Now on to getting a perl yac client going on my linux box to send caller id messages to my cell phone.... (will look at yac_mail.pl).

roberton
03-22-2004, 02:32 AM
great, i got elseed working now! thanks a lot Xybyre and all for your comments and work.
Is there any way of show CC on a serie2 tivo (tivovbi)?

thepurpledino
03-23-2004, 02:07 PM
Thanks to Xybyre..

I just couldn't get the elseed binaries to work on my hdvr2..

Downloaded the tools built by Xybyre.. working in 5 minutes..

I have it running manually.. I want to make sure my unit stays stable.. in a few days, I'll add it to my rc.sysinit.author for automation!

Thanks alot!

roberton
03-23-2004, 02:16 PM
i find the at commands for the Si2433 modem chip that is on my HVR2, and add the CDI type to always listen to CID info (+VCDT=1) instead of default: listen cdi info after first ring (+VCDT=0), so i run it:

# elseed -D -n -i 'AT+VCDT=1;+VCID=1' &

and got the cid screen pop up almost before the phone rings, the question is?

1- will that be a problem with the tivo or any program funcionability?
2- is there any way to change the font type like the change font size feature?



ps. i use -n becouse my cid service doesnt send name info.

roberton
03-23-2004, 06:05 PM
mmmm, i restarted the tivo and i cant get the cid info any more.

lgkahn
03-27-2004, 09:34 AM
got this working... easiest is just to add the two enviornment variables to the 2 already in your rc.sysinit.author and add the call to the elseed in the same file bfore the sleep... thanks a million....

lgkahn
04-06-2004, 11:06 PM
I noticed the web module for this did not support the font sizes correctly or did not have support for the 4 ttf fonts on my dtivo series 2..
so I added a pulldown to the web itcl module for the 4 fonts on my box and also now the size works correctly... don't know if this will work for s1 boxes the fonts have to be in the same location /tvlib/font and have the same names

enjoy

this module goes in /var/local/tivoweb-tcl/modules and make sure to chmod 755 it

let me know how it goes

updated wrong file was uploaded

hdvr_too
04-07-2004, 10:33 PM
I have run newtext2osd in debug mode and keep getting:

sh: /var/hack/bin/osd: No such file or directory

Now i know that the osd is there with permissions set so what am I doing wrong? Also I set up my PATH and LD_LIBRARY_PATH to /var/hack/bin and /var/hack/lib respectively. I am very close to getting this but stumped on this error. Any ideas?

sanderton
04-08-2004, 05:38 AM
It's not telling you that it can't find /var/hack/bin/osd but that /var/hack/bin/osd is running and it can't find some file it's trying to call.

I'm not familiar with that file, but you most often see this when an executable script had been transferred from a PC in text mode or edited on a PC and bash chokes on the initial #!/bin/bash beacuse it reads it as #!bin/bashM

hdvr_too
04-08-2004, 09:47 AM
THANK YOU!
I was working on this for hours, but with limited knowledge I was stumped! It turns out that Xybyre's osd was in fact in winows text format. I used edit pad pro and converted it to unix and BINGO!. Thanks again Sanderton.

HDVR_too

evilecho
05-24-2004, 11:43 AM
EXCELLENT! work and detail from you all here! I read, downloaded and configed from all the great posts in this thread and got elseed working first try.

:cool:

This was the one thing I missed on my dvr40.

...now to conquer the world....

SteveT
05-24-2004, 09:38 PM
...so I added a pulldown to the web itcl module for the 4 fonts on my box and also now the size works correctly... I copied this into modules and got the displaytext option in TivoWebPlus. It works, but I don't see any drop-down for fonts. The date of the .itcl is 9/19/2003. Am I running the right file? Do I need to do something else?

lgkahn
05-25-2004, 09:01 AM
Nope I uploaded the wrong file ... amazing no one mentioned it before now...

try downloading it now....

SteveT
05-25-2004, 07:52 PM
Nope I uploaded the wrong file ... amazing no one mentioned it before now...

try downloading it now....The new one works as advertised. Thanks!

robr
07-29-2004, 10:51 AM
i have elseed running on an hdvr2 and have a question. it WAS working fine, then my /var directory got cleaned out. i reinstalled everything to /usr to avoid that, but now for some reason elseed is not picking up caller ID info. I'm running it in debug and when a call comes in, it detects the ringing, but no longer picks up the CID. CID is working on my phone line (it shows up on my CID enabled phones). I'm wondering what might be wrong. Any thoughts appreciated. Thanks!

tivo:/usr/elseed/bin$ export LD_LIBRARY_PATH=/usr/elseed/lib
tivo:/usr/elseed/bin$ elseed
Initializing modem...
Modem: OK


Modem: RING
Modem: RING
Modem: RING
Modem: RING
Modem: RING
Modem: RING
Modem: RING
Modem: RING

[1] Killed tserver (wd: /usr/tserver)
(wd now: /usr/elseed/bin)
(wd now: /usr/elseed/bin)

[3]+ Stopped elseed
tivo:/usr/elseed/bin$
tivo:/usr/elseed/bin$
tivo:/usr/elseed/bin$
tivo:/usr/elseed/bin$ elseed -D -n -i 'AT+VCDT=1;+VCID=1' &
[4] 553
tivo:/usr/elseed/bin$ No conf file found at /etc/elseed.conf
Initializing modem...
DEBUG: AT+VCDT=1;+VCID=1
DEBUG:
DEBUG: OK
Modem: OK
DEBUG:
DEBUG: RING
Modem: RING
DEBUG:
DEBUG: RING
Modem: RING
DEBUG:
DEBUG: RING
Modem: RING
DEBUG:
DEBUG: RING
Modem: RING

tivo:/usr/elseed/bin$ ls
elseed fly osd yac
tivo:/usr/elseed/bin$ cd ..
tivo:/usr/elseed$ ls
bin home lib readme.txt s2osd_1.0.tgz
tivo:/usr/elseed$ ls home
blank.png
tivo:/usr/elseed$ DEBUG:
DEBUG: RING
Modem: RING
DEBUG:
DEBUG: RING
Modem: RING
Tivo's making a call, won't step on his toes
Restarting...
Initializing modem...
DEBUG: AT+VCDT=1;+VCID=1
DEBUG:
DEBUG: OK
Modem: OK
DEBUG:
DEBUG: RING
Modem: RING
DEBUG:
DEBUG:
DEBUG: RING
Modem: RING
DEBUG:
DEBUG: RING
Modem: RING

Xybyre
07-29-2004, 11:47 AM
Did you include the directory containing the OSD libraries in LD_LIBRARY_PATH? Are the OSD programs in the PATH (/usr/elseed/bin, in your case)?

Also, the OSD script is hard-coded to use /var/hack/home/blank.png. You can change this by editing the osd script (/var/hack/bin/osd). Custom fonts are also expected in /var/hack/home (e.g. yac.ttf).

Or you can just "ln -s /usr/whatever /var/hack" and do everything you did before. Since /var/hack is only a link, your real files in /usr/whatever will never get deleted.

robr
07-29-2004, 02:18 PM
Did you include the directory containing the OSD libraries in LD_LIBRARY_PATH? Are the OSD programs in the PATH (/usr/elseed/bin, in your case)?

The path I set was /usr/elseed/lib - everything looks ok there:
tivo:/usr/elseed/bin$ export LD_LIBRARY_PATH=/usr/elseed/lib

tivo:/usr/elseed/lib$ ls
libfreetype.so.6 libgcc_s.so.1 libgd.so.2 libjpeg.so.62 libpng.so.3 select.so

Are you saying I should also add /usr/elseed/bin to the path as well?


Also, the OSD script is hard-coded to use /var/hack/home/blank.png. You can change this by editing the osd script (/var/hack/bin/osd). Custom fonts are also expected in /var/hack/home (e.g. yac.ttf).

I'm just using the default font, I haven't played with custom fonts yet. Thanks for the pointer on blank.png. I just changed this in the script. I don't think this would cause what I'm seeing though, right? This might present a problem with the OSD, but still elseed should write the CID info out with the modem ring detect messages.


Or you can just "ln -s /usr/whatever /var/hack" and do everything you did before. Since /var/hack is only a link, your real files in /usr/whatever will never get deleted.

singe606
10-02-2004, 12:51 PM
trying to get yac working... seems to be something wrong with the OSD part.

Debug shows it's almost working, call info recieved, the png is getting written successfully (and i viewed it, it's corrrect). Nothing is displayed on the tv.

tivo:/var/hack/bin$ yac -D
Initializing network connection...
Listening on port 10629...
Client connected. Reading data from connected socket...
Closing network connection to client.
The received data was Caller ID information.
Formating text for the TiVo on-screen display...
Displaying on TiVo:
YAC Test Call (425) 555-1212
rendering png...
cpu time to create image: 0.020000
cpu time to create & save image: 0.610000
png will be moved to yac.png
Listening on port 10629...
Signal caught; preparing to quit... (signo = 2)
Currently port listening, quitting from signal code.
End of the line. Come debugging again real soon now, ya' hear?

In the kernel log, i see this:
Oct 2 16:40:44 (none) kernel: WARNING: Positioning surface at odd X coordinate: 359

Any ideas? I'm running 4.0.1b-02-2-240 on an HDVR2.

Xybyre
10-04-2004, 10:19 AM
trying to get yac working... seems to be something wrong with the OSD part.

Debug shows it's almost working, call info recieved, the png is getting written successfully (and i viewed it, it's corrrect). Nothing is displayed on the tv.

...

Any ideas? I'm running 4.0.1b-02-2-240 on an HDVR2.
What happens when you run 'osd yac.png'? That's the command that is being run to display the caller id info. Try running 'osd' to display any png you have lying around. Once you get that working, yac should properly display caller id info.

btw, native S2 OSD libraries have been developed. My OSD package is obsolete. You may want to use the newer programs, since they are considerably faster... Here is the thread: http://www.dealdatabase.com/forum/showthread.php?t=34159