05 December, 2008

Changes in Ericsson W25 11B firmware

I have not checked it very thorowly, but Ericsson has changed a lot of the programs used in the Ericsson W25 router.

I have mentioned before that the wget has dissapeared. The time setting from network is now fixed, it keeds up and running even after connecting and disconnecting to the ionternet.

Another change that the DNS and DHCP services were changed to a program called DNS relay, you can find it's decription here. If you want your domain handled with it, simply put the following line in your /etc/dhcpdoptions.conf file:


Other new tool is the xl2tpd (which is not and excel to pdf converter :-) which is the tunneling (e.g. ipsec) handling part. description of a simmilar program can be found here.

25 November, 2008

Low power consumption appliance based on desktop computer

I would like to have an always on server for my home network, and altrough I have already two ARM based routers which can be customized, I would like to have an x86 based computer, because it is much easier to install linux programs on it and normally they have faster processors and more memory than the ARM counterparts.

I would like to use it for 3 functions:
  1. To be the center of the home network with an Apache based WEB interface, whcih can do all network related tasks
  2. Install an Asterisk PBX and connect all our phones to it, including mobile phones via Bluetooth
  3. Be a storage backup server with two Tbyte or close to Tbyte SATA hard disks
Earlier I had a 3G/HSDPA WLAN gateway created from an old laptop, and with the HDD and display switched off, it consumed only 10W, but I was considering to have a modern desktop motherboard with a Intel E2160 or simmilar processor to reach a good power consumption.
Before going into this I checked the power consumption of different solutions on the internet and it turned out that even with an Atom processor based desktop solution it is very difficult to go below 30 W which is not acceptable for my purpose.
Here are the figures I have found:
Gigabyte GA-MA74GM-S2 with AMD processor - 31W - laptop HDD
Atom 230 single core - 27W - with laptop HDD
Atom 330 dual core - 41W - with desktop HDD
Gigabyte G33M-DS2R with Intel E2140 underclocked 40W - ??? HDD
So the conclution is that even the very low consumption of the Atom processor itself is nut visible on a complete system, as other components determine the total power consumption of the whole system.
When exploring this I found a very good site about building mini PCs here.
And found a far east company with a big selection of complete mini PCs on amazing prices here.

21 November, 2008

Upgrading Ericsson W25 to firmware 11B

After long monthes of perfect working, last week my internet connection trough the W25 started to become very unstable, most of the time even not working.
Looking at the statistics it turned out that something hapened in the network, which increased the speed of my connection :-), but after approximately one day, the connection became unstable and was more down that working.

My first guess was, that my operator has upgraded the serving cell from 3,6 Mbps to 7,2 and the 7D firmware I was using may have a bit buggy radio module. So I started the upgrade.
First I have upgraded to 11A, because I have downloaded that already before, and with the bad connection I could not check if there is a better FW available. The upgrade from the WEB UI went pretty smothly, after waiting a lot for checking the radio module FW version, the procedure ended without any problem. I was a bit afraid, that my root password will be changed, but the upgrade behaved correctly and did not change my credientials.
After logging in and trying to test the connection speed, it turned out the wget was removed from the firmware :-( This meant, that from my customizations, DynDNS, speed measurement and daily stock reports in SMS wont work any more. This would have been a pitty, but read on, the problem is fixed by now.
Nexy day I read on the W25 site that there is a 11B realease and from the release notes it looked, that there are a lot of bug fixes and a new radio ROM, so I have upgraded to the new version as well.
This upgrade went smoothly as well, the only thing was was a bit alerting, that it did not wrote anything about the radio firmware upgrade and on the end of the upgrade a new window camu up with a simple "null" text in it. But after restarting everything was ok, both the base and the radio firmware was ok.
Fixing wget
For this I went for the easiest solution I simply copied the wget file from an older firmware version I think it was a 4 or 6 series FW, but it ran without problems on the new version. So I copied it to /root and updated the custom scripts to use it. This fixed all my custom script problems.
Fixing internet problems
It seemed that the new FW did not solve the internet instability problem and from the measurements it looked like the EC/IO value is very fluctuating with this station, so I turned over my external antenna to another station and it seems that this solved the problem. What is a pity, that with the old station after the speed increase I hav speed over 2,5M, with this one I have speeds between 1,5-1,8 M, but this speed is pretty good for a lot of uses and is better to have a stable lover speed connection that a copletely unstable fast connection.
Here is the effect of changing the station:

07 October, 2008

Links to NAS and SAMBA performance

In my prevoius blog I wrote about my tests to increase the read/write speed on my Linux home server, now I will collect some links here:

A very good comparition of Windows and Linux file system for using as a NAS.

Test result for a consumer NAS device.

Test results for Linux file systems (ext2, ext3, Reisser, XFS).

IOZone test suite.

NAS performance measurement comparations.

A test measurement of comparing Solaris ZFS, Ext2 and XFS in NAS environment. It is using NFS intead of SAMBA, but the speed results are very convincing with read speeds over 76 Mbyte/sec and write speeds arround 35 Mbyte/sec.

I started to do some own test in the server itself, and copying a file from one disk to an other was done with the speed of 23,4 Mbyte/sec, which shows, that it is possible to write to an ext3 filesystem with speeds above 20 Mbyte/sec. I will do some more testing later.

I did some testing on my Windows Desktop computer and got a read and write speed of ~90 Mbyte/sec, and this is the benchmark, this is what I am aiming.

The iozone program seems to be a good test program, but if you are interested in the raw filesystem performance you should do the measurements with larger files. I plan to use the following command line:

iozone -Rb result.xls -i0 -i1 -s 4G -r 32M -f [filename to test] -+u

05 October, 2008

NFS Client for Windows XP computer crashing with large files

I have recently installed a gigabit card to my home fileserver and was very dissapointed, that the speed of network writes and reads did not increased as I expected.

I found some Samba improvement tips, but they increased the speed only by ~10 percent, while I would expect to have network speed on the range of 50 Mbytes/sec.

To make an experiment I wanted to use NFS instead of Samba, from one unix test it looked much faster than Samba.

There is an official Microsoft client for this, it is named Unix Services for Windows, the actual version is 3.5 and it is quite outdated. Still after installing it and configuring both the server and the Windows XP it worked adn when attempting to read files it was quite stable. But as soon as I tried to copy a 4,3 Gbyte ISO image, my XP crashed completly :-(

After a lot of search finally I could identify that you should apply the hotfix: KB904838 and this will solve your problem.

Back to the original problem, I have measured the following speeds:


read: 25 MByte/s write: 5 MByte/sec


read: write: 20 MByte/s write: 250 kByte/sec

16 September, 2008

Setting up Windows Mobile smartphones for network access

Setting up a Windows Mobile device corretly for accessing internet, corporate network, MMS and WAP is not a trivial task and on the top of it it can not be done using only the user interface provided on the device.

The easiest way of doing it is to create a special XML file, containg the needed settings, then put it into a cab file, which can be simply installed on the device.

In this post there will be a short overview of the handling of the different networks in a WM device, then there will be the explanation of the configuration file created for the Pannon nework in Hungary and then some references will be given to further setting possibilities.

As oposed to other mobile phones, where you have to set the gprs connection manually for each application, in windows mobile there is a rather complex system, which tries to figure out automaticaly from the web address used, that which connection to use.

Let's see, how this works:

First the address is compared to the Mappings an this decides which Network to select. The default Mapping in the device is the following:

wsp://*/* - WAP Network
wsps://*/* - Secure WAP Network
*://*.*/* - The Internet
*://*/* - Work

So the WAP addresses are idetified by the protocol identifier, the internet is identified by having a dot in the address and work connections are identified by not having dot in the host address.

If in Settings/Connections/ Advanced/Work URL exceptions you add "*.mycompany.com" then the following entry will be added to this mappings:

*://*.mycompany.com/* - Work

When the destination network is determined, then the next step is to look for the actual connection. There are two possibilities:
  1. There is a GPRSEntry for that network then that connection can be used to access the destination
  2. If there is a ProxyEntry where the destination network is the same as the wished destination network and source network is already connected or the destination network has no GPRSEntry but the source network has, then the source network can be used with the proxy to reach the destination.

There are some Planner settings which affect the exact way, how this is working, probably it possible to setup priorities between the possible connections within one network (e.g. WLAN and GPRS), I have not checked what is this exactly doing.

After this theorethical introduction let's see how a mobile phone has to be set up to connect always to the correct network:

1) Internet connection for browsing: this is a simple GRPS APN, this is easy, we simply have to add a GPRSEntry to the "The Internet" network.

2) Corporate network access, this can be either a separate GPRS APN or can be a VPN over the internet connection. I have used a separate GPRS APN, but I had not included it into the setup file, as I wanted to keep the setup generic. What I had to do, that after installing the CAB file, I had to add the corporate GPRS APN to the "Work" network in the setting and add the Work URL exceptions on the user interface. (A separate setup file could have been created for this also)

3) WAP: for most mobile operators you have to use a proxy to access a WAP network, therefore you have to create a new Network called for example "Operator WAP", create a GPRSEntry for this network, with the APN used for WAP and a ProxyEntry which connects this network to the "WAP Network" with the proper proxy settings, given by your operator.

4) Secure WAP: as the APN for secure WAP is the same as for normal WAP, you can reuse the "Operator WAP" created in the previous step, but need to add a new proxy with different settings which connects the "Operator WAP" network to the "Secure WAP Network".

5) MMS: the MMS routing is handled on the application level, so the Mapping table is not used for it, but you need to create a new network and GPRSEntry for it, to be able to set up the MMS application to use it.

After this is done, the last step is to setup the MMS application to the operator provided settings by setting some registry values.

The actual XML and the cab file which installs it can be found here.

Ceating the CAB file is very easy, you have just to rename the xml file to _setup.xml and put it to a CAB file, which you can do for example with ZipGenius.

As a repetition the XML file does the following (you can check the actual implementation in the file):

1) Deletes all Network, GPRSEntry and ProxyEntries

2) Creates the Pannon MMS, Pannon WAP, Work, Secure WAP Network, WAP Network, The Internet networks with the proper IDs

3) Creates the GPRSEntries for the mms, wap and internet connections

4) Creates the WAP and Secure WAP proxies

5) Adds the Pannon WAP site to the favorites (to the first position)

6) It says that the prefered GPRSEntry for "The Internet" should be Pannon Net, this is needed because activesync automatically adds a Proxy entry, that the internet can be accessed trough the work network, which is not the case when connecting to the corporate gprs apn.

7) Sets up the MMS settings in the registry, including the network to access it.


As a bonus for reading so much, on the referenced location, there is another cab file, wich turns of always on GPRS and disconnect the connection when it is not in use.


There is still a problem with this setup, that the recognition of the WAP pages by the wsp:// protocol prefix is not working well, because the internal links in Pannon's WAP pages are not using it :-o. Probably by Mapping *://wap.pannon.hu/* to the "WAP Network" would help.


And finally if you haven't read enough some more references:

Microsoft documentation on possible customizations

Blog about the Connection Manager in Windows Mobile

How to set up national T9 and keyboard layout on Windows Mobile

08 May, 2008

Available linux commands in the Ericsson W25

I have created a list of the available command in the W25. Most commands give you a short help if you invoke them with the -h parameter, but where I have found, I have added a link to the description of the command.

Unfortunately this is from an older SW relese R6A019, but still most of the comands are valid:

List of Ericsson W25 linux comands

Where you see that the size of the file is 515908 these are the BusyBox commands.

08 March, 2008

Wake On LAN with Ericsson W25

After a lot of unsuccessfull experiments, finally I could manage to send out a Wake On LAN magic packet from the W25. The solution is not universal, because I rely on a second router on my home network, to respond to an outgoing TCP packet.

The difficulty in WOL for the W25 is that I found only the netcat (nc) program suitable for sending out IP packets from the router and the version of nc implemented in the W25 doesn't support UDP packets.

I have manually constructed a magic packet and saved it to a file. The command:

nc router2 80 < wakecode.bin

sends this packet the the second routers which silenlty ignores it, because this is not a valid HTTP request. But there is still a problem, that in a swicthed LAN this traffic reaches only the second router and not the computer to be waked up. The solution for this is to play with the arp addresses and manually assign the broadcast ethernet addres to the second routers IP address:

arp -s ff:ff:ff:ff:ff:ff

after waking up the computer you can delete this assignment with the following command:

arp -d

Implementig the same without using a second router or computer on the internal newtork is challanging, because you have to send out packet to the network, which has to be responded by the same machine. May be there is a solution by tweaking in iptables, or may be there is a command that you can use send out udp packages, but I have not found it.

22 February, 2008

Ericsson W25 Sending and receiving SMS

The firmware of the W25 doesn't support the handling of the SMS, but the bult in 3G modem does. So let's dig a bit into it and use this possibility. (In order to do this you need to have access to the command line of the W25).

To control the modem of the W25 there are two commands to use:
  1. msctl - this is a high level handling with predefined command

  2. mctl - this is a low level command, which you can use to send AT command to the modem

Try out:

msctl rscp - this will give you the actual strength of your reception

msctl issue ATI - this will give you information about the modem included in your device.

Now if we would like to know, which AT commands we can use, we have to download the AT command book from the Sierra Wireless site: AT command reference. If this download will not work, just search the Sierre Wireless site for the AT command reference.

When looking into this document, you will find a lot of interesting command, but you will soon realize that the command related to SMS sending are just marked supported or not supported in chapter 2, but there is no description. We have to download the 3gpp standards 27.005 and 27.007 to see the detailed syntax. If the link here doesn't work, you can find them on the http://www.3gpp.com/ site.

Now we have everything to handle SMS.

Reading SMS

To read SMS, first we switch the SMS mode to text:

mctl issue at+cmgf=1

then we list the unread SMS:

mctl issue at+cmgl

or the already read messages:

mctl issue at+cmgl='"rec read"'

Sending SMS

Sending SMS is a bit more complicated becuase we have to include a new line in the AT command, and I could not manage to do it with mctl. But we should not panic, we have the chat command on the system which is exacty designed to send AT commands to modems. So lets put together the appropriate chat script:

"" ATZ
OK AT+cmgf=1
OK AT+cmgs="\T"
> \U^Z

We start with ATZ to reset the modem settings, then set the text mode, then use the command at+cmgs to send the message. The \T is one of the parameters to chat, we use this for the phone number, \U is the other, we use it for the message itself. We are ready, but for making it easier to use, we write a script to send SMS in one step:

usage() {
echo "Usage: $0 'phone number' 'message'"
echo "Sends the SMS message"

if [ $# -ne 2 ]; then
exit 1
chat -T "$1" -U "$2" -f /root/testchat -v /dev/modemctl

exit 0

If you have spaces in the message then you should surround it between quotes (").

There is only one problem with this, that the W25 is collecting some statistical data every minute so if we send the SMS exactly at the same time, the two modem commands may mix together. To avoid this you may extend the script, whith a small part which checks the actual time and if it is beetween 55 and 05 seconds then just waits for some more seconds.

Of course it would be nicer to have this on a WEB interface, with handling all kind of unicode characters, but as Shrek said in relation to the Dragon, don't worry, it is on my list :-)

02 February, 2008

External WEB server on Ericsson W25

After you have implemented the DynDNS for your W25 the next thing would be to have an external WEB server.

As the W25 has a built in WEB server, it is only one line to start a web server. The command you should use is httpd.

To start an external web server serving pages from the "web" directory of the connected Flash drive, issue the following command:

httpd -i ppp0 -h /mnt/C2F8-E4F2/web

This will start the web server from on the ppp0 interface, with the home directory being /mnt/C2F8-E4F2/web. The index file should be index.html.

For all possible options to httpd issue httpd --help. To see the possibilities in the configuration file, go to the Busybox homepage and look at the examle coinfigutration file provided in the source for httpd.

01 February, 2008

New Firmware released for Ericsson W25 (1.3 R9D)

Half year after the last publicly released SW version from 21st January there is a new SW version available on the official website.

According my previous readings the 1.3 SW version solves some security issues, a memory leak in the WLAN driver and some minor issues.

When I will get a better internet connection, I will download the new package and update this post with the exact details.

03 January, 2008

Ericsson W25 DNS tuning

After using the W25 for some time I wanted to add a correct domain handling and certain new names to the DNS services offered by the router.

Default behavior of the DNS system:

The W25 uses the DNS server called DNRD which is a simple caching, forwarding DNS server, with the additional feature of being able to resolve names from /etc/hosts file. This is used in the original SW to add every local client after requesting an address trough DHCP. The updating of the hosts file is done by the script /bin/updatehostsfile which in is called by the script /etc/udhcpd/udhcpdnotify. The name of the script to be called by the dhcp daemon is specified in /etc/udhcpd.conf.

Handling your internal domain with the W25:

To handle your internal domain correctly you need to do the following:

  1. Add your local domain to the DHCP messages
  2. Create an updated "updatehostfile" script to include your domain names and fix addresses to the /etc/hosts file
  3. Change the dhcpd configuration to call your updated "updatehostfile"
  4. Include a call to the "updatehostfile" script in your init sequence

Let's start with 2:

Copy /bin/updatehostsfile to /root/updatehostfile1 (or anything you like)

Change the line:

printf "%s \t%s %s\n" $localaddress $HOSTNAME $HOSTNAME".home" >> $HOSTFILETMP


printf "%s \t%s %s\n" $localaddress $HOSTNAME $HOSTNAME".my.domain" >> $HOSTFILETMP

after this line insert:

cat /root/hosts >> $HOSTFILETMP

This will insert the copy of the file /root/hosts into the resulting /etc/hosts. Now by adding ip/name entries to the /root/hosts file you can add new machines to the DNS table (e.g. " myhomeserver.my.domain")

For 1 and 3 you have to edit the /etc/udhcpd.conf file:

Add to the end of the file:

opt domain laco.hu

change the notifyfile parameter to the following:

notify_file /root/updatehostfile1

For 4:

I hope that you can do this by yourself :-)