en_Source_...rch 2014

Page 81

How To

Open Gurus

This article walks readers through the process of setting up an Android-friendly hotspot.

L

et’s suppose you have a laptop and a phone, and you want to share your laptop's Internet connection with the phone (reverse tethering). You might think it's as simple as going to a network connection and creating a wireless connection. Unfortunately, it's not, because the hotspot created by laptops generally supports only two modes—Ad-Hoc and Infrastructure (which can be seen in Figure 1). Both these modes are not supported by most of the Android and Windows phones in the market. So let us go about creating an Android-friendly or a ‘phone-friendly’ hotspot. For this article, I’ll be using Ubuntu 12.04 LTS.

Installation

Let’s first install Hostapd from the Ubuntu software centre. If you prefer the command line, then just type the following command: sudo apt-get install hostapd

You can also download and compile Hostapd from source, from its site http://w1.fi/hostapd/. For other distributions, search for the package named hostapd in your repository. As explained in http://acx100.erley.org/git.html, Hostapd has the following levels in managing Wi-Fi and each level is explained as follows: “Wireless card: Should be self-explanatory... handles

sending/receiving wireless packets Linux kernel: The Linux kernel contains the driver for the wireless card, and the nl80211 sub-system, which handles the configuring of wireless interfaces for user space libnl: libnl is the transport layer used to communicate with the kernel via netlink udev: udev is the facility the kernel uses to pass events/calls to crda iw: iw is a userspace utility that we can use to test that libnl is working correctly, as well as to create additional virtual wireless interfaces on the wireless card crda: crda is a userspace program that the kernel queries (through udev) to find what channels/frequencies are usable, and at what powers. This moves the information out of static tables maintained in the kernel to userspace, which allows them to be updated without reloading drivers or rebooting Wireless regulatory database: This is the database of allowable frequencies and transmit power levels used by crda Hostapd: This is the daemon that handles the generation of beacons and other wireless packets, as well as wpa-psk, wpa2, etc, encryptions.”

Checking your Wi-Fi card

Hostapd supports the following drivers: mac80211-based drivers with support for master mode [linux] Linux drivers that support nl80211/cfg80211 in AP mode www.OpenSourceForU.com  |  OPEN SOURCE For You  |  march 2014  |  81


Turn static files into dynamic content formats.

Create a flipbook

Articles inside

Boost Your Employability with Hadoop Skills

6min
pages 97-98

CIO Talk: “We are probably a

8min
pages 94-96

Use Maxima for the

5min
pages 89-93

Create an Android-friendly Hotspot in Linux

12min
pages 81-85

Emerging Technologies Enhanced by Open Source

10min
pages 86-88

Setting up Dovecot, the IMAP Server

19min
pages 74-80

Caching Django websites with Memcached

4min
pages 72-73

Set Up a Reverse Proxy in Apache

8min
pages 67-69

Rainmail Intranet Server A Complete IT Set-up for the Enterprise

5min
pages 70-71

Monitoring Log Files with Nagios Plugins

5min
pages 63-64

Choose the Best Network Monitoring Tool for Your Needs

5min
pages 65-66

Editorial Calendar

1min
page 52

Monitor Your Network

7min
pages 58-60

Three Tools to Help You Protect Your Network

10min
pages 53-57

Case Study: Microfinance

6min
pages 61-62

Joy of Programming: Under standing Concurrency Bugs

19min
pages 44-50

Exploring Software Building a Web Application Using Mochiweb

1min
page 51

Demystifying HTML 5 Attacks

8min
pages 41-43

CodeSport

14min
pages 34-40

Developing Web Apps with Bootstrap

15min
pages 24-29

You Said It

2min
pages 8-9

Turbocharged Tracing with LTTng

11min
pages 30-33

FOSSBytes

22min
pages 18-23
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.