Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Although many questions have already been asked regarding WiFi hotspot, I didn't get any of the solutions working for me.

I connect to the Internet using a 3G Dongle of Huawei 3772 (Vodafone). The connection type is Mobile Broadband connection. I have to share this Internet connection with my other devices like mobile phones and laptops.

How can I create a WiFi hotspot connection for this connection.

I am using Ubuntu 12.04 LTS.

I would like to note that I have already tried some help links from Ubuntu but, they are so confusing that I could not understand them.

share|improve this question

2 Answers 2

install ap-hotspot :

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

update it for ubuntu 14.04 if you are using it :

amd64 : http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
32 bit : http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb

example on amd64 :

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

usage :

$ sudo ap-hotspot start

// follow the configuration for password & ssid

if u want te re configure it again :

$ sudo ap-hotspot configure

to stop it :

$ sudo ap-hotspot stop

to check the configuration :

$ ap-hotspot

share|improve this answer
For ap-hotspot to work you should turn-off your firewall. –  Sudheer Jul 8 '14 at 8:17

To make your ubuntu machine act as a wifi hot-spot for any device, install and configure the hostapd package. It is designed for this very purpose. I'm sharing my mobile broadband connection (Tata Photon) with my android phone using this very method on ubuntu 12.04!

Here are the per-requisites you will need to use hostapd in this manner:


  1. Ability of your wireless card to support infrastructure mode. To find out:

    i. Find your kernel driver module in use by issuing the below command: lspci -k | grep -A 3 -i “network” (In my case, the driver in use was ath9k)

    ii. Now, use the below command to find out your wifi capabilities (replace ath9k by your kernel driver): modinfo ath9k | grep ‘depend’ (iii) If the above output includes “mac80211” then it means your wifi card will support the AP mode.

  2. Hostapd software: Hostapd is the standard linux daemon that will be used to create your access-point.

  3. Dhcp software: Even after hostapd creates the AP and your device detects it, you will still need a dhcp server to assign a dynamic ip-address to your AP client. (unless you are assigning static address to each device)

Refer my article for further details on how to set up and configure the hostapd package.

Update on 08-Jul-2014

To solve this problem, I've written Hotspotd, a small linux daemon to create a wifi hotspot on top of hostapd. It uses dnsmasq for IP-address provisioning to and iptables to generate the routing table.

To install:

wget https://github.com/prahladyeri/hotspotd/raw/master/dist/hotspotd-0.1.tar.gz
tar xvf hotspotd-0.1.tar.gz
cd hotspotd-0.1/
sudo python setup.py install

Workaround for 14.04 broken hostapd bug is included.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.