PDA

View Full Version : Series 3 caller ID: NCID


Narf54321
02-01-2007, 02:54 PM
Important Note: This requires a hacked S3 unit. Go see the PROM mod thread in the S3 dev forum for more info about all that.

The Tivo is a great platform for a caller-ID server. It has a built-in modem, networkable, and it is always on.

I've gotten John L. Chmielewski's (jlc (http://dealdatabase.com/forum/member.php?u=237)) quite excellent TivoNCID (http://sourceforge.net/project/showfiles.php?group_id=80586) (MIPS) working on my Series-3 Tivo box. I've been running it for a couple days on my S3 (system v8.0.1c) and it has been working well.

Tivo Series-3 has its modem on /dev/ttyS3, also available on /dev/modem (cua3).

You need a few things to make TivoNCID work on an S3:

ncidd server - Part of TivoNCID (http://downloads.sourceforge.net/ncid/ncid-0.67-series2-tivo.tgz?modtime=1165017326&big_mirror=0) for Series-2 MIPS (v0.67 as of this writing)
tivoncid client (also part of TivoNCID MIPS package)
uni2osd script (http://dealdatabase.com/forum/showpost.php?p=259675&postcount=1) from Hichhiker found here on DDB
AlphaWolf's All-in-One Utilities (http://www.dealdatabase.com/forum/showthread.php?t=37602) for MIPS (hopefully already installed).


(Make sure your All-in-One Utilities (tivotools) are installed and working.)

The ncid-0.67-series2-tivo.tgz package likes to install on /var, so I suggest putting it there until you're happy with its operation. Upload it to your hacked S3 into /var. Then unpack:

My_S3_Tivo# tar -zxvf ncid-0.67-series2-tivo.tgz -C /var


It will create several layers of directories under /var/hack and install all the NCID binary files.

NCID Server
Edit /var/hack/etc/ncid/ncidd.conf configuration file. Near the bottom of the file are some of the configuration settings. Specifically change the ttyport setting:

#################
# TiVo Settings #
#################
set ttyclocal = 1 # TiVo requires CLOCAL
# set ttyport = /dev/ttyS1 # TiVo Modem Port <-comment out or delete
set lockfile = /var/tmp/modemlock # needed for TiVo Modem Port

set verbose = 3
set port = 3333
set cidlog = /var/log/cidcall.log
set datalog = /var/log/ciddata.log
set ttyport = /dev/modem # S3 Modem Port



Create the log files, since ncidd won't do it itself (this is optional).

My_S3_Tivo# touch /var/log/cidcall.log
My_S3_Tivo# touch /var/log/ciddata.log


Now run the ncidd service on the Tivo (use -D for debugging):


My_S3_Tivo# /var/hack/sbin/ncidd &


This should get the server part working, taking and recording logs of incoming calls. Client setup follows.

Narf54321
02-01-2007, 02:56 PM
The NCID client software is what actually shows incoming Caller ID on the screen. For the S3 Tivo at the moment you pretty much need to use Tivo's included text2osd utility.

You don't need the ncidd server running on the same machine to use the client. If you have multiple Tivos (or even PCs) you can use the "main CID server" to Collect caller ID info and run just the client software on each.

Once you've unpacked the ncid-0.67-series2-tivo.tgz package into /var/hack you need to copy over Hichhiker's uni2osd script into /var/hack/bin. I had a problem when unpacking the script (from the zip file) with line-endings, so you should run dos2unix on it to make sure it strips any extraneous carriage-returns.

Unfortunately, out2osd doesn't yet work on the S3 with v8 software. Move the original out2osd program to a new name (such as 'original_out2osd') and make a symlink from out2osd to uni2osd.

(dos2unix is part of AlphaWolf's All-in-One Utilities.)

My_S3_Tivo# cd /var/hack/bin
My_S3_Tivo# dos2unix uni2osd
My_S3_Tivo# chmod a+x uni2osd
My_S3_Tivo# mv out2osd original_out2osd
My_S3_Tivo# ln -s uni2osd out2osd


Edit the uni2osd so that OUTPUT is forced to text2osd


### OUTPUT which software to use as output program
OUTPUT=text2osd


Also be sure to add the directory/var/hack/bin to your PATH statement in your /etc/rc.d/rc.sysinit.author file, or the tivoncid client seems to fail after awhile.

Now run the tivoncid client and enjoy Caller-ID info on your TV screen.


My_S3_Tivo# /var/hack/bin/tivocid &


Check the /var/log files for troubleshooting, and edit friends and family phone numbers in the /var/hack/etc/ncid/ncidd.alias file. There are lots of good instructions and information in /var/hack/doc/ncid.

You can also set up just this client on other Tivos and to get Caller-ID.

My_Other_Tivo# /var/hack/bin/tivocid <ip.of.server.address> &

jlc
02-08-2007, 01:24 AM
Thank you Narf54321 for the great description of installing and running NCID on the Series 3. You did a much better job than the documentation for its usage. However, your description on setting up the client should use the name tivocid instead of tivoncid. The confusion in names is my fault.

The tivocid client is an alias for ncid, it sets the proper options and uses out2osd as the display module. When out2osd broke on a series 2 OS release, a user wrote uni2osd so it could be used as you describe. This was a good idea so a module called ncid-tivo, which uses text2osd to display text, was developed, as insurance, in case out2osd broke again.

The tivoncid client is another ncid alias. It sets the proper options but calls ncid-tivo, not out2osd as the display module. Options are set in ncidscript.conf. The tivoncid client was first included in the 0.66 release.

Narf54321
02-08-2007, 04:09 PM
The tivocid client is an alias for ncid, it sets the proper options and uses out2osd as the display module. When out2osd broke on a series 2 OS release, a user wrote uni2osd so it could be used as you describe. This was a good idea so a module called ncid-tivo, which uses text2osd to display text, was developed, as insurance, in case out2osd broke again.

The tivoncid client is another ncid alias. It sets the proper options but calls ncid-tivo, not out2osd as the display module. Options are set in ncidscript.conf. The tivoncid client was first included in the 0.66 release.

Thanks for the response, jlc. The main reason I spent time during those instructions for uni2osd was that the INSTALL-TiVo docs briefly mention tivoncid using Tivo's built-in text2osd utility but for some reason wasn't reliable on my setup. I'll have to look through ncidscript.conf.

It is also unreliable if you don't have the rc.sysinit.author PATH environment variable set to the ncid directory (usually /var/hack/bin ). Just setting it at your telnet prompt isn't enough, as it stops working once you log out.

I'll certainly willing to change the instructionsto tivocid, but I have gotten it working in the fashion described and I'd want to personally do a little testing to avoid unexpected glitches.

EDIT: Okay, I tried it with the tivocid utility instead of tivoncid and it bombs out. I had moved uni2osd back to my tivotools directory with a symlink called out2osd but it didn't work.

EDIT: Copying uni2osd back to the /var/hack/bin folder and re-symlinking it fixed the problem. I still want to give it a couple of days to make sure its all working proper and doesn't go zombie on me or anything.

jlc
02-08-2007, 05:39 PM
Thanks for the response, jlc. The main reason I spent time during those instructions for uni2osd was that the INSTALL-TiVo docs briefly mention tivoncid using Tivo's built-in text2osd utility but for some reason wasn't reliable on my setup. I'll have to look through ncidscript.conf.

TiVoNCID should call ncid-tivo, and it in turn calls /tvbin/text2osd, changeable in ncidscript.conf. If you find the problem and make any fixes, they will be incorporated in the next release.

It is also unreliable if you don't have the rc.sysinit.author PATH environment variable set to the ncid directory (usually /var/hack/bin ). Just setting it at your telnet prompt isn't enough, as it stops working once you log out.

Yes, it needs to be set from sysinit. I usually set the path to include /var/hack/bin and /var/hack/sbin in /var/hack/etc/rc.hack which is called from rc.sysinit.author using this line:[ -x /var/hack/etc/rc.hack ] && /var/hack/etc/rc.hack
I am thinking of changing the NCID location to /opt or /usr/local instead of /var/hack. This would be compatible with the rest of the world.

I'll certainly willing to change the instructionsto tivocid, but I have gotten it working in the fashion described and I'd want to personally do a little testing to avoid unexpected glitches.

I firmly believe in testing so I agree. Take a look at the begining of ncid. Both tivocid and tivoncid are aliases and just set options. The running code is the same. Be warned, ncid code is tricky. The same script can be executed by shell, tcl, and tk.

EDIT: Okay, I tried it with the tivocid utility instead of tivoncid and it bombs out. I had moved uni2osd back to my tivotools directory with a symlink called out2osd but it didn't work.

EDIT: Copying uni2osd back to the /var/hack/bin folder and re-symlinking it fixed the problem. I still want to give it a couple of days to make sure its all working proper and doesn't go zombie on me or anything.

Narf54321
02-13-2007, 11:25 AM
Okay, I've been running a few days with the call to tivocid instread of tivoncid and I'm happy with it, so I've edited the original client instructions to use tivocid.

Great piece of work jlc!

Soapm
08-04-2007, 03:30 PM
The ncid-0.67-series2-tivo.tgz package likes to install on /var, so I suggest putting it there until you're happy with its operation. Upload it to your hacked S3 into /var. Then unpack:.

Thanks a ton.

I used these instructions on a S2 649DT and they worked perfectly to the letter.

I keep all my hacks out of the var directory. How do I move the application now that I have this working from the var directory?

Can I just move the files to the directory of my choice then rereun all the below steps except using the new location?

I am sure you moved yours, how did you do it?

jlc
08-04-2007, 05:50 PM
I keep all my hacks out of the var directory. How do I move the application now that I have this working from the var directory?
You need to move /var/hack and rename it to ncid. then you need to set up a symbolic link to point to it.

For example, if you want to move it to /opt/ncid then you would do:

mv /var/hack /opt/ncid
ln -s /opt/ncid /var/hack

Soapm
08-05-2007, 05:04 PM
One little quirk I noticed on my 649 S2 DT

The screen goes blank after the caller id stops displaying

ex.. If I am on the screen that says now playing list etc... Caller id will come on and when I answer the phone the menu will be missing from the screen. once I hit a button to change menu it all comes back but I did notice this. It doesn't do this on movies, just Tivo menues.

I also noticed I seem to have two menues imposed together on most screens. When I change screens there appears to be one menu that flys off to the right but you can see the menu still there. The second one just dissappears???

I knew those drugs from the 70's would catch up to me someday...

jt1134
08-05-2007, 05:12 PM
I knew those drugs from the 70's would catch up to me someday...

I thought the same thing ;) But it happens on my assortment of S2 tivos too with certain osd applications.

Soapm
08-05-2007, 06:35 PM
You need to move /var/hack and rename it to ncid. then you need to set up a symbolic link to point to it.

For example, if you want to move it to /opt/ncid then you would do:

mv /var/hack /opt/ncid
ln -s /opt/ncid /var/hack


Any thoughts on moving that directory?

FamRoom-bash# mv /var/hack /opt/ncid
mv: cannot move `/var/hack' across filesystems: Not a regular file

Also, there is a NCID folder in the var directory. Do I need to move it also or are those just the install files?

Narf54321
08-05-2007, 07:54 PM
First you need to make sure your root directory is read-write.

TiVo# mount
/dev/hda4 on / type ext2 (rw)


If it says (ro) then you have read-only access and need to change it.

Make the folder you prefer such as:

TiVo# mkdir /opt/hack


Then copy the whole directory (recursively) into that new place


cp -pr /var/hack /opt/hack

jlc
08-05-2007, 09:26 PM
Reply to Soapm
I normally use Fedora, and its "mv" command can move directories across filesystems. The TiVo one seems like a old version that can not do it. You should use the procedure by Narf54321 to copy /var/hack/, but after you do that you need to remove /var/hack and replace it with the symbolic link. You only need to copy /var/hack/, no other directories in /var.

TroyCarpenter
08-13-2007, 09:48 PM
One little quirk I noticed on my 649 S2 DT

The screen goes blank after the caller id stops displaying

ex.. If I am on the screen that says now playing list etc... Caller id will come on and when I answer the phone the menu will be missing from the screen. once I hit a button to change menu it all comes back but I did notice this. It doesn't do this on movies, just Tivo menues.

I also noticed I seem to have two menues imposed together on most screens. When I change screens there appears to be one menu that flys off to the right but you can see the menu still there. The second one just dissappears???

I knew those drugs from the 70's would catch up to me someday...

I can confirm this behavior on my 649 unit as well.

Also, on Kidzone when on the screen saver (I don't allow any channels in kidzone, so it goes to a black screen with the kidzone logo or sometimes a screen saying the channel isn't allowed), the screen went totally black when the CID info is cleared. Just pressing the TiVo button took care of it.

TroyCarpenter
08-15-2007, 11:29 AM
I also noticed when I was listening to Live365, when callerID came up, it totally corrupted the screens (I could sometimes see background images, but everything was totally unreadable, if the text even showed up). I had to hit the tivo button, and thus stop the audio stream, before the screen corrected itself.

Troy

Narf54321
08-15-2007, 03:39 PM
Keep in mind that the issues you're seeing with wiggy backgrounds, doubled text and other whatnot are the behavior of Tivo's own text2osd utility, and not the caller-ID itself. When watching recordings or live TV it (usually) works fine.

Soapm
09-27-2007, 02:33 AM
Any one know the background color choices for out2osd? I can change the foreground color but the background stays black no matter what I enter. I would like to have it clear if possible.

Also, anyway to center the text horizontally? I got it vertically at the bottom but I can seem to get it to move to the center of the screen.

Soapm
09-27-2007, 10:29 PM
Here are my settings, can anyone tell me what I'm doing wrong or if a clear background is possible?

##
## Default values
##
declare -i DELAY=10
BGCOLOR=clear
FGCOLOR=white
XSCALE=3
YSCALE=3
LINE=8
COLUMN=6
TEXT=""

Narf54321
09-28-2007, 07:40 AM
Here are some of the values I've pulled from the out2osd source "config.c":


// for code to extract this from a running TiVo, see
// <URL:http://www.dealdatabase.com/forum/showpost.php?p=168943&postcount=36>
struct colors colortab[] = {
/* TiVo series 1 and Series 2 colors */
0xff002100, "transparent1", // 0
0xff707070, "grey", // 1
0xff8a8a8a, "white1", // 2
0xff9f9f9f, "white2", // 3
0xffb9b9b9, "white3", // 4
0x55111111, "transparent2", // 5
0xff8e90ad, "blue", // 6
0xff4f6f5a, "green", // 7
0xff25342f, "olive", // 8
0xffe1dda3, "orange", // 9
0xff6d8f97, "turquoise", // 10
0xff59372f, "red3", // 11
0xffadae7c, "yellow", // 12
0xff111111, "black1", // 13
0xaa8a8a8a, "transparent3", // 14
0xff000000, "black2", // 15



Seems you can use hexdecimal values for transparency level+RGB.
Or try the included presets: transparent2 or transparent3

Soapm
09-28-2007, 11:05 PM
No go, I went through the entire list and the only two that work are black and white. Maybe out2osd is only capable of black or white background???

jlc
09-30-2007, 11:51 AM
No go, I went through the entire list and the only two that work are black and white. Maybe out2osd is only capable of black or white background???
Out2osd uses libosd to do the display, so the problem is probably with libosd. However, it might be interesting to regenerate the colors using the code from the URL given in the table Narf54321 posted.

Soapm
09-30-2007, 03:10 PM
Out2osd uses libosd to do the display, so the problem is probably with libosd. However, it might be interesting to regenerate the colors using the code from the URL given in the table Narf54321 posted.

I tried this and still had a black background. Is this how I would use the code?

##
## Default values
##
declare -i DELAY=10
BGCOLOR=0x55111111
FGCOLOR=white
XSCALE=3
YSCALE=3
LINE=8
COLUMN=6
TEXT=""

Soapm
09-30-2007, 03:20 PM
In fact, these don't seem to work at all. I can change the background to white with

BGCOLOR=white

but nothing happens when I try any of these numbers being it

BGCOLOR=white2

0xff8a8a8a, "white1", // 2
0xff9f9f9f, "white2", // 3
0xffb9b9b9, "white3", // 4

Could it be some of the changes made to make CCID work on Series 2 DT. It didn't work out of the box so I had to folllow the above instructions as if I had a series 3 Tivo.

jlc
09-30-2007, 05:12 PM
In fact, these don't seem to work at all. I can change the background to white with

BGCOLOR=white

but nothing happens when I try any of these numbers being it

BGCOLOR=white2

0xff8a8a8a, "white1", // 2
0xff9f9f9f, "white2", // 3
0xffb9b9b9, "white3", // 4

Could it be some of the changes made to make CCID work on Series 2 DT. It didn't work out of the box so I had to folllow the above instructions as if I had a series 3 Tivo.
You seem to be confusing colors defined by different programs. In your case text2osd is used, for the display, so you need to use colors it recognizes. Open a terminal window and execute "text2osd -?" to get the usage and color hints. Usage seems to indicate the only colors you can use are: red, green, blue, white. black.

You use tivoncid in place of tivocid and uni2osd. It uses the same text2osd program for the display, but configuration is done in ncidscript.conf.

Soapm
09-30-2007, 06:04 PM
You seem to be confusing colors defined by different programs. In your case text2osd is used, for the display, so you need to use colors it recognizes. Open a terminal window and execute "text2osd -?" to get the usage and color hints. Usage seems to indicate the only colors you can use are: red, green, blue, white. black.

You use tivoncid in place of tivocid and uni2osd. It uses the same text2osd program for the display, but configuration is done in ncidscript.conf.

You are correct, those are the only colors that work. I went with Blue.

Thanks!

Narf54321
09-30-2007, 07:36 PM
... It didn't work out of the box so I had to folllow the above instructions as if I had a series 3 Tivo.

You are correct, those are the only colors that work. I went with Blue.


Ah, yes that would make a difference. text2osd is Tivo's built-in display utility, and they don't offer many options.

IIRC out2osd stopped working when Tivo released the v8 system software. A shame really, because I remember the semi-transparent fonts/backgrounds which were really nice.

Soapm
09-30-2007, 08:09 PM
What would the other file be? I know I am using text2osd but what would be the alternative? I would like to test it to see if it will work on mine. I have a S2 and not a S3.

Nevermind, I see it is out2osd which you said in your post. I tried putting the original in my /tvbin/ directory and changing the output line in the out2osd to it instead of text2osd and it doesn't work. Maybe it will be fixed with the new OS release.

jlc
11-06-2007, 12:26 AM
NCID (http://ncid.sourceforge.net) version 0.69 has been released.

It includes a new SIP gateway, sip2ncid, to replace ncidsip so Perl is no longer required. VoIP support for the TiVo is available when the package is installed. Check out the Release Notes for other improvements and fixes. This is the first release of sip2ncid in the wild, so there may be some problems.

You should look at the Setup-sip2ncid file on the ncid page, not the home page, to see how to configure sip2ncid and ncidd. The FAQ should also help. The hardest part is that you may have to configure your network and check a couple of SIP Invite ports.

On my home LAN, SIP packets were on port 5061, but are now on port 10000. This is for Vonage using a Linksys RT31P2 router. The computer running sip2ncid had to be in the DMZ zone, in order to receive the SIP packets. Port forwarding did not work.

You need to be very careful if you put a TiVo in a router DMZ zone. Make sure your telnet and ftp is password protected, better yet use ssh.

If anyone uses SIP on the TiVo, please provide feedback giving the VoIP company name, the SIP port, the phone hardware, and the network setup.

I should soon release a package of NCID that uses a package manager to install and update it. It will also contain ssh and other Linux utilities. Adding, removing, and updating packages should be very easy.

jlc
03-21-2008, 11:44 PM
For information, see the post http://dealdatabase.com/forum/showpost.php?p=295026&postcount=62

jlc
06-07-2008, 03:50 PM
The main purpose of the release was to fix problems with the SIP gateways and some VoIP systems. It is known to work with 4 different Vontage SIP systems and with Asterisk. It has not worked for Asterisk using a POTS line.

New features were added for VoIP systems: Output calls are logged, if the system provides the information; and a client output module can be called for a hangup after answer, previously it could only be called for a hangup before answer.

See the Release Notes for specific changes.

If anyone is using sip2ncid on the TiVo, please post the particulars of of your system. Here is feedback for 3:

Linksys WRTP54G: used Vonage Talk, SIP packets on port 5060, may need
firmware update if below 1.00., for more information
see http://www.voip-info.org/wiki-Linksys+WRT54G

Linksys RT31P2: put computer IP address in the DMZ

Linksys RVS4000: L2 Switch, mirror port 1 to port 2, assumes gateway
is port 1 and computer is port 2