matthewt

Thursday, 25 April 2013 14:23

Modifying Sky Router Tool

The full source code for Sky Router Tool is available from Google Code. Visual Studio .NET 2010 is required to compile the application (older versions of visual studio may work but are untested).

Modifying the Web Interface

The web interface is saved in the 'htdocs' folder of the Sky Router Tool installation directory.

index.html contains the basic page layout, all other content is in "contentData.json". This is a json representation of all the pages used in the web interface.

In the \Sources\pH-Http\htdocs\pages folder of the source code package you will find an easier-to-edit version of the pages contained in contentData.json. Once you have changed the content of these pages you can update the contentData.json file by running the "updatePages.php" script (this requires PHP to be installed). The pages are largely HTML and javascript but also contain some custom templating tags; I will try and document these at a later stage.

Thursday, 25 April 2013 14:22

Advanced Help - How Sky Router Tool Works

Sky Router Tool first checks to see if it can access http://192.168.0.1:8234/do_cmd.sh (Which it wont be able to if the router has been restarted since the tool was last run).

If it cant access the page it then runs the following commands using the URL injection hack (http://192.168.0.1/setup.cgi?todo=ping_test&nextfile=diagping.htm&c4_IPAddr=127.0.0.1>/dev/null;...):

mkdir /tmp/new_web- Makes a new temporary directory
rm /tmp/new_web/do_cmd.sh- Removes any old cgi script
wget -P /tmp/new_web http://computer running sky router tool/do_cmd.sh- Downloads the cgi script from the sky router tool web interface
chmod 777 /tmp/new_web/do_cmd.sh- Adds execute permissons to the script
ln /etc/htpasswd /tmp/new_web/.htpasswd- Link to htpasswd file (makes the new web server be username/password protected)
kill `cat /tmp/mini_httpd.pid`- Kill any already running http servers created by sky router tool
mini_httpd -p 8324 -d /tmp/new_web/ -c "**sh" -i /tmp/mini_httpd.pid- Starts a new web server on port 8324

do_cmd.sh is just a simple script which runs any commands which are posted to it (you can find a copy of it in the 'htdocs' folder of the Sky Router Tool installation directory). Sky Router Tool uses this do_cmd.sh to send commands to the router and return responses.

Thursday, 25 April 2013 14:22

Advanced Help - Databases

The data logged by Sky Router Tool is saved in a SQL Compact Edition database file. This is located at "C:\ProgramData\sky router tool\routerlogs.sdf". There is also another database in this folder called "settings.sdf", this contains the consolidation rules.

Thursday, 25 April 2013 14:22

Web Interface Help - Settings

The 'Settings' section allows you to change various Sky Router Tool settings.

Router Connection

Here you can change the connection details for your router. These must be correct for most features of Sky Router Tool to work.

  • Router Type - The model of your router. The DG834GT is the white router provided by sky, the DG934G is the newer black Netgear router (The label on the bottom will have "NETGEAR" written on it).

  • Router Hostname - The hostname of your router (usualy 192.168.0.1).

  • Router User Name - The username for your router's web interface (the default is 'admin').

  • Router Password - The password for your router's web interface (the default for sky routers is 'sky').

Router Logging

This allows you to change the router polling interval (how often Sky Router Tool logs bandwidth and SNR Margin). It is recommended that this is left at 60 seconds.

Router Log Consolidation

In order to prevent the log files becoming too large it is possible to consolidate logs after a certain period of time. Using this page you can add consolidation rules. Note that rules are retroactive and will take effect immediatly.

Thursday, 25 April 2013 14:21

Web Interface Help - Tools

Target SNR Margin

This tool allows you to change the target SNR margin (the SNR margin that the DSLAM tries to acheive). This unfortunatly does not work yet for the DG934G.

Increasing the target SNR margin will give you more stability but a lower sync speed. Decreasing the target SNR margin will give a less stable, but faster line.

To change the target SNR just drag the slider to your required value and click "Set and Resync". The values is measured as a percentage of the target SNR set by your ISP; for Sky the default is 7dB.

Speed Test

This tool allows you to test the speed of your connection by getting your router to download a file and time how long it takes to download. As the test is run on the router and not your computer, it is not affected by any problems with your LAN or Wifi connection.

To use it just click "Test".

Ping

This tool allows you to ping a host from your router.

Calculate Sky Password

This tool calculates the default sky values for your router. These values are calculated from your router's LAN MAC address. The most usefull values calculated are the PPP username and password; these can be used in a 3rd party router.

The other values calculated are: default wireless password, default wireless channel and default wireless SSID

To use it just type in your LAN MAC address (if you are calculating details for your router this will already be filled in correctly), select the model of router and click "Calculate".

Thursday, 25 April 2013 14:20

Web Interface Help - Graphs

The 'Graphs' section is one of the most powerful parts of Sky Router Tool. Here you can display graphs of logged data (bandwidth usage and SNR margin) and advanced ADSL statistics.

All graphs support zooming (using the scroll-wheel on your mouse) and panning (just drag the graph to move around).

Historic Graphs

The historic graphs are the graphs which show previously logged data. Once a graph is selected you can change the time-span displayed using the options at the top of the page.

The table at the bottom of these graphs gives an overview of the data in the currently selected time-span.

ADSL Connection Graphs

These graphs display advanced ADSL connection details. All graphs are available for the DG834GT router; unfortunatly only the 'Bit Loading' graph is currently available for the DG934G. The frequency is measured in kHz.

  • Bit Loading - This shows the number of bits carried by each frequency on the ADSL line.

  • Signal to Noise Ratio - This shows the signal to noise ratio (in dB) for each frequency.

  • Quiet Line Noise - This shows the amount of noise present on the line at each frequency.

  • Attenuation - This shows the attenuation of the signal at each frequency.

Thursday, 25 April 2013 14:20

Web Interface Help - Home

On the 'Home' page you can access general details about the router.

Connection Details

The connection details page displays basic connection details and allows you to reboot or resync the router. A definition of these details is below:

  • Sync Rate - The currently negotiated rate.

  • Max Rate - The estimated maximum rate achievable with the line (assuming currently set target SNR Margin).

  • Attenuation - The power loss during transmission (dependent on line length).

  • SNR Margin - The difference between the SNR required for the current connection speed and the actual SNR.

  • ADSL Mode - This is the current ADSL mode. This will usually be either ADSL2+, ADSL2 or G.DMT.

  • Channel - This shows whether or not interleaving is enabled (Fast means no interleaving).

  • Average Error Rate - The average number of CRC errors which have been occurring every hour since your router was last reset.

Thursday, 25 April 2013 14:19

About

pH-Mb

Sky Router Tool was made by mrmt32 (This email address is being protected from spambots. You need JavaScript enabled to view it.). For help and updates go to
http://www.skyuser.co.uk/forum/technical-discussion/31614-sky-router-tool.html.


Credits

  • The web interface uses the jQuery javascript library for DOM manipulation.

  • The flot javascript library is used to render the graphs.

  • The Json.NET C# library is used to generate the JSON output from the server.

  • Thanks to Dave-H at www.skyuser.co.uk for helping test the .net2.0 version.

  • Thanks to David Aspden for help creating support for the DG934G.

Thursday, 25 April 2013 13:38

Copying Recordings to a New Disk

Firstly you need to load your planner, see Planner Loading for details.

From the list of recordings displayed you can select the ones your wish to copy by clicking the check box next to each recording. You can also right click the recording list and click 'Check All' to select all of the recordings.

Once you have selected your recordings, click the hard disk icon on the toolbar.

ExPVR Screenshot

You will then be asked to specify a target hard drive. You can also copy to a disk image by clicking "Create Image", this will backup the selected recordings to your computer.

If you have attached your target hard drive and it is not showing up, make sure that it contains no partitions. Hard drives with partitions are not shown in the list so that a loss of data is prevented.

ExPVR Screenshot

After clicking next, the copy process will start. For large drives this can take some time.

ExPVR Screenshot

Thursday, 25 April 2013 13:37

Extracting Recordings to Your PC

Firstly you need to load your planner, see Planner Loading for details.

From the list of recordings displayed you can select the ones your wish to extract by clicking the check box next to each recording. You can also right click the recording list and click 'Check All' to select all of the recordings.

Once you have selected your recordings, simply click the computer icon on the toolbar.

ExPVR Screenshot

Once you have selected a destination for your recordings, they will start to copy to your computer.

ExPVR Screenshot

Note that unregistered versions of ExPVR will only extract the first 200MB of each recording.

Page 1 of 5