Huawei HG612 - Graphing - A cry for programming help

Started by Bald_Eagle1, Dec 26, 2012, 10:01:10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bald_Eagle1

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).


andrue

It's a pity it's C. I'd be happier if it could be C++. I know the latter was/is a superset of C but there are enough syntactical differences to send me up the wall. If it was 'my' project I'd look at spending some time porting it to C++. It probably wouldn't be all that difficult and at least then 'modern' programmers would be happier with it.

I'm certainly a competent programmer as I do it for a living but I'm a Windows programmer. For better or for worse (the latter usually) my employer uses Visual Studio. If I was twenty years younger I'd install Linux and it'd be a fun project but sadly the days of me being interested in 'tinkering' are gone. I nearly drove myself mad many years ago programming at work and then at home so I made it a rule never to program at home. However something like this wouldn't be a big task and if there is a way I can help I'd be glad to.

I'd be happy to write a C++ class to read from an INI file and would even have a go at porting the whole thing to Visual Studio as a C++ project if it helps but I can't do anything to ensure Linux compatibility. In theory there shouldn't be much to it but the devil can be in the detail.

Bald_Eagle1

Thanks andrue.

I may have found the answer (for now) in a link as posted by BatBoy in the TBB forum:-

ThinkBroadBand forum thread

andrue

Yeah, I've replied to that thread. I'd like to help but unfortunately if I were to program at home it'd have to be something pleasant and fun. Installing Linux, re-learning about the Linux API and working in 'C' don't fall under that heading. No - what little programming I do at home is done in C#. For gritty technical projects and for portability I prefer C++ but it's more effort and takes longer. I just can't be bothered unless someone is paying me :)

I think it's a bit like a racing driver. When they are doing their job they want a manual box but when they just want to tootle down to Tesco to get the groceries they probably prefer an auto. Now that Honda make a CVT so do I :D

Bald_Eagle1

Thanks andrue.
I have seen your post(s).

The main thing for me is that it must be simple.
Once I have it working with a simple to edit ini file (inefficient, but editable batch files will soon disappear), I will be releasing the new version.