Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Wi Fi Connection with Laptops

nanravi edited this page Mar 13, 2013 · 5 revisions

Overview

It is a likely scenario that Telecom services may be down during emergency situations. Hence it is necessary to find alternate ways to connect RapidFTR-Android phones with a RapidFTR server.

It should be possible to run RapidFTR on a laptop or netbook, and use that as a temporary server until internet services are back. The rest of this document deals with how to connect to this laptop from the Android phone.

Connecting to Laptop from Android phone

Use an External WiFi Router

This is the recommended option. There are a plethora of external WiFi routers ranging from:

Use Laptop's built-in WiFi chipset to create a Wi-Fi network

This is discouraged, use an external WiFi router whenever possible

Ad-hoc networks are not supported by Android phones, so we have to create a Wi-Fi network on the laptop which can act in Master-Mode or Access-point-mode. In this mode, the laptop behaves and responds as an actual WiFi router. This mode is supported only by select WiFi adapters and drivers.

This mode is generally discouraged since the stability/reliability of the networks is not up to par, WiFi range is poor (since built-in WiFi chipsets are highly underpowered in order to not interfere with other components on the chipset), it is supported in only select drivers and adapters, and generally requires much more configuration to setup.

The following links can get us started:

Actual Steps followed in Ubuntu:

sudo apt-get install hostapd dnsmasq
  • Configure dnsmasq (/etc/dnsmasq.conf):
interface=wlan0
dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
dhcp-option=option:router,192.168.0.1
Configure hostapd (/etc/hostapd/hostapd.conf):
interface=wlan0
driver=nl80211
ssid=<ssid>
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=<passphrase>
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
  • Stop network manager, it messes up the entire effort: "sudo service stop network-manager". Unfortunately this disables Wi-Fi at hardware level, so lets enable it
sudo rmmod <wifi-driver> # in our case driver was b43
sudo rfkill unblock all
sudo modprobe <driver>
  • Bring up and assign an IP to wlan0, this IP must be the same as the configured router in dnsmasq:
sudo ifconfig wlan0 up
sudo ifconfig wlan0 192.168.0.1
  • Start dnsmask
sudo /etc/init.d/dnsmask start
  • Start hostapd:
sudo hostapd /etc/hostapd/hostapd.conf