4

I am on ubuntu 12.04 and I want to create a wifi hotspot to be used with my android device. Now I know there are so many tutorials available every where and that I have all options in network tab to use but I couldn't get it to work.

Android does not work with an adhoc connection and whatever wifi network I created, my android device could not connect to it (I could connect a phone using bada to it and other computers can also be connected) I know the work around to get android on a adhoc connection but can't I have some thing as simple as connectify for windows?

PS : I am not looking for workarounds involving android.

Shagun Sodhani
  • 842
  • 1
  • 13
  • 36

2 Answers2

2

There is a way but only if your Wireless card supports it. If it does you can turn your WiFi into AP Mode. This basically turns your WiFi card into a normal WiFi Router using the Infrastructure archetype. There was already a Question specifically about AP Mode and someone wrote a very nice How-To. You can find it here:

How to setup a wi-fi hotspot (access point mode)?[SOLVED]

If your WiFi card doesn't support AP mode I'm afraid your only option is to get a Mobile Router(or buy an external WiFi card that supports AP). I have one and have found it very useful. I've even used my Ubuntu Laptop to act as a bridge between the Mobile Router and Hotel WiFi. That way I can log into the Hotel WiFi on the Laptop and then another device(like a Roku) without a Browser can connect through the Mobile Router and my Laptop to the Internet.

japzone
  • 1,283
0

Ubuntu allows you to create an ad hoc wireless network though most android and windows devices may not be able to connect to it. The alternative is the script mentioned in the link and I am summarizing the steps for using the script here so that the answer remains useful even if the link is gone.

Run the following commands in the terminal:

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

For 14.04, you need to downgrade hostapd and use apt to hold the package so that it is not updated.

Commands for 14.04

64bit:

cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

32bit

cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

Usage

To start AP-Hotspot:

sudo ap-hotspot start

To run the configuration again:

sudo ap-hotspot configure

To stop the wireless hotspot:

sudo ap-hotspot stop

To restart the wireless hotspot:

sudo ap-hotspot restart

To see all the supported commands

ap-hotspot

The default SSID is "myhotspot" and the default password is "qwerty0987".

Shagun Sodhani
  • 842
  • 1
  • 13
  • 36
  • Although your answer is 100% correct, it might also become 100% useless if that link is moved, changed, merged into another one or the main site just disappears... :-( Therefore, please [edit] your answer, and copy the relevant steps from the link into your answer, thereby guaranteeing your answer for 100% of the lifetime of this site! ;-) You can always leave the link in at the bottom of your answer as a source for your material... – Fabby Feb 05 '16 at 11:18