1

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?

aaldilai
  • 365
  • 2
  • 7
  • 13
  • ap-hotspot stopped working a while back because of some broken package in Ubuntu. I don't know if it has been fixed, but I used KDE connection manager instead. See this blog post: http://ubuntuhandbook.org/index.php/2014/06/share-internet-with-android-ubuntu-1404/ – Lars Nyström Jan 03 '15 at 14:33

2 Answers2

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
hwez
  • 2,976
  • 1
  • 17
  • 15
  • When I type the Usage step, I get the message:"Your wireless card or driver does not support Access Point mode". – aaldilai Jul 05 '14 at 13:38
0

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.

Prahlad Yeri
  • 1,657
  • What I got from step 2, when I plugged in my Kernel driver (wl) is: "depends: cfg802011,lib802011" – aaldilai Jul 05 '14 at 13:42
  • @user3259540 - That means you can't use hostapd, unfortunately. Here is some more info for you: http://wiki.openwrt.org/doc/howto/wireless.utilities#drivers.without.cfg80211-support – Prahlad Yeri Jul 05 '14 at 14:58
  • From what I get from these documents, you need the older wlanconfig configuration tool to manage your wifi card, hostapd will not work. – Prahlad Yeri Jul 05 '14 at 14:59
  • Also, post the result of your first query. Its important to know what wifi driver your kernel is using before we start shooting at the stars. – Prahlad Yeri Jul 05 '14 at 15:02
  • Thanks for the information :) my kernel is apparently: wl – aaldilai Jul 05 '14 at 15:45
  • wl is a Broadcom proprietary driver. See my updated answer. – Prahlad Yeri Jul 05 '14 at 16:16
  • Also, try out the command "iw list" and in the output look for "Supported interface modes:". If it includes "AP" it means your current driver/hardware combination supports that mode. – Prahlad Yeri Jul 05 '14 at 16:32
  • Ok, so it doesn't say AP, I will try to install another driver. I wasn't planning on going back to Macintosh :P, but would removing the driver and installing another one affect the wireless connectivity if I got back to Macintosh? – aaldilai Jul 05 '14 at 20:55
  • It should not, but considering the amount of time and hacking it will take for you to get this solution working, I'm inclined to think that you take the mac route. You can still use ubuntu through a virtualbox or something. – Prahlad Yeri Jul 05 '14 at 21:02
  • If you wish to continue the hacking however, then read this answer by Giridaran Manivannan who got this working by installing the b43 driver on hp notebook: http://askubuntu.com/questions/105217/how-do-i-create-a-non-adhoc-wifi-hotspot/118208#118208 – Prahlad Yeri Jul 05 '14 at 21:03
  • Thanks, this has been of great help.. I'm going to give it a short in the hacking arena :) I didn't install Ubuntu for nothing. – aaldilai Jul 05 '14 at 21:08