linux-wifi-hotspot
linux-wifi-hotspot copied to clipboard
create_ap script stuck in unmanaged verification
Bug description
When I executed the command create_ap wlan0 wlan0 'wifiSSID' 'passworD'
the script stuck in the unmanaged verification.
# Debug with "bash -x"
[...]
+ networkmanager_iface_is_unmanaged ap0
+ is_interface ap0
+ [[ -z ap0 ]]
+ [[ -d /sys/class/net/ap0 ]]
+ networkmanager_knows_iface ap0
+ nmcli -t -f DEVICE d
+ grep -Fxq ap0
+ nmcli -t -f DEVICE,STATE d
+ grep -E '^ap0:unmanaged$'
+ return 1
+ RES=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 2 ]]
+ sleep 1
[...]
This happens both in the CLI and in the GUI.
Steps to reproduce the behavior:
- Execute the script:
create_ap wlan0 wlan0 'wifiSSID' 'passworD'
- See information:
Creating a virtual WiFi interface...
and never ends.
Thus, the hotspot is not created.
Evidences
Executing script
Results of debug and Possible fix
When the script is stuck (in red) I executed the command nmcli device set ap0 managed no
in another terminal (in blue) and the script continue the execution and create the hotspot as expected.
So I do not know if it was the best solution but I changed the script to add the command (In yellow) [[ $RES -eq 1 ]] && nmcli device set ${1} managed no
in the line 618 and worked. This command temporarily configure a device as unmanaged in NetworkManager
Desktop:
- OS:
+ OS: Arch Linux x86_64
# Hostname: hidden
### Kernel Release: 5.8.14-arch1-1
##### Uptime: 1:25
###### WM: DWM
; #####; DE: None
+##.##### Packages: 1709
+########## RAM: 2506 MB / 15906 MB
#############; Processor Type: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
###############+ $EDITOR: vim
####### ####### Root: 95G / 109G (87%) (ext4)
.######; ;###;`".
.#######; ;#####.
#########. .########`
######' '######
;#### ####;
##' '##
#' `#
- networkmanager: 1.26.4-1
Hi, thank you for reporting. Can you send a PR with your fix? I will review it. :)
Hi, thank you for the quick reply.
I created a PR. I hope I've helped!
Temporary closing - need more confirmations
Temporary closing - need more confirmations
I am experiencing the same issue.
same issue, waiting for fix update