Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Huawei HG612 - Graphing - A cry for programming help  (Read 3310 times)

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Huawei HG612 - Graphing - A cry for programming help
« on: December 26, 2012, 09:54:25 AM »

I have occasionally mentioned that a new & enhanced version of the stats graphing system is to be released soon.

Programming this in 'C', Burakkucat has developed a Linux/Windows cross-platform stats harvesting program for the HG612 (a single version for use on ADSL & VDSL2 connections) & I have further developed it to munge the obtained data into a format that can be graphed (currently using a revised version of the graphpd.BAT graphing script for Windows users).

I have fully tested the .exe program resulting from compiling the C code with MingW over a couple of months & have found it to be very quick in operation & far more reliable than the scripted versions when coping with various flavours of virus checkers etc. hogging all the PC's resources & causing gaps in the harvested data.

Currently the program is controlled by a batch file called by a simple VBS script that is run every minute via Windows Task Scheduler (or via Cron for Linux users).

I would like to release at least the VDSL2 version very soon. However, I would firstly like it to use an .ini configuration file to make setting the defalut variables for different users' systems as easy as possible & avoid having to use a controlling batch file.

Unfortunately, as I am not a programmer and I have limited available time to research this, I have ground to a halt.

Initially, I imagine a basic ini file would look something like this:-

[login]
IPaddress=192.168.1.1
Username=admin
Password=admin
Shell=sh


[folder_locations]
Drive=C:
Main_folder=\HG612_Stats
Apps=\Apps
Program=\Program
Ongoing_Stats=\Ongoing_Stats
Current_Stats=\Current_Stats

The program would then read the ini file each time it is run from Task Scheduler/Cron & store the values as global variables.

The same ini file could then be used for obtaining & storing snapshot data and ongoing data, along with graphing programs already partially developed.

I/we would be happy to provide the C code "as is" if anyone was willing/able to add in the facility to use an ini configuration file for the default variables.

Initially I would be happy to manually edit the ini file, but at some stage, it would be nice to use a graphical front end where folder locations etc. could be chosen via a point & click method via a GUI rather than the "old fashioned" manual method.

Is anyone up for assisting with this?
It would have to be written in C, for inclusion into the currently developed program(s).

Intentionally, graphs will still only be generated on demand. However this is easily automated via Task Scheduler (if required).

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43563
  • Penguins CAN fly
    • DSLstats
Re: Huawei HG612 - Graphing - A cry for programming help
« Reply #1 on: December 26, 2012, 10:38:17 AM »

Reading data from an ini file (and writing to it) is very simple, but unfortunately I don't do C. I imagine that any C programmer should be able to do this with no difficulty. There's some sample code here: https://code.google.com/p/inih/

Logged
  Eric

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: Huawei HG612 - Graphing - A cry for programming help
« Reply #2 on: December 26, 2012, 02:54:20 PM »

Thanks for the link Eric.

It's the same one as posted by someone else in another thread I started here & it looks like it might provide the answers (when I actually get a round tuit):-

ThinkBroadBand forum thread

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43563
  • Penguins CAN fly
    • DSLstats
Re: Huawei HG612 - Graphing - A cry for programming help
« Reply #3 on: December 26, 2012, 03:45:09 PM »

One other thing I could offer (although it may be a sledgehammer to crack a nut) is to write a little supplementary program to parse the ini file and return the data in a form the main program could use. I don't know if this is practical though, as I don't know what the main program requires.
Logged
  Eric

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7388
  • VM Gig1 - AAISP L2TP
Re: Huawei HG612 - Graphing - A cry for programming help
« Reply #4 on: December 26, 2012, 08:59:05 PM »

I am glad you are doing this bald eagle it will improve it a lot.
Logged

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: Huawei HG612 - Graphing - A cry for programming help
« Reply #5 on: January 05, 2013, 04:28:53 PM »

Well, I now have the (still undergoing testing) new compiled.exe programs working with an ini file on Windows systems.

It is a very basic file so far, just for testing purposes:-

Code: [Select]
[Login]
IP_address = 192.168.1.1
Username   = admin
Password   = admin
Shell      = sh

[Locations]
Drive                = C:
Main_folder          = C:\HG612_Modem_Stats
Scripts_and_Programs = C:\HG612_Modem_Stats\Scripts
Apps_folder          = C:\HG612_Modem_Stats\Apps
Current_Stats_folder = C:\HG612_Modem_Stats\Current_Stats
Ongoing_Stats_folder = C:\HG612_Modem_Stats\Ongoing_Stats

[Mode]
Mode=extensive

[Graphing]
Auto_graph_Snapshot_data = YES



More configurable options will be added in due course.

Could anyone who is interested please let me know the details of how you would like to be able to configure the settings?

e.g. Harvest & store the data on a server yet plotting the output graphs on another PC, graph resolution, which graphs to actually plot, colours etc. etc.

Logged

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: Huawei HG612 - Graphing - A cry for programming help
« Reply #6 on: January 06, 2013, 11:47:30 AM »

FYI, I have uploaded some   test   programs for Windows users here:-

Test programs 06/01/2013


There is also another discussion thread with further detail here:-

TBB thread


ALL constructive feeedback is welcomed.



Logged
 

anything