1

My target is to create a Wifi hotspot using a wifi USB adapter in my computer that is already wireless connected.

I'm using Ubuntu 14.04 LTS / 64 bit The USB adapter is a: TP-Link TL-WN823N

This post describes exactly how to do this: How to setup an Access Point mode Wi-Fi Hotspot?

In short there are 4 steps:

1.) Create the initial hotspot entry by: System Settings > Network > Use as hotspot

2.) Edit the created hotspot using GUI Networking > Edit Connections Add SSID, WPA2, password etc.

3.) Since the ap mode cannot be set in the GUI yet is must be done with the command line.

'sudo -i gedit /etc/NetworkManager/system-connections/Hotspot'

4.) Start the now correctly defined hotspot

This is the point where I got stuck and reason for asking this question. The previous mentioned post says:

"Click on 'Create New Wi-Fi Network' from Network Indicator menu."

There is a field "connection" that allows you to create a new connection of select an existing one. The intention is to select the hotspot that is created before.

However, for me it is only possible to create a new hotspot because the field "connection" is missing. See picture.

no connection to select

What I can do is select one of both adapters. That is good because I want the USB wifi and not the laptop adapter. If I type the new network name in the field "network name" a NEW network is created that shows up in '/etc/NetworkManager/system-connections/'

So that doesn't help. However I noticed that it was possible to use: "connect to a hidden wifi network". The created network is in the list and is selectable. Starting the wifi gives the error: "Failed to activate the connection"."AP mode is not supported by this device"

Any help would be appreciated. I want to stick to the basic functionality of Ubuntu as much as possible. I do not want to install ap-hotspot. Yes, it might be working but is not maintained any longer.

  • I don't think it is possible using one wifi adapter in Ubuntu – Jeremy31 Feb 14 '16 at 23:27
0

1) Install iw

sudo apt-get install iw

type the following command:

iw list

the output is something like

Supported interface modes:
     * IBSS
     * managed
     * AP
     * AP/VLAN
     * monitor
     * mesh point

If you can't see AP , you need to setting up your Wifi Adapter to support master mode

visit https://help.ubuntu.com/community/WifiDocs/MasterMode to get more informations how to setting up wifi adapter to support master mode

2) Using create_ap

  git clone https://github.com/oblique/create_ap
  cd create_ap
 make install

Examples

No passphrase (open network):

  create_ap wlan0 eth0 MyAccessPoint

WPA + WPA2 passphrase:

  create_ap wlan0 eth0 MyAccessPoint MyPassPhrase

AP without Internet sharing:

  create_ap -n wlan0 MyAccessPoint MyPassPhrase

Bridged Internet sharing:

    create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase

Bridged Internet sharing (pre-configured bridge interface):

    create_ap -m bridge wlan0 br0 MyAccessPoint MyPassPhrase

Internet sharing from the same WiFi interface:

   create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase

Choose a different WiFi adapter driver

   create_ap --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase

replace rtl871xdrv with your adapter

No passphrase (open network) using pipe:

    echo -e "MyAccessPoint" | create_ap wlan0 eth0

WPA + WPA2 passphrase using pipe:

    echo -e "MyAccessPoint\nMyPassPhrase" | create_ap wlan0 eth0

Enable IEEE 802.11n

    create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase

Source https://github.com/oblique/create_ap

  • Hi GAD3R, I was able to switch the device into master mode using: 'iwconfig wlan1 mode master'. This works. I checked if the device supports AP interface mode. 'iw list' shows AP mode. But I think that is not correct is likely the laptop device rather than the usb device. 'iw dev wlan1 list' does not work. Suggestions? – Dr.Zuse Feb 14 '16 at 22:25
  • Dr.Zuse i edit my answer to give you more informations – GAD3R Feb 14 '16 at 23:09
  • 1
    Hi GAD3R, thanx for updating. iw list only sees my laptop internal wifi device(wlan0). I can put my usb wifi into master mode but I still do not know if the device supports AP mode. – Dr.Zuse Feb 16 '16 at 22:16
  • 1
    create_ap has impressive capabilities but first developer oblique also has an impressive reputation. Ubuntu was designed to have access point functionality (although not working by gui yet...) My personal preference is to stick to released ubuntu code. I will do the very obvious thing to do: just switch adapter. My build in adapter supports AP mode and the usb wifi adapter can be the input wifi. Thanx anyway. – Dr.Zuse Feb 16 '16 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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