Mint 20.2, nm fails to create wifi hotspot

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Colm
Level 1
Level 1
Posts: 32
Joined: Sun Jan 15, 2017 12:15 am

Mint 20.2, nm fails to create wifi hotspot

Post by Colm »

Seeking help, Network manager fails to create a hotspot. (I am aware of post viewtopic.php?t=383519 which is somewhat similar but also unsolved)

Using:
Linux Mint 20.2 64 bit
Kernel 5.3.0-131-generic
MATE 1.24.0
network-manager version 1.22.10-1ubuntu2.3
Intel Wireless 7260

partial output of iw list:

Code: Select all

	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * P2P-client
		 * P2P-GO
		 * P2P-device
I've tried using NetworkManager GUI to create a hotspot, and it fails after 30 seconds.
If I run:

Code: Select all

# preconfigured profile
$ nmcli con up Hotspot
# or
$ nmcli device wifi hotspot ifname wlan0 ssid Hotspot password "XXXXXXXX"
# or other variation... they all have the exact same result
Error: Connection activation failed: 802.1X supplicant took too long to authenticate
Hint: use 'journalctl -xe NM_CONNECTION=6fde5e30-3482-404a-b125-facf84ff9f05 + NM_DEVICE=wlan0' to get more details.

$ journalctl -xe NM_CONNECTION=6fde5e30-3482-404a-b125-facf84ff9f05 + NM_DEVICE=wlan0

# repeat of the following, edited for succinctness:
[1669534273.9050] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
[1669534273.9088] device (wlan0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
[1669534273.9102] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
[1669534273.9106] device (wlan0): Activation: (wifi) connection 'Hotspot' has security, and secrets exist.  No new secrets needed.
[1669534273.9405] device (wlan0): supplicant interface state: disconnected -> scanning
Nothing useful in dmesg. The problem ultimately appears to be related to the fact that if I am *creating* the hotspot, network manager should not be trying to authenticate to join the network.

Further info: Someone may ask, so, I have tried a few variations on my iwlwifi.conf file, currently it is this:

Code: Select all

# /etc/modprobe.d/iwlwifi.conf
# custom to troubleshoot wifi hotspot problems
options iwlwifi 11n_disable=1
options iwlwifi wd_disable=0
options iwlwifi bt_coex_active=0
(Yes, I make sure to reload the module if I change this)

The default iwlwifi.conf was

Code: Select all

remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211
Could anyone kindly help me:
1) Understand & fix what's going on? ( an iwlwifi driver issue? something with NetworkManager?)
2) Do this by bypassing NetworkManager entirely and use other command line tools like 'ip' ?

Thank you in advance!
~Colm
Last edited by LockBot on Sat May 27, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Colm
Level 1
Level 1
Posts: 32
Joined: Sun Jan 15, 2017 12:15 am

Re: Mint 20.2, nm fails to create wifi hotspot

Post by Colm »

Interesting discovery. First, I wanted to create a hotspot not so much for sharing my internet connection over wifi, but moreso that I could connect some mobile devices and practice some networking administration skills and do some testing. Having an actual internet connection was not necessary for my purposes, but it turns out that NetworkManager would simply not set up the hotspot unless it first -- at least one time -- was told to set up the hotspot while I had a valid internet connection. Once I did that, it no longer complains on subsequent events when I try to set up the hotspot without an internet connection. NeworkMakanger doesn't invoke a dhcp server in these cases, of course, so I have to configure my mobile devices statically, which is perfectly fine by me (for the time being).

Although I have made progress, I am still interested in understanding why NetworkManager behaves this way and how I might alter this behavior. This seems beyond the scope of the usual man pages and other documentation. Anybody have insights to educate me?

(Eventually I would like to learn how to set up udhcpd and hostapd and manually configure routing and iptables, but that's for another post 8) )
Thanks!
Locked

Return to “Networking”