Ubuntu: Creating a wifi hotspot from a wired connection on Macbook for iPhones



Question:

I am trying to configure my own hotspot. I've tried following the instructions in this answer: https://askubuntu.com/a/180734/297819 with no use.

I don't have 'AP' appear in "Supported Interface modes", and I can't find the file etc/hostapd/hostapd.conf either. And apparently, Ubuntu 14.04 (my version) has a problem with the update of hostapd anyway.

Any suggestions?


Solution:1

install ap-hotspot :

//if you are not running ubuntu 14.xx

$ 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  


Solution:2

First, find out whether the kernel supports wifi on your machine or not by this process:

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.

Its true that 14.04 has some issue with hostapd, but there is an easy workaround for that:

sudo nmcli nm wifi off  sudo rfkill unblock wlan    sudo ifconfig wlan0 10.15.0.1/24 up  sleep 1  sudo service isc-dhcp-server restart  sudo service hostapd restart  

Source: Launchpad bug report on hostapd - 1289047

Use the second last command only if you use dhcp server. Read my other answer on this topic for reference: hostapd error "nl80211: Could not configure driver mode"

Update

The wl driver you are referring to implies a Broadcom proprietary driver. Unfortunately, this driver isn't supported out of the box for access-point mode by the linux kernel. Your only options are:

i) Remove the wl driver module, and install a working alternative. These links could be helpful for you:

https://unix.stackexchange.com/questions/35537/does-bcm4312-802-11-b-g-lp-phynetwork-controller-support-hostap

http://pof.eslack.org/2012/05/23/why-broadcom-80211-linux-sta-driver-sucks-and-how-to-fix-it/

ii) Go back to using your Windoze/Crapintosh (I generally hate to give that option to someone and I'd never take it myself, whatever research the alternative takes!) and use connectify or a similar software.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »