I have upgraded to Ubuntu 16.04. I was using ap-hotspot for wifi hotspot through terminal. It seems ap-hotspot is no more; is there any alternative to create a wifi hotspot? If there is, how can it be installed/used?
-
4To those following the answers here and getting a message like "Connection X is not available on the device wlan0 at this time" while attempting to connect to hidden network: Your wifi device probably does not support master mode (cannot be an AP). To check, see help.ubuntu.com/community/WifiDocs/…– akomCommented Jul 11, 2016 at 17:47
4 Answers
In Ubuntu 16.04, there’s a Hotspot mode in the WiFi connection editings page that works directly for Android devices. Here’s the step by step:
First disable WiFi and connect your laptop/PC to a wired network.
Click Edit Connections on the network menu. Then click Add on the network connections to add a new connection:
Choose WiFi from the drop-down box in the next window and click Create button.
When the editing WiFi hotspot window pops up, follow these steps:
After you clicked the save button, enable WiFi and click Connect to Hidden Wi-Fi network and select connect to the connection you just created.
Your network menu should now have the WiFi hotspot connection:
Finally connect to this hotspot from your Android device and enjoy!
Update!
After following the guide and before enabling WiFi, restart the Network Manager with:
sudo service network-manager restart
Then enable WiFi and it should connect.
-
12I tried this, but when I am connecting through hidden wifi network it says: Failed to activate connection: (2) Connection 'wifihotspot' is not available on the device wlp9s0 at this time. how to tackle this ? I was using ap_hostpot before upgrading to 16.04 without any trouble.– Kt HafisCommented Apr 30, 2016 at 12:28
-
2After following the guide and before enabling WiFi, restart the Network Manager with: sudo service network-manager restart Then enable WiFi and it should connect.– AndyCommented Apr 30, 2016 at 19:25
-
4didn't work for me after even reboot, got this error (2) Connection 'k-hotspot' is not available on the device wlp3s0 at this time. Commented Aug 29, 2016 at 11:39
-
1I got the same errors as the above users: Failed to activate connection, (2) Connection 'wifishare' is not available on the device wlp5s0 at this time. Commented Dec 30, 2016 at 0:30
-
3I can successfully create the Hotspot, but other than my android phone, no other devices can connect to it. My Ubuntu laptop (as well as other phones) ask for the password and then just hang there for a couple of seconds before asking for it again. Anyone know what's the problem?– alonso sCommented Apr 6, 2018 at 2:21
One line solution
First, you can try the one line solution based on the command line interface of NetworkManager.
nmcli device wifi hotspot con-name my-hotspot ssid my-hotspot band bg password jesuisunmotdepasse
if it does not work, you should try the 3 line solution here :
Three lines solution
Here is a solution based on the great command line tool of NetworkManager. It is very straight forward, works with WPA and Access Point Mode (so it works on smartphones), and do not need complex set up. Once it's set up, you can just use the graphical interface to toogle the access point. Just run the following lines to create and enable the access point :
# Create a connection
nmcli connection add type wifi ifname '*' con-name my-hotspot autoconnect no ssid my-local-hotspot
# Put it in Access Point
nmcli connection modify my-hotspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
# Set a WPA password (you should change it)
nmcli connection modify my-hotspot 802-11-wireless-security.key-mgmt wpa-psk 802-11-wireless-security.psk myhardpassword
# Enable it (run this command each time you want to enable the access point)
nmcli connection up my-hotspot
Now connect on your Smartphone... When you do not need it anymore, disable it with :
nmcli connection down my-hotspot
To enable it again, you will just need to use the last command of the 4 lines command. You can note that since the connection also appears in the available connections, you can enable/disable it from graphical interface.
I use create_ap
Check the GitHub page for details:
This script creates a NATed or Bridged WiFi Access Point.
I usually use this two options :
For Bridged Internet sharing : share your Ethernet or modem internet via WiFi
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
where
wlan0
is your WiFi interface, andeth0
is the interface that offer internet ( Ethernet or modem).Internet sharing from the same WiFi interface : this will allow you to share the internet from the same WiFi interface, useful if you want to re share the WiFi that you're already connected to it to extend WiFi area for example :
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
-
-
could you please post comments to use it in terminal ? I am not a familiar to do it, and always get confused. thanks in advance– Kt HafisCommented Apr 30, 2016 at 12:31
-
2when I gave the comment, it says: 'wlan0' is not a WiFi interface I changed the command believing wifi interface must be 'wlp9s0' as it shown somewhere, but the response is: ERROR: Your adapter does not support AP (master) mode anything can be done ?– Kt HafisCommented May 1, 2016 at 5:40
-
Yes you should use your interface name instead of wlan0, the second option require that the adapter supports this feature, my be it's not the case. try the first one Commented May 2, 2016 at 0:47
-
I also had this issue for a while, to solve this issue I did the following steps:
Install packages:
sudo apt-get install network-manager-pptp-gnome
sudo apt-get install dnsmasq-base
Creating a wifi-hotspot Edit Connection -> Select + and add wifi connection, and give mode as Hostport If you need you may provide password
Restart the network manager
sudo service network-manager restart
Start the Hostport
nmcli connection up <name of your hostport>