I´ve encountered some intermittent problems when using my PC as a hotspot.
Here´s the scenario:
I have a Linux desktop PC (Linux LIte 6.2) and a Linux laptop (Linux Lite 6.4). The desktop is my main computer and I set up a hotspot with it so that the PC provides the hotspot for the laptop.
The laptop can then access the internet via wlan (or wi-fi) as it connects to the PC´s hotspot this way.
Now to the problem:
Sometimes - but by no means always - the laptop cannot connect to the hotspot described above. I don´t know why that is.
Often times it works well, but sometimes it doesn´t. Both devices are very near to one another, so physical distance cannot be the problem.
Plus: the laptop “sees” the hotspot as a potential wifi connection. It´s just that it doesn´t connect to it.
I tried to investigate by having a look at the desktop´s log messages. I used
lnav for that.
I stumbled upon this entry:
wpa_supplicant: Note: nl80211 driver interface is not designed to be used with ap_scan=2; this can result in connection failures.
I´ve no idea whether this is hint to the problem. It might be.
I looked around on the entire system. There seems to be no “wpa_supplicant.conf”.
But I found this hint on : ubuntuusers
If a WLAN access point is to be operated on a Linux computer, hostapd is required, not wpa-supplicant.
I guess this could apply to me then.
So it appears that my Linux distribution may rely on the hostapd package to set up a wireless access point (hotspot) instead of wpa_supplicant.
On the other hand…
… I found out it shouldn´t be too difficult to establish a hotspot on Ubuntu systems
(Hotspot auf PC einrichten › Howto › Archiv › Wiki › ubuntuusers.de):
I did it this way:
started nm-connection-editor which gave me a GUI for settings
added a Wi-Fi connection
the Wi-Fi tab looks like this now:
Connection name: hotspot SSID : hotspot Mode: Hotspot Band: Automatic Channel: default Device: [empty] Cloned MAC address: [empty] MTU: automatic
the Wi-Fi security tab:
Security: WPA & WPA2 Personal Password: [my password]
When I enable the netis WIFI dongle on my desktop PC I get the entry “Connect to hidden Wi-Fi network” and under “Connection” I use the entry “hotspot” and then click on “connect”.
I found on my desktop PC this config file:
and it looks like this:
sudo batcat hotspot.nmconnection ───────┬──────────────────────────────────────────────────────────────────────── │ File: hotspot.nmconnection ───────┼──────────────────────────────────────────────────────────────────────── 1 │ [connection] 2 │ id=hotspot 3 │ uuid=e8a39b7e-66b7-4624-a743-95869a0ed2f8 4 │ type=wifi 5 │ autoconnect=false 6 │ timestamp=1674062032 7 │ 8 │ [wifi] 9 │ mode=ap 10 │ ssid=hotspot 11 │ 12 │ [ipv4] 13 │ method=shared 14 │ 15 │ [ipv6] 16 │ addr-gen-mode=stable-privacy 17 │ method=disabled 18 │ 19 │ [proxy]
I cannot see anything wrong in it…
Well, as I said, the phenomenon of the laptop not being able to connect to the hotspot is intermittent.
Mostly it works. Yesterday it didn´t … at first.
After the laptop failing to conenct to the hotspot I tried providing my Android smartphone as a hotspot.
That worked. The laptop immediately connencted to it.
Right after that experiment I thought: Why not give it a try with the desktop hotspot once more?
This time it went well. The laptop connected to the desktop-hotspot in a jiffy.
I have no explanation for that behaviour.
Does anybody of you kind folks care to venture a guess?
To be clear: I do not necessarily want to change anything in my configuration as it seems to work … most of the time.
I don´t want to take any chances and making things worse.
But I certainly would like to know what´s going on…
Thanks so much in advance.
Many greetings from Rosika