nmcli Hotspot keeps disappearing

I am looking to create an access point to share the internet of a Ubuntu Desktop box. The copy of Ubuntu was installed with Gnome but X was disabled on startup so it is ssh/cmd only for the most part.

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy



$ sudo nmcli device status | grep wifi
wlx347de4403656  wifi      disconnected 

 

Wifi Device Exists and is a USB BrosTrend USB wifi adapter for Linux – AC1L

$ sudo nmcli -f WIFI-PROPERTIES.AP device show wlx347de4403656
WIFI-PROPERTIES.AP:                     yes

Wifi Device Supports AccessPoint mode

So the Wifi Device is there and supports AP mode. So now creating the AP bit.

$ sudo nmcli c add type wifi ifname  wlx347de4403656 con-name hotspot autoconnect yes ssid ouch

Connection 'hotspot' (b176bbf9-8a39-497a-9f74-21a2971af14e) successfully added.



/etc/NetworkManager/system-connections$ ls
 hotspot.nmconnection  'Wired connection 1.nmconnection'

So the nmconnection file is created.

$sudo nmcli connection modify hotspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared

This sets the configuration file to AP or access point mode on bands bg sharing via IPv4.

$sudo nmcli connection modify hotspot wifi-sec.key-mgmt wpa-psk

This tells the wifi ap to use WPA-PSK

$sudo nmcli connection modify hotspot wifi-sec.psk "password"

This sets the password for the wifi ap.

/etc/NetworkManager/system-connections$ sudo cat hotspot.nmconnection 
[connection]
id=hotspot
uuid=b176bbf9-8a39-497a-9f74-21a2971af14e
type=wifi
interface-name=wlx347de4403656
timestamp=1717281836

[wifi]
band=bg
mode=ap
ssid=ouch

[wifi-security]
key-mgmt=wpa-psk
psk=password

[ipv4]
method=shared

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[proxy]

Now turned it on:

$ sudo nmcli connection up hotspot 
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)

Now when i search for WiFi i can see an SSID called ouch. On my android phone i see it as Ouch with WPA3(SAE Transition Mode).

If i try to connect i attempts and fails. The same happens if i try to connect via my laptop. I have no feedback as to why.

 $ ss -tulpn | egrep ":53|:67"
udp   UNCONN 0      0                      10.42.0.1:53         0.0.0.0:*          
udp   UNCONN 0      0                  127.0.0.53%lo:53         0.0.0.0:*          
udp   UNCONN 0      0                        0.0.0.0:67         0.0.0.0:*          
udp   UNCONN 0      0                        0.0.0.0:5353       0.0.0.0:*          
udp   UNCONN 0      0                           [::]:53863         [::]:*          
udp   UNCONN 0      0                           [::]:5353          [::]:*          
tcp   LISTEN 0      4096               127.0.0.53%lo:53         0.0.0.0:*          
tcp   LISTEN 0      32                     10.42.0.1:53         0.0.0.0:*  

From this i can see that it is looking to offer IP on the default 10.42.0.1 range listening on port 53 (dnsmasq I guess or something similar).

$ sudo nft list ruleset
table ip nm-shared-wlx347de4403656 {
        chain nat_postrouting {
                type nat hook postrouting priority srcnat; policy accept;
                ip saddr 10.42.0.0/24 ip daddr != 10.42.0.0/24 masquerade
        }

        chain filter_forward {
                type filter hook forward priority filter; policy accept;
                ip daddr 10.42.0.0/24 oifname "wlx347de4403656" ct state { established, related } accept
                ip saddr 10.42.0.0/24 iifname "wlx347de4403656" accept
                iifname "wlx347de4403656" oifname "wlx347de4403656" accept
                iifname "wlx347de4403656" reject
                oifname "wlx347de4403656" reject
        }
}

I am no expert in any of this but from what i can see the rules are there for the wifi network card too.

I just don’t know what else to do or check as I simply can not connect to it. Any help appreciated.

OK I tried one last thing … and it now works after this long post so will post anyway in case it helps someone else. The bit that got it working for me was:

$sudo nmcli c modify Hotspot 802-11-wireless-security.pmf 1

This I believe disables “Protected Management Frames”. Thank you to @Dzamo Norton from this post https://askubuntu.com/questions/1424633/unable-to-connect-with-the-hotspot-created-on-ubuntu

If you make any changes to the file hotspot.nmconnection be sure to run the following command or they won’t take effect.

$ sudo systemctl restart NetworkManager

If you find your AP / SSID keeps disappearing it might be that you have IP v6 enabled and it is not supported by the hardware. If so … disable it with:

sudo nmcli connection modify hotspot ipv6.method "disabled"

Didn’t help … try eiiting:

/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

and setting the value to 1 or 0.

The access point keeps disappearing seems to come back when you ssh in and restart NetworkManager but I have no idea why ? Any help would be appreciated.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật