2

I know there are lots of questions on this type but I cannot find the answer anywhere. On Windows I can use cmd to create a virtual AP and share connection from a local network. However, It seems not to work the same way on Ubuntu (I'm pretty new on Ubuntu, honestly).

I had follow on these two topic :
How do I create a WiFi hotspot sharing wireless internet connection (single adapter)?
and
https://seravo.fi/2014/create-wireless-access-point-hostapd
Although I've tried these many times and ask question several times but the problem seems to be unsolvable.
I would be very appreciated if anybody can help me to create a hotspot step by step. To make sure that my chipset was supported, here's my adapter information:
Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * mesh point * P2P-client * P2P-GO
Please help, thanks in advance!

3
  • It used to be possible on some device --- see askubuntu.com/a/488604/16395 --- but the bug at bugs.launchpad.net/ubuntu/+source/udev/+bug/1397654 (mostly ignored) make this impossible in recent Ubuntu systems. In the bug it is stated tat the problem is fixed in 15.04 --- try to create a second device with sudo iw dev wlan0 interface add wlan1 type ap and then you should be able to continue as if you add two interfaces.
    – Rmano
    Oct 17, 2015 at 15:52
  • I tried your command and the interface was created is not wlan1 but rename4. Then I delete it and try the command again, this time a new interface was not created and it give me an error: You need to run a management daemon, e.g. hostapd,. Afterthat, I cannot create an AP type interface again although I give it an other name
    – Fingertron
    Oct 17, 2015 at 16:55
  • So it seems that the bug is not really fixed... or you have some old udev*rules sticking around. Feel free to comment on the bug, maybe someone can help you.
    – Rmano
    Oct 17, 2015 at 16:56

2 Answers 2

2

This method:

1- Go to network connection (Edit Connections)
2- Click Add
3- Choose Wi-Fi and click Create
4- Type in Connection name like "UbuntuAP"
5- Type in SSID as you wish
6- Choose Device MAC Address from the dropdown (wlan0)
7- Wifi Security select WPA & WPA2 Personal and set a password.
8- Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.
9- Then save and close.
10- Open Terminal (Ctrl+Alt+T) and type in the following command with your connection name used in step 4.

sudo gedit /etc/NetworkManager/system-connections/UbuntuAP

11- Find mode=infrastructure and change it to mode=ap
12- Now click on WiFi icon in top right and select Connect to Hidden Wi-Fi Network...
13- Then Select UbuntuAP connection and click Connect.
14- Finish :D

1
  • sorry bro, but I just don't get your idea. I have on only one interface that connected to the internet which is wlan0. This way seems not to be working on my case, because one interface cannot just be an AP and adapter at the same time, I guess.
    – Fingertron
    Oct 17, 2015 at 14:44
0

Converted from my comment to add several links that can be useful for this question

It used to be possible on some device --- see https://askubuntu.com/a/488604/16395: you create a virtual interface with iw and then define a hotspot on that with the usual methods and with the usual problems... (or with ap-hotspot: see on webupd8).

Unfortunately, the bug at http://bugs.launchpad.net/ubuntu/+source/udev/+bug/1397654 make this impossible in recent Ubuntu systems. In the bug it is stated that the problem is fixed in 15.04, although there are discordant opinions around.

Try to create a second device with sudo iw dev wlan0 interface add wlan1 type ap and then you should be able to continue as if you have two physical interfaces.

If you have some specific interface the answers here: How do I create a WiFi hotspot sharing wireless internet connection (single adapter)? can also help you.

Good luck!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .