20 December, 2007

Speed measuring script for Ericsson W25

Earlier I had speed problems with my unit and I wanted to make sure if it is only perception or if it is a real speed problem.
The concept what I have implemented was, that the unit should make a test every 15 minutes to check the download speed of the cellular connection. Then the result with some other relevant information is added to a file stored on the external USB flash drive.

So here is the script:
wget -q -O /dev/null http://www.ericssonw25.com/pdf/w25_V1.2_R6A019.zip &
wget -q -O /dev/null http://www.ericssonw25.com/pdf/W25_Users_Guide_D.pdf &
wget -q -O /dev/null http://www.ericssonw25.com/pdf/W25_Users_Guide_C.pdf &
sleep 3;
bejovo=`cat /proc/net/dev |grep ppp0 |cut -d":" -f2 |awk '{print$1}'`;
sleep 5;
bejovo1=`cat /proc/net/dev |grep ppp0|cut -d":" -f2 |awk '{print$1}'`;
kill `pidof wget`
echo `date '+%Y.%m.%d %H:%M'` `echo $bejovo $bejovo1 |awk '{print (($2-$1))/640}'` kbps `msctl rscp` `msctl ecio` `mctl issue at*cnti=0 |grep CNTI` >>/mnt/C2F8-E4F2/speed ;
It does the following:
  1. The first 3 lines starts a download from 3 different places. In my example I have used the same server for all of them, but when installing it for yoor computer you should select 3 different servers, if possible from different countries.
  2. After 3 seconds I start the real measurement, by querying the actual bytes received from the ppp0 interface
  3. After 5 seconds, I check the new bytes received in the ppp0 interface, stop all the ongoing downloads
  4. Finally I echo the date, the measured speed, the rscp, the ecio and the type of cellular service used to the speed file on the USB flash memory.
When installing you schould change the files to download and the place where you want to store the measurement result.
The result is something like this:
2007.12.20 11:30 1321.15 kbps RSCP: -77 dBm Ec/Io: -3.5 dB *CNTI: 0,HSDPA
2007.12.20 11:45 1328.03 kbps RSCP: -77 dBm Ec/Io: -6.5 dB *CNTI: 0,HSDPA
2007.12.20 12:00 1215.91 kbps RSCP: -75 dBm Ec/Io: -5.0 dB *CNTI: 0,HSDPA
2007.12.20 12:15 1421.46 kbps RSCP: -77 dBm Ec/Io: -4.0 dB *CNTI: 0,HSDPA
2007.12.20 12:30 1318.56 kbps RSCP: -76 dBm Ec/Io: -7.5 dB *CNTI: 0,HSDPA
2007.12.20 12:45 1302.59 kbps RSCP: -76 dBm Ec/Io: -4.5 dB *CNTI: 0,HSDPA
2007.12.20 13:00 1300.31 kbps RSCP: -75 dBm Ec/Io: -5.5 dB *CNTI: 0,HSDPA
2007.12.20 13:15 1230.03 kbps RSCP: -79 dBm Ec/Io: -5.0 dB *CNTI: 0,HSDPA
2007.12.20 13:16 1296.04 kbps RSCP: -75 dBm Ec/Io: -5.5 dB *CNTI: 0,HSDPA
2007.12.20 13:30 1229.59 kbps RSCP: -77 dBm Ec/Io: -6.5 dB *CNTI: 0,HSDPA

I am on a 1,8 Mpbs HSDPA network and the highest speeds I have measured are arround 1400 kbps. This is measured with an external antenna.
A nice chart made earlier

The internals of a firmware package for Ericsson W25

By analysing the /bin/swinst script it become clear, that the firmware package is a simple tar file, containing the software components to be upgraded. Usually it contains the following elements:


  • metainfo - detailed information and MD5 summs of the components to be installed

  • preinstall.sh - script to be executed before installing

  • postinstall.sh - script to be executed after installation

  • zImage - linux kernel

  • rootfs.squahfs - root file system

  • wanbl - wan module boatloader

  • wanfw - wan module firmware

The swinst script is quite complex, but basicly it download the firmware form the internet to the TMP directory, checks the checksums, checks the SW versions and if the upgrade is needed, the upgrades first the main firmware, then the WAN bootloader and then the WAN firmware. When installing the main firmware it increases the number used by RedBoot boot loader, this way it is garanteed, that on restart the new version will boot. On the other hand, if the installation is interrupted, the old Sw will start.

17 December, 2007

Ericsson W25 time syncronization

Using the default ip network based time sycronization has two disadvantages:


  • As you can not set time zones your device will run always on GMT

  • In the current SW version the ntp daemon is crasing after some days so you will loose syncronization

You can change it to cellular based syncronization with the following commands on the command line interface:


# cf set sntp.enabled false


# cf set cellular.celltime true


# cf commit


This will use your local time and will run forever.

I have implemeted this 2 days ago, but it turned out that you can use this only if you have good enough coverage, othervise you will not get the time from the cellular network. So I swicthed back to the ip network based syncronization and I will write a script to periodically restart the time syncronization process.

14 December, 2007

Ericsson W25 running binary files from other sources

I have spent some hours trying to find a propper source to get prebuilt binary files to be executed on the Ericsson W25 without sucess.

I could figure out that I need "armeb" type files and I have found them in the Debian ARM packages and in OpenWRT kamikaze version, but none of them was usefull as the debian used a different version of the main c libraries and OpenWRT uses uLibC.

If anyone know more sources of ready made binaries, please let me know.

Ericsson W25 Dynamic DNS

Dynamic DNS is a technology used to have a permanent address even if your ip address is changing all the time. To do this you have to register at one of the Dynamic DNS providers (I have used no-ip.com), select a nice web address for yoursef (e.g. kiki.no-ip.info) update your ip address and access your computer on this new address (kiki.no-ip.info).

The update of your ip address can be done automatically by this simple script. The script checks your IP address and if it is changed it simply request the https page defined for updating your ip address. You can find this address for other DynDNS providers in their developer documentation. When requesting the update, you even don't have to include your IP address as the server will see it from the request.


#!bin/sh
IP=`ifconfig ppp0 |grep "inet addr" |awk '{print $2}' |awk -F: '{print $2}'`;
if [ ! -e /var/tmp/oldip ] ; then
OLDIP="1";
else
OLDIP=`cat /var/tmp/oldip`;
fi;
if [ $IP = $OLDIP ] ; then
echo "equal"; > /dev/null
else
wget -O /dev/null --http-user=your@email.address --http-passwd=yourpassword https://dynupdate.no-ip.com/nic/update?hostname=kiki.no-ip.info
fi;

echo $IP > /var/tmp/oldip
Save this script as dyndnsupdate to the /root direcftory and add the following to your /root/custominit:

echo "* * * * * /root/dyndnsupdate" >>/var/spool/cron/crontabs/root
sevice crond restart