Click here to Skip to main content
Licence 
First Posted 17 Sep 2005
Views 42,906
Downloads 342
Bookmarked 12 times

A Simple Logging Monitor for Motorola Surfboard Cable Modems

By Brett Trotter | 17 Sep 2005
A simple program that fetches the modem power and SNR values from the status page, displays them nicely and logs them. Includes a simple bar graph control.

1
1 vote, 16.7%
2

3
5 votes, 83.3%
4

5
3.85/5 - 6 votes
μ 3.85, σa 1.43 [?]

Sample screenshot

Introduction

This is a very simple program I wrote to help illustrate to the brain dead cable technicians the intermittent nature of my cable modem connection which was causing me endless grief.

Very simply, it grabs the HTML of http://192.168.100.1/signaldata.html and does some parsing based on known text in order to grab the Downstream Power, SNR and Upstream Power levels from the page. Once parsed, it displays the data on the form in nicely color coded values (green, yellow, and red) based upon some arbitrary but realistic numbers and also shows them visually in the form of a simple bar graph. There is also an option to log the data in a comma separated file when the values change.

Basics

The code is very short and sweet and fairly well commented. It should be no problem for anyone with even a basic level of understanding in C#. It utilizes the System.Net.WebClient class as well as a bar graph control I created.

Since the code is so simple, I won't really spend any time discussing it here since I feel it is much easier to understand when looking at the project directly. Mainly I am offering it to the public in hopes that it will alleviate someone else's grief in the way that it has mine. It is also handy to keep an eye on mission critical cable modem connections for those of us who work from home and/or use VOIP.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Brett Trotter

Systems Engineer
BT Technical Services
United States United States

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralArris Touchstone PinmemberSteve Meisner13:18 2 Sep '10  
QuestionProgram Utilization Pinmemberkg4req9:06 26 Jul '09  
AnswerRe: Program Utilization PinmemberBrett Trotter19:12 26 Jul '09  
General[Message Deleted] Pinmemberit.ragester6:35 28 Mar '09  
GeneralRe: sip PinmemberBrett Trotter7:53 28 Mar '09  
AnswerBetter ways of parsing PinmemberBrett Trotter4:31 23 Oct '08  
QuestionHow to Login and Use Your Program PinmemberSteve Ganslen5:42 5 Jul '08  
AnswerRe: How to Login and Use Your Program PinmemberBrett Trotter6:34 5 Jul '08  
GeneralHaving troubles [modified] PinmemberRivitingOne22:42 20 Jan '07  
I keep getting a window popping up with "Unable to contact host, is the cable modem plugged in?"
 
I have some ideas, (like adding a snippit to output the value of "data" to see if it is even getting information assigned to the variable) but I don't know how to compile with multiple files and directories(Never got that far) Would it be possible for you to post what you type to compile the code?
 
Thanks in advance for any help. I can follow much of this but I only learned the basic single file lvl C++ so this is pushing my knowledge.
 

EDIT:
 
Ok, so this is where I am currently
After some reasearch I am have landed on this as the compile command
(not that mcs is taking the palce of the normal csc because I am using a compiler called mono and that seems to be their version of the compile command)
C:\c\cm>mcs assemblyinfo.cs form1.cs
 
What I am supposed to get (this according to the tutorials I am using to work my way through this) is a executable file that takes the name of which ever file has the Main() method, in this case form1.cs. But instead of the expected form1.exe, I get the following.
 
form1.cs(14,23): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Compilation failed: 1 error(s), 0 warnings
 
So I've made a little progress here but am once again at a loss. I've looked up the error CS0234 and it is called a namespace error. I've found a few sites with information but the examples and how I can apply them to this code arebeyond my current knowledge. If anyone has the chance, any help would be appreciated.
 

 
-- modified at 2:00 Monday 22nd January, 2007
AnswerRe: Having troubles PinmemberBrett Trotter12:14 1 Sep '07  
GeneralRe: Having troubles PinmemberBrett Trotter6:38 5 Jul '08  
GeneralJust what I needed PinmemberThomas Wells5:23 23 Aug '06  
GeneralRe: Just what I needed Pinmemberbtrotter7:25 23 Aug '06  
GeneralRe: Just what I needed PinmemberThomas Wells7:29 23 Aug '06  
GeneralRe: Just what I needed Pinmemberbtrotter7:34 23 Aug '06  
GeneralSmall code update. PinmemberBrett Trotter20:51 28 May '06  
QuestionCan you help me? PinmemberGiveMeJazz4:06 4 Apr '06  
AnswerRe: Can you help me? PinmemberBrett Trotter20:56 28 May '06  
Generalexe PinmemberBrett Trotter0:29 3 Nov '05  
GeneralRe: exe Pinmembercaliforniafan14:43 14 Nov '05  
Questionexe? PinmemberCharlieG3:30 24 Sep '05  
AnswerRe: exe? Pinmembercaliforniafan12:34 28 Sep '05  
GeneralRe: exe? PinmemberBrett Trotter5:54 29 Sep '05  
GeneralRe: exe? Pinmembercaliforniafan6:33 29 Sep '05  
GeneralRe: exe? PinmemberBrett Trotter10:47 29 Sep '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 18 Sep 2005
Article Copyright 2005 by Brett Trotter
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid