Teltonika RUT-240 / RUT-950 poor wifi client performance (fix!)

I use a couple of Teltonika RUT-240 and RUT-950 routers. One of them I bring with me when I travel. To save 4G data I usually hook it up as a wifi client against the hotel wifi.

After a while I realized the performance was really poor with a lot of packet loss and loosing connection completely from time to time. I moved the router so the signal was good (about 90%) but still had problems.

When configuring the wifi client failover, I set interval to 60, track ip to three different adresses (8.8.8.8, 8.8.4.4 and 1.1.1.1), reliabilty 1, count 10, up 3, down 3. This is to make sure that there is time enough to click through the hotel’s wifi portal page (before that you don’t have internet connectivity and ping will fail).

When I scan for a new network, I look for the access point with the strongest signal and copy the BSSID (8 hex numbers separated with colon). In hotels there are often several access points for the same network name and sometimes my router seems to be switch between them. In the wireless configuration screen I paste the BSSID in the BSSID field for the network I am connecting to, making sure I always connect to the strongest one.

While I’ve been travelling, I have been a bit lazy and just left different hotel’s wifi in the configured network list (I might return some day I thought). However, this seems to be bogging down the router. After I clearead the list of old wifi client configurations, my router became much faster and the connection was now really stable.

iPhone, iPad or Mac computers unable to connect to wifi network

The Apple products, iPhone, iPad and Mac computers sometimes has problems when connecting to a wifi network where other devices have no problems. The problem seems to be in the encryption used.

Make sure the router doesn’t have WPA/WPA2 mixed mode enabled, i.e. set it to WPA2 only. If encryption is configurable, use AES (not TKIP or TKIP/AES).

You can also read more about Apple recommendet wifi router settings here: https://support.apple.com/en-us/HT202068

HP Procurve MSM422 / MAP-625 clients flow the dhcp server [solved]

A client was using the HP Procurve MSM422 / MAP-625 MultiService Access Point (wifi). It was being used in a rather crowded wifi environment and the problem was the wifi clients keept reconnecting and renegotioating so often that the DHCP server was overflowed, sometimes with DHCP requests every few seconds. They had been struggling with the problem for a couple of months and the focus was aimed at the DHCP requests.

It turned out that the problem was not in the DHCP negotiation at all, but was caused by the wireless clients that keept losing connection and each time when they reconnected a DHCP request was sent.

The client was misinformed, that 5 GHz band was prohibited in the country where it was set up (which is acutally not). So both radios (radio 1 and 2) where set to 2,4 GHz where radio 1 was set to 802.11n/b/g and radio 2 with 802.11b/g.

Furthermore, for radio 2 the value of the Antenna gain was set to the maximum which is 29 dBi in an attempt to boost the maximum power out of the system. However, this field works the opposite. In order to be regulatory compliant and not emit more than the allowed power, this field informs the system that it is connected to an antenna with 29 dBi gain, so to not emit illegal levels of power (output power + antenna gain), the system will reduce the actual output power (i.e. the power input to the antenna) by 29 dBi. But the system was using the internal antennas which, I guess, has more or less no antenna gain. This caused the system to actually emit -29 dBi, i.e. a very weak wifi signal.

The low power output made it hard for the wifi clients to “hear” the access point, which caused them constantly to lose connection and when reconnecting, they were sending a DHCP request, hogging down the DHCP server.

Solution:

  • Radio 1 was configured to use the 5 GHz band. This band is much less crowded than the 2,4 GHz band and the bandwidth is better, so when a client has the possibility, it is preferred if it can use the 5 GHz band.
  • Radio 2 was configured to use Internal Antenna with 0 dBi antenna gain.

Settings used when the problem was solved like this (click on the image to enhance it):

HP Procurve MSM422 MAP-625

HP Procurve MSM422 MAP-625

Improving wifi in a crowded wifi environment

This is a litle trick I use when I travel and hook up to a wifi network in a crowded wifi environment. Sometimes the network performance over wifi is really bad and the problem is that it can be caused by heavy traffic (like file sharing) on another wifi network sharing the same channel as yours. I have experienced this especially when travelling to big cities like Paris, Amsterdam and so on. First of all, it is recommended that you disable 802.11n wifi mode which works terribly bad in crowded environments. See this article for Windows and this for Linux (Ubuntu).

 

Crowded wifi environment (Wifi Analyzer for Android)

Crowded wifi environment (Wifi Analyzer for Android)

The problem with the wifi technology is that networks in the neighbourhood is sharing the same channels. In the 2,4 GHz band there are only 11-14 channels availible (depending on your region) and those channels overlap. That means if your network is on channel 1 you will get interference with traffic on channels 1, 2 and 3. Another problem with wifi is that is has no means of evenly dividing the capacity (like timeslots), so it is kind “the one shouting highest gets the most bandwidth”. And when someone already is using a lot of bandwidth (like file sharing) it is very hard for other users to obtain a part of the bandwidth. Even if it is the neighbours wifi which you can’t access but it shares the wifi channel.

A countermeasure to improve the situation is to constantly use some bandwidth forcing the heavy users to pull back a bit. Before transmitting, each node in the network listens in the air if the channel is free, so by using a little bit of bandwidth even if idle you don’t give the other node the same possibilty to hog the entire capacity.

First of all, find out the IP address of your local network default gateway. In WIndows you run a command prompt (cmd) and type the command ipconfig. In Linux you can use netstat -rn.

To constantly use up a small portion of the bandwidth I use the ping comand. Ping normally sends very small packets (56 bytes), but to get this to work we need a bit larger packets (but not to large, then we will hog the entire capacity). 1024 bytes is good.

In Windows you run the command (replace 192.168.0.1 with the IP-address of your local network which you found out above):

ping -t -l 1024 192.168.0.1

and in Linux you run:

ping -s 1024 192.168.0.1

 

ping with 1024 bytes

ping with 1024 bytes

Voila! Now my wifi connection gets a lot more stable because I force the other wifi nodes to pull pack a bit since I constantly make them aware of my presence.

 

Disable 802.11n on Compaq 6910p with iwl4965 in Ubuntu

I’ve found out that the 802.11n high speed wifi / wlan mode (300 Mbps theoretically) tends to cause more harm than good, i.e. the performance in many, especially crowded, wifi environments will be really poor and it is a better option to turn it off.

My Compaq 6910p laptop comes with an Intel Wireless WiFi Link 4965AGN chipset. The 802.11n mode can be disabled making it fall back to only use 802.11a/b/g modes casuing the connection to be much more stable and often the overall bandwidth will be better.

To check if your chipset is running with 802.11n enabled, enter the command:

sudo iwconfig wlan0

The output will look something like this:

wlan0     IEEE 802.11abgn  ESSID:"XXXXXX"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:0C:F6:82:90:28
          Bit Rate=14.4 Mb/s   Tx-Power=15 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=51/70  Signal level=-59 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:66  Invalid misc:36   Missed beacon:0

If the first line says 802.11abgn your chipset has 802.11n activated.

To disable 802.11n mode do the following:

sudo modprobe -r iwl4965
sudo modprobe iwl4965 11n_disable=1

This will disable 802.11n until next reboot. Now check again with sudo iwconfig wlan0 and the output should display the first line without the “n” after 802.11, like this:

wlan0     IEEE 802.11abg  ESSID:”XXXXXX”
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:0C:F6:82:90:28
          Bit Rate=54 Mb/s   Tx-Power=15 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=46/70  Signal level=-64 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:7  Invalid misc:485   Missed beacon:0

If you want to make this change permanent, i.e. always disable 802.11n, do the following:

sudo echo "options iwl4965 11n_disable=1" >> /etc/modprobe.d/iwl4965.conf

After rebooting, verify using sudo iwconfig wlan0 that 802.11n is not enabled.

 

Samsung Ultrabook series 5 loses wifi connection intermittently

On a rather new Samsung Ultrabook series 5 we had intermittent / sporadic connection problems on some wifi networks. The status for the network shifts forth and back between ok and “No internet access”. This doesn’t happen on all wifi networks. It seems the problem is the 802.11n mode, especially in a crowded wifi environment.

The solution (or workaround) is to disable the 802.11n mode in the wifi driver for the Intel(R) Centrino(R) Advanced-N 6235 chipset. This gives a lower bandwidth connection but on the other hand, a stable connection.

  1. Go to the Control panel
  2. Open Network connections (search for it if you have troble to find it)
  3. Right click on your wifi connection and select Properties
  4. Click Configure in the upper part of the box (my screenshot is danish, so it is the button labeled “Konfigurer…”)

    Intel Centrino Advanced N-6235

    Intel Centrino Advanced N-6235

  5. Click on the Advanced tab
  6. Find the 802.11n mode status configuration parameter and select to set it inactive (off)
  7. Click Save / OK in the bottom

 

 

FON 2.0n router sharing 3G over Wifi

When you’re travelling as a professional nerd, you regularly needs to access the Internet. Internet cafés can be expensive and 3G… don’t think about using it abroad. It ususally costs a fortune.

I joined the FON network where you share your broadband connection at home to other FON-users and in return you are able to use the 1.5 million (and growing) FON hotsposts around the world for free.

In 2009 FON launched a new router, the FON 2.0n. It is packed with features (to read more about it, see FONs website), but most important is the USB port where it is possible to attach a 3G device. This enables you to share your 3G internet connection over the FON 2.0n wifi router. I usually bring this router on trips where I need to share my 3G internet connection to several computers over Wifi.

Read more