How To Create An Infrastructure WiFi Access Point To Connect Android Devices

Hi Guys,

Is always good to know that you can share your internet connection be it from LAN (eth0) or an USB Modem (ppp0) via your WiFi (wlan0) in order to connect other devices.

Someone may be asking why an infrastructure hotspot, since you can just click a button and turn your Ubuntu computer into a WiFi Hostspot.

Good question, the problem here is that Ubuntu’s Wifi hotspot is and ad-hoc and some Android devices really don’t have support for Ad-hoc. Due to this your device is not able to find Ubuntu’s default hotspot.

In this tutorial, thanks to ap-hotspot we are going turn our laptop and connect such devices.

Note: This is not 100% assured with all devices.

First we need to install ap-hotspot via PPA

Open Terminal and run the commands  below:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install ap-hotspot

After we have successfully installed ap-hotspot we need to configure it.

$ sudo ap-hotspot configure

ap-hotspot

$ sudo ap-hotspot configure
Detecting main network interface...
Detected ppp0 as the network interface connected to the Internet. Press ENTER if this is correct or enter the desired interface below (e.g.- eth0, ppp0 etc.): #PRESS ENTER

Detected wlan0 as your WiFi interface. Press ENTER if this is correct or enter the desired interface (e.g.- wlan1): #PRESS ENTER

Enter the desired Access Point name or press ENTER to use the default one (myhotspot):
setho-hotspot #NAME

Enter the desired WPA Passphrase below or press ENTER to use the default one (qwerty0987):
hackme_beb #PASSWORD

You can now start hotspot

$ sudo ap-hotspot start

ap-hotspot-start

Get your device and luckily you should locate your new hotspot.

 connected

$ sudo ap-hotspot stop

To re-configure run any time, Run:

$ sudo ap-hotspot configure

Enjoy.

Credit: WepUp8