5

I followed this guide to create a hotspot:

Create WiFi hotspot on ubuntu

I go through all the steps but when it comes to the end, connecting my laptop to the hotspot, it does not work.

I have tried connecting to a hidden WiFi network but this also does not connect.

Can anyone help?

$ lsb_release -a
    Distributor ID: Ubuntu
    Description:    Ubuntu 15.04
    Release:    15.04
    Codename:   vivid

$ uname -a
Linux mylinux 3.19.0-28-generic #30-Ubuntu SMP Mon Aug 31 15:52:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

/etc/NetworkManager/system-connections$ sudo cat android-wifi 
[connection]
id=android-wifi
uuid=af9a2d23-c1e4-409d-a80e-d8c8271ba291
type=wifi

[wifi]
ssid=android-wifi
mode=ap
mac-address=A0:A8:CD:6F:0C:34

[wifi-security]
key-mgmt=wpa-psk
psk-flags=1

[ipv4]
method=shared

[ipv6]
method=auto
ip6-privacy=0

4 Answers 4

3

I found the answer.

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.

2
  • This does nothing. Some processes used by network-manager won't restart after this command.
    – xyres
    Commented Apr 13, 2017 at 15:25
  • this doesn't work for me. After restarting network manager it shows same as "Authentication problem". Any other solution ??
    – chetan
    Commented Sep 24, 2018 at 5:28
1

I too face same problem that you had I and I solved by.
Going into system settings; Click the Network Icon -> Edit Connections -> Select your Wifi Network (In your case select android-wifi ) -> Click Edit.

A dialogue box opes like this. enter image description here
Make sure you have checked Automatically connect to this Network...

After that Restart your computer.

Your Wifi Network is now available to use.

2
  • 1
    Unfortunately that didn't work. Commented Jan 29, 2016 at 10:07
  • 1
    This should not make any difference, it just tells the computer to connect to this network automatically if it is available.
    – Alexey
    Commented Dec 28, 2018 at 19:29
0

Try the following edits in /etc/NetworkManager/system-connections/android-wifi
You may use $sudo gedit android-wifi to edit it.

  • Add a line security=wifi-security
    after
    mac-address=A0:A8:CD:6F:0C:34
  • Replace the line
    psk-flags=1
    by psk="password wthout quotes"
  • Delete the last line.
    ip6-privacy=0

Now the file should look like this

[connection]
id=android-wifi
uuid=af9a2d23-c1e4-409d-a80e-d8c8271ba291
type=wifi

[wifi]
ssid=android-wifi
mode=ap
mac-address=A0:A8:CD:6F:0C:34
security=wifi-security

[wifi-security]
key-mgmt=wpa-psk
psk="password wthout quotes"

[ipv4]
method=shared

[ipv6]
method=auto
0

BE CAREFUL WITH THE FIREWALL

First try:

sudo ufw disable

If that solves the problem, you can do:

sudo ufw enable
sudo ufw       allow in  on wlo1
sudo ufw route allow out on enp41s0

My system works with:

$ sudo ufw status numbered
[ 1] Anywhere on wlo1           ALLOW IN    Anywhere
[ 2] Anywhere on enp41s0        ALLOW FWD   Anywhere       (out)
[ 3] Anywhere (v6) on wlo1      ALLOW IN    Anywhere (v6)
[ 4] Anywhere (v6) on enp41s0   ALLOW FWD   Anywhere (v6)  (out)

Only [ 1] and [ 2] are strictly necessary.

#----------------------------------------------------- On my system:

With WiFi on:

ifconfig

> enp41s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.2.115  netmask 255.255.255.0  broadcast 192.168.2.255
>         inet6 fe80::19b0:6542:ee4:5982  prefixlen 64  scopeid 0x20<link>
>         ether 00:d8:61:9e:2b:52  txqueuelen 1000  (Ethernet)
>         RX packets 46282  bytes 39478576 (39.4 MB)
>         RX errors 0  dropped 4  overruns 0  frame 0
>         TX packets 38257  bytes 7380268 (7.3 MB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> enp42s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
>         ether 00:d8:61:9e:2b:53  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 0  bytes 0 (0.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
>         inet 127.0.0.1  netmask 255.0.0.0
>         inet6 ::1  prefixlen 128  scopeid 0x10<host>
>         loop  txqueuelen 1000  (Local Loopback)
>         RX packets 1981  bytes 318831 (318.8 KB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 1981  bytes 318831 (318.8 KB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.2.115  netmask 255.255.255.0  broadcast 192.168.2.255
>         inet6 fe80::1c39:c0d6:43bd:fcf0  prefixlen 64  scopeid 0x20<link>
>         ether 38:00:25:95:18:02  txqueuelen 1000  (Ethernet)
>         RX packets 50  bytes 17772 (17.7 KB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 48  bytes 7067 (7.0 KB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This means that the WiFi hotspot:
input is from wlo1
Output is to enp42s0

You must log in to answer this question.

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