Expanded WiFi coverage with a Rasp Pi access point network

In Operation

Because the Rasp Pi's have been substantially reconfigured, you should do a reboot to activate them as access points. Once activated, the main task will be to test how well a receiving device can roam between the access points and still maintain a satisfactory data connection. For the test application, you can establish a Skype video chat connection between the mobile device and one of the stationary devices inside the home network.

Mobile phones scan for a WiFi connection about every 10 seconds. They then use the information on reception power to determine whether it is necessary to change to another access point. In contrast to mobile transmission, in which the handoff is completely controlled by the network, the terminal device has to make decisions for itself in a WiFi network.

In my tests, a mobile phone was able to switch between the two Rasp Pi access points AP0 and AP1 without any difficulty. At times, marginal interruptions occurred with multiple transitions between the access points.

Notebook and WPA Supplicant

By now, most Linux distributions rely on the Network Manager administration tool for WiFi network connections. The disadvantage in this is that Network Manager adaptively regulates the WiFi scan rate itself, without allowing any influence by the user. Thus, you can easily find yourself outside of the optimal area of reception of one access point before Network Manager notices that a second access point providing better reception has become available. This situation leads to a noticeable stuttering in the connection.

You can prevent this interruption by switching the device mode to WPA supplicant [6]. Among other things, this approach allows you to specify the scan periods. In Debian-based systems, you achieve this as follows:

$ sudo apt-get install wpasupplicant wpagui

Afterward, you will need to modify the /etc/network/interfaces (Listing 5) and /etc/wpa_supplicant/wpa_supplicant.conf files (Listing 6) accordingly.

Listing 5

Modifying /etc/network/interfaces

# /etc/network/interfaces
auto lo
iface lo inet loopback
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Listing 6

Modifying /etc/wpa_supplicant/wpa_supplicant.conf

# /etc/wpa_supplicant/wpa_supplicant.conf
update_config=1
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
ap_scan=1
network={
  scan_freq=2412 2432 2452 2472
# conduct WiFi scans at more than -40dBm every 20 seconds,
# otherwise every 10 seconds
  bgscan="simple:10:-40:20"
  ssid="PiNetwork"
  scan_ssid=1
  proto=RSN
  pairwise=CCMP
  group=CCMP
# key_mgmt=WPA-PSK  # without fast BSS transition
  key_mgmt=FT-PSK   # with fast BSS transition
  psk="topsecret"
}

If Network Manager is still active, you can stop it by means of the sudo service network-manager stop command and then switch over to the WPA supplicant with the sudo ifup wlan0 command. The accompanying graphical user interface can be started by calling wpa_gui.

The most important characteristic of a fast BSS transition is that it dispenses with four-way authentication. Even so, I did not observe any significant change or improvement of the handoff times, regardless of whether fast BSS transitions were used.

In my tests, the corresponding log of the WPA supplicant package on the notebook computer (Figure 4) indicated handoff times of just under a tenth of a second in fast BSS transition mode. Occasionally, barely noticeable jerkiness occurred in the video chat during repeated transitions between the two access points. These small hiccups were considerably less noticeable than what was experienced with Network Manager.

Figure 4: The WPA supplicant system log in the WPA GUI on a notebook.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content