Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Freeware Software for CIL

Status
Not open for further replies.

aprasha

Technical User
Oct 2, 2003
89
I'm searching for a good and free program to manage the CIL on the MD110 and/or BP(Serial connection - COM Port).

I've found many programs out there but still not happy with them.

Sure some of you are using simply (or not) free programs for your CIL.

Could you post the url links?

(Of course, if you know about programs for CIL over Ethernet, let us know too).


Thank you all!!
 
Hi,
what does it mean - manage?
Receive & store CIL data or process it to bill?
 
A last try before forget this post ;-)
 
If you get an old PC and wipe the disk. Load linux on it. There's a small program called 'ttywatch' that logs from the serial port. Simple to configure. It can log a file for each day automatically. Put the PC on the LAN and you have ftp access to the logs.
It's not as much trouble as it sounds.
 
x jgideon: Thx.

x spamfree: Working fine with ttywatch, but the log file is writing many strange ASCII characters (but in Windows with Hyperterminal it works fine).

Do you know if I have to configure anything on ttyS0/1 or else to make it works properly? (Installed Red Hat 8.0, but I'm newbie on Linux... trying to do my best)

Thx.
 
Windows and Unix do some things slightly different. As far as ttywatch is concerned it is logging binary data. If you look at the file with en editor you will see a load of non printing characters. Also if you use less filename. you will see these characters, but not with cat filname
What you can do is run the file through a regular expression filter that will ignore any NON alphanumeric characters.
I will have a look at this tomorrow and post a workaround as well as the ttywatch config that I use.

PS
If you are searching the file for specific details with grep, use the '-a' extension (i.e Binary). e.g. If you want to see all activity on extension 4000
cat filename | tr -s ' ' ' '|grep -wa 4000
This will get rid of all the spaces. And only search for 4000, not 4000*.
 
How 'strange' are those ASCII characters?
May it be the tree NULL characters sent after each line?
They possibly appear first on the next line as ^@^@^@.

 
I'm using it right now with a BP (I have one under my feet and the MD is in another room) but I will use it with both of them.
When I log with Hyperterminal in Windows or with Minicom in Linux (verifying that is not a problem with Red Hat, PC or else...), the log is right, and it's something like:
06211121 0000 J 253 869
00
But with ttywatch (vi), it's like this:
   06²±±±²±      0000 Ê            ²53                  ¸69                        00


Don't seem a problem of binary file (the 0,3,5,6 and 9 characters works fine) but a conversion character problem of ttywatch.
With a script that changes those characters with the correct ones it will work, but.....why have to do this? Don't have sense, and I want all as simply as I could for having a ftp server running directly toward the log directory and nothing more...

Thank you very much.
 
Answer from the Author, Michael K. Johnson:

"It's the encoding being used for your terminal session. You can
use iconv to re-encode from iso-8859-1 (for example) into utf-8,
or you can change the encoding being used for your terminal
session. In gnome-terminal that's Terminal -> Character Coding
(you may need to choose Add or Remove ... in order to enable an
alternative encoding such as iso-8859-1.
 
Is there some sort of parity set up?
The coding of the characters (some of them) are:
0010 0000 space odd number of 1
0011 0000 0 even
0011 0001 1 odd
0011 0010 2 odd
0011 0011 3 even

etc.

This is possible if you send with 7 bit + parity and receive
with 8 bit.
 
Just modified the file "logfile.c":

#include <ctype.h>

and in logfile_write():
int i;

and just before return write... :

for (i=0; i<count; i++)
buf=toascii(buf);


Recompiled and working fine.
 
Glad to see you got a solution. I automatically get a new logfile each day with the following 2 perl scripts. The file is named with the date of the day e.g. 2004-06-24.log
Must have a user called 'cdr' with home directory '/home/cdr/'
Hope this is some use to you.

log.pl
___________________________________________________________
#!/usr/bin/perl
#
# September 2002
#
# Generate new logfile with todays date. Get from system time.
#

($sec, $min, $hr, $dom, $mth, $yr, $wday, $doy, $ISDst)= localtime(time);
$yr=$yr + 1900;
$mth=$mth+1;
$datestring= "$yr-$mth-$dom";
system("/usr/sbin/ttywatch --logpath /home/cdr/Logs --name '$datestring' --port /dev/ttyS0 --bps 9600 --pidfile /home/cdr/pid/ttyfile.pid &");
____________________________________________________________

logmanager.pl
____________________________________________________________
#!/usr/bin/perl -w
#
# ttyfile.pid contains the pid for ttywatch.
# Kill this pid to stop CDR logging each night via CRON

if(-e '/home/cdr/pid/ttyfile.pid')
{
open(INFILE, '/home/cdr/pid/ttyfile.pid') or die "Could Not Open File";
while(<INFILE>)
{
$line = $_;
chomp $line;
print $line;
system("kill $line");
}
}
____________________________________________________________

insert the following 2 lines into the crontab for root:

30 0 * * * perl /home/cdr/logmanager.pl \;
32 0 * * * perl /home/cdr/log.pl \;
 
If you have BC11 and want to change the date record that is
output at midnight, use the command CLDHC.

If you want date as 2004-06-24 enter:
CLDHC:DATSTR="%C%Y-%M-%D";

A '%' followed by those letters gives:
C Cenury
Y Year
M Month
D Day
H Hour
N miNute
S Second
I station Identity

others gives the character itself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top