-
Notifications
You must be signed in to change notification settings - Fork 86
Wi Fi Connection with Laptops
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.
This is the recommended option. There are a plethora of external WiFi routers ranging from:
- Full fledged WiFi routers
- Pico Routers such as Picostation and Cnet
- Pico USB adapters such as those from D-Link and AirLink
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:
- Linux/Ubuntu: http://nims11.wordpress.com/2012/04/27/hostapd-the-linux-way-to-create-virtual-wifi-access-point/
- Windows: http://www.itgeekdiary.com/windows-7-as-an-wi-fi-access-point/
- Check if the Wi-Fi adapter is supported: https://help.ubuntu.com/community/WifiDocs/MasterMode
- Install/Patch the drivers if required. For our Broadcom drivers: https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx#A11.10_.28Oneiric_Ocelot.29_-_12.10_.28Quantal_Quetzal.29-1
- Make sure to test the adapter if Master Mode is enabled: https://help.ubuntu.com/community/WifiDocs/MasterMode#Test_an_adapter_for_.22master_mode.22
- Install hostapd and dnsmasq:
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