This firmware allows you to reduce the noise margin via the routers web interface. I first logged the modems varying ADSL2+ noise margin over a period of about a week from a Macmini using a shell script (shown below) to Cosm. This was to get a feel for the actual noise conditions on my telephone line over a period of time.
Note the area of the graph with off scale and flat line is where I was playing around with the Router. From the graph below one can see that before the noise margin reduction it was around 10dB, and you can see the reduction at night time due to interference from MW radio stations etc reducing the noise margin. You can also see where I reduce the noise margin down to the target 6dB, this is where my download speed increased from 5Mbps up to 7.4Mbps, what a result :).
The connection has been rock solid for over a week with no line re-sync and a very low crc much in line with what I experienced with the higher noise margin and a lower speed.
Shell Script RouterCall.sh
# This script uses another script cosm.sh to send data to the Cosm Website
# Note you have to create an account yourself and use this id for your script
#!/bin/sh
while [ true ]
do
# Create my data files
touch noise.txt speed.txt data.txt
# Get content of Stats Page from Router
wget --http-user=admin --http-passwd='********' http://192.168.1.1/stattbl.htm
# Get data into files
cat stattbl.htm | grep kbps | cut -d\> -f3 | cut -dk -f1 | head -1 > speed.txt
cat stattbl.htm | grep db | cut -d\> -f3 | cut -d\< -f1 | cut -dk -f1 | tail -2 | head -1 > noise.txt
# Load Variable list with contents of speed.txt
noise=`cat noise.txt`
speed=`cat speed.txt`
# Send data to Cosm by creating a json file containing the data
echo -e {\"version\":\"1.0.0\",\"datastreams\": [\{\"id\":\"ADSL\",\"current_value\":\"$noise\"\},\{\"id\":\"speed\",\"current_value\":\"$speed\"\}]\} > data.json
# Run other Shell script
cosm.sh
# Remove the created files to renew them next time
rm noise.txt data.txt speed.txt data.json stattbl.htm
# Wait for 5 minutes before looping again
sleep 300
done
Shell Script cosm.sh
# Script to send Data to your Cosm feed page
#!/bin/sh
curl --request PUT --data-binary @data.json --header "X-ApiKey: ***********You use your Key Here************" --verbose http://api.cosm.com/v2/feeds/***Your Feed Number Here*******
Update: I have managed a consistent 8.227Mbps by reducing the noise margin to around 3dB, it is also a rock solid connection and is much better than my old Zyxel P-660HW T1 V2 at around 4Mbps, it also used to restart for no reason even when it was brand new.
Further Update: I have now managed a consistent 9.139Mbps by further reducing the noise margin to around 2.4dB, it is still a solid connection. It was up at 9.9Mbps but this was not stable so it was reduced. These changes were made in the summer when static and atmospheric noise is at its highest on the frequencies used by ADSL2 so fingers crossed that it stays this way :).
References Used: With grateful thanks
Making a datalogger for a Kamstrup electricity / gas meter with Raspberry Pi!
Duncan Jauncey's Blog

0 comments:
Post a Comment