App to monitor and log cable modem signal level?

Hi folks-

In dealing with Comcast during periodic cable problems, I'd like to be able to present them with a log of the received signal strength and upstream power level, collected over large periods of time, that would demonstrate the specific events that result in poor performance.

In the past when I tell them what my signal levels used to be, and what they are now, they don't believe me. I've got two splitters between the cable drop and my modem, so when I tell them my normal signal level is around -4 dbmv, they say: "no way, that's too high, your current -17 is typical."

So, is there an application that can be set to query the modem periodically, once or maybe several times an hour, and log that info so that it could be imported into Excel or whatever for graphing? This would let me hand such a graph to the service tech and say "Signal was great until 6:30 am January 13th, then it suddenly dropped by 10 dbmv, at the same time as I started getting periodic disconnects and fuzzy TV signal. Find the problem in your system and fix it."

The information is available from my RCA DCM235 at this address: http://192.168.100.1/moreInfo.html But I would need to extract just the bits that I'm interested in to yield flat numeric values. I could write this in VB, but maybe there is a better way to get the information? Is there an app out there that already does this? Or a specific query protocol I can use to get just the numeric value back?

Any thoughts appreciated.

Marc

Reply to
MAG
Loading thread data ...

In addition to Bit Twister's wget, you can just do it all in Perl and format it into a DB or whatever you like (maybe just append a line to a file every so many minutes).

Email me if you like and I'll send you a Perl script that does the scraping and you can send back the output and I'll modify it to get what you want off the page. Activestate.com has a Perl that you can D/L and install easily for most platforms.

One page of code would get most of it done and it works on Win32.

Here's the output - I just wrote it to grab my RF page on my Terayon :

Cable Modem Information Center Cable Modem Information Center Main Troubleshoot Connection Advanced Links Event Log Status DS Freq Configuration Logout RF Parameters Parameter Value Units Tx Power 51.7 dBmV Rx Power -5.4 dBmV Downstream SNR 32.4 dB Tx Frequency 33000000 Hz Rx Frequency 705000000 Hz

Then it's just a matter of parsing the numbers out.

Reply to
$Bill

"Microsoft Windows binaries are available from SunSITE Denmark FTP server at ftp://sunsite.dk/projects/wget/windows/ or

formatting link
and have been kindly provided by Heiko Herold. An MS-DOS binary designed to be used under plain DOS with a packet driver has been made available by Doug Kaufman. It is available from
formatting link
Antinode.org offers a VMS port of GNU wget."

Reply to
BR

Might as well post the whole script. The next step is to extract the values you want from the content and log to a file. I brute forced the HTML tag removal with REs, but you can use HTML::Parser or similar to do it properly.

#!perl -w --

use strict; use LWP::UserAgent; use LWP::Debug qw(level); use Data::Dumper; $Data::Dumper::Indent=1;

our %A; # get commandline switches into %A for (my $ii = 0; $ii < @ARGV; ) { last if $ARGV[$ii] =~ /^--$/; if ($ARGV[$ii] !~ /^-{1,2}(.*)$/) { $ii++; next; } my $arg = $1; splice @ARGV, $ii, 1; if ($arg =~ /^([\w]+)=(.*)$/) { $A{$1} = $2; } else { $A{$1}++; } }

$| = 1; binmode STDOUT; select ((select (STDERR), $| = 1)[0]); binmode STDERR;

my $debug = $A{d} || 0; my $file = $A{o} || ''; my $strip = $A{s} || 0; my $url = $ARGV[0] || 'http://192.168.100.1/modemRfPage'; (my $prog = $0) =~ s/^.*[\\\/]//; my $usage = 30); my $req = HTTP::Request->new(GET => $url); my $res = $ua->request($req); print Data::Dumper->Dump([$res], [qw($res)]) if $debug;

if ($res->is_error()) {

printf "Error: %s\n", $res->status_line;

} else {

my $ct = $res->content(); my $content = $ct;

if ($strip) { # strip the HTML (you could use HTML::Parser)

$content =~ s/[\t ]*]+>[\t ]*/ /gs; # rem tags $content =~ s/\&nbsp;/ /gs; # &nbsp; -> ' ' $content =~ s/\t+/ /gs; # de-tab $content =~ s/[\t ]{2,}/ /gs; # mult WS to ' ' $content =~ s/^\s+//s; # rem 1st leading WS $content =~ s/\n */\n/gs; # rem leading WS $content =~ s/\n{2,}/\n/gs; # rem blank lines }

if ($file) {

open OUT, ">$file" or die "open: $!"; binmode OUT; if ($A{s}) { print OUT $content; } else { print OUT $ct; } close OUT; print "File $file saved\n";

} else {

if ($strip) { print $content; } else { print $ct; } } }

__END__

Cable Modem Information Center Cable Modem Information Center Main Troubleshoot Connection Advanced Links Event Log Status DS Freq Configuration Logout RF Parameters Parameter Value Units Tx Power 51.7 dBmV Rx Power -5.7 dBmV Downstream SNR 32.2 dB Tx Frequency 33000000 Hz Rx Frequency 705000000 Hz

Reply to
$Bill

And I can then extract the fields I want to print (or write/append to the file).

# Fields I want: # Tx Power 51.5 dBmV # Rx Power -5.5 dBmV # Downstream SNR 32.2 dB # Tx Frequency 33000000 Hz # Rx Frequency 705000000 Hz

my ($TxP, $RxP, $SNR, $TxF, $RxF); my @var = qw(TxP RxP SNR TxF RxF); my @pat = ('Tx Power ([^ ]+)', 'Rx Power ([^ ]+)', 'SNR ([^ ]+)', 'Tx Frequency ([^ ]+)', 'Rx Frequency ([^ ]+)'); my @res = ();

for (my $ii = 0; $ii < @var; $ii++) { $content =~ /$pat[$ii]/; $res[$ii] = $1; }

print "Tx Pwr=$res[0] "; print "Rx Pwr=$res[1] "; print "SNR=$res[2] "; print "Tx Freq=$res[3] "; print "Rx Freq=$res[4]\n";

Reply to
$Bill

Here is a quick hack I use to fetch data from my modem. It uses wget to fetch the page and perl to parse the data. No idea if you can find wget for Micro$oft. I run Mandrakelinux

#!/usr/bin/perl -w #use warning ; use strict ; use diagnostics ;

#***************************************************************************** # # Program: poll_cable.pl - poll cable modem and dump information # # Purpose: Quick kludge to read html files from cable modem and create # cable.data containing cable modem information. # # # Assumptions: # cable modem is a Motorola SURFboard sb4220 # cable modem html files are at http://192.168.100.1# # To run: ./poll_cable.pl # # Output: /tmp/cable.data # # format will be keyword="data value" # # #*****************************************************************************

my ($input_line) = "" ; # line to scan for title my ($lc_line) = "" ; # lower cased input_line my ($len) = 0 ; # length of title string my ($out_fn) = "/tmp/cable.data" ; # output index.html file my ($sys_fn) = "/tmp/poll_cable.bash" ; # script filename to fetch html pages my ($data) = 0 ; # data keyword my ($data_fn) = "" ; # *.data file name to scan my ($t_start) = 0 ; # start column my ($t_stop) = 0 ; # stop column

sub fetch_keyword ; # get keyword and save it to $out_fn sub fetch_data ; # fetch keyword data value

# #*************************************************** #* #* Create modem *.data filenames to fetch/read #* #* File names were found by viewing modem web page #* using browser View source feature. #* #***************************************************

open (SYS, ">$sys_fn") or die "Opening $sys_fn $!\n" ; print SYS "/bin/rm -f fault.flg\n" ; print SYS "wget -q http://192.168.100.1/addressdata.htm -O address.data\n" ; print SYS "if [ \$(stat -c %s address.data ) -eq 0 ] ; then\n" ; print SYS " touch fault.flg\n" ; print SYS "fi\n" ; print SYS "wget -q http://192.168.100.1/signaldata.htm -O signal.data\n" ; print SYS "if [ \$(stat -c %s signal.data ) -eq 0 ] ; then\n" ; print SYS " touch fault.flg\n" ; print SYS "fi\n" ; print SYS "wget -q http://192.168.100.1/indexdata.htm -O index.data\n" ; print SYS "if [ \$(stat -c %s index.data ) -eq 0 ] ; then\n" ; print SYS " touch fault.flg\n" ; print SYS "fi\n" ; close SYS ;

system ("chmod +x $sys_fn" ) ; # set script executable system ("$sys_fn") ; # generate the .data files system ("/bin/rm $sys_fn") ; # delete command file

#

#*************************************************** #* #* parse each data file from cable modem. #* #***************************************************

open (OUT, ">$out_fn") or die "Opening $out_fn $!\n" ; $data_fn="address.data" ; fetch_keyword ;

$data_fn="signal.data" ; fetch_keyword ;

$data_fn="index.data" ; fetch_keyword ;

close OUT ;

# #*************************************************** #* #* Fetch_data - scan $data_fn looking for text #* #* Each keyword line is followed by the data value. #* #* Output format will be keyword="data value" #* #***************************************************

sub fetch_keyword { open (DATA, "

Reply to
Bit Twister

If your receive signal strength is -17dBmV, it is too low. Ideally, receive signal strength should be above -15dBmV. -4 isn't too high, the modem should work up to 15dBmV. It sounds like your cable company is blowing smoke your way...

You're loosing at least 6dB with your splitters, so you might want to rewire to remove one splitter from the path to the modem. If you do that, the -17 should rise to -14, which could solve your problem without doing battle with the cable company.

Good Luck,

-Gary

Reply to
Gary

What are the Peral lines to open/read/close the web page and libary include line if needed?

Reply to
Bit Twister

Thank you.

Reply to
Bit Twister

It's free - what's your platform ?

formatting link
You don't have to register, you can just hit continue if you want. You probably want the Windows MSI download for 5.8.6.

Reply to
$Bill

If possible, you want a 2 for 1 split at the ground block that feeds the modem on one tap and the rest of the house's TVs on the other. Then you can split whatever way you want and your modem should always be fine, but your TVs may vary depending on splits and wiring. Can you do that without rewiring ?

Reply to
$Bill

Hi Gary-

Thanks for the feedback. Unfortunately the way the house is set up, it's not practical to rewire to avoid even one splitter. I've got four rooms to provide signal to, and several devices in each room. And most of the time things are fine. The normal signal level directly at the tap, as measured by the cable modem directly hooked into the feed wire, is around +5 dBmV. And after the two splitters it's usually in the -3 to -5 dBmV range. But every now and then it starts to drift down over the course of around 3 months to the -15 to -20 range. I call and complain. Tech comes out and says everything is fine. I tell him about the drift in values. Nothing gets done for a while. A week or three later I see a flurry of cable modem trucks in the neighborhood; suddenly my signal is back to -3.

:-)

Marc

Reply to
MAG

Hi Bill and Bit Twister-

Thanks a whole bunch for the interesting code. It will give me something to mess with. I don't yet speak that language, but I'll get the PERL from Activestate.com. Which one exactly? Looks like they have a few versions and I'm not sure which I need.

Do they have a free or shareware version? I'm happy to invest a little, though, for a good learning experience.

Again, thanks.

Marc

Reply to
MAG

You might look over on

formatting link

Reply to
Bit Twister

Hi again Bill-

Unfortunately not. The cable modem, router etc. is way the heck on the other side of the house from the cable entry and primary splitter. I've got a TV in the office along with the cable modem.

And, most of the time everything is fine. I think the occasional problems I see, after gradual (months) drift down in the signal level, are a result of Comcast's distribution issues rather than any changes here. While my setup is far from ideal, it works fine until Comcast let's things go too long before rebalancing their load.

:-)

Marc

Reply to
MAG

Thanks! Yup, my primary machine is a Wintel business laptop. On the bright side, I've been able to strip all outlook components from it!

Marc

Reply to
MAG

(...) You could be in the middle of a system upgrade in which case this sort of thing is not unusual. Or it could be after an upgrade and they've rebalanced, but the levels are too low. Not uncommon and dropping tap values to increase signal is done for a long while after in many places.

I would recommend checking to see if SNMP is active on your modem and if so, interrogate it that way rather than messing around with HTML teardowns.

If you need signal strength, request a residential drop amp be placed between the ground block and first splitter input. If the first splitter is outside, the amp must go inside, but a jumped can be run inside to the amp and another back out to the splitter. I've done hundreds of quick refits like that. If upstream is having a problem, then you need an upstream amp but the I/R department doesn't carry them in most places, and often doesn't even know they exist. If you can order one online, place it at the modem to boost its output back through your IW to the cable company.

-Wayd Wolf

Reply to
no one in particular®©

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.