linux-wifi-hotspot icon indicating copy to clipboard operation
linux-wifi-hotspot copied to clipboard

create_ap script stuck in unmanaged verification

Open knucker opened this issue 4 years ago • 5 comments

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:

  1. Execute the script: create_ap wlan0 wlan0 'wifiSSID' 'passworD'
  2. See information: Creating a virtual WiFi interface... and never ends.

Thus, the hotspot is not created.

Evidences Executing script image01

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

image02

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

knucker avatar Oct 28 '20 16:10 knucker

Hi, thank you for reporting. Can you send a PR with your fix? I will review it. :)

lakinduakash avatar Oct 28 '20 16:10 lakinduakash

Hi, thank you for the quick reply.

I created a PR. I hope I've helped!

knucker avatar Oct 28 '20 17:10 knucker

Temporary closing - need more confirmations

lakinduakash avatar Oct 30 '20 19:10 lakinduakash

Temporary closing - need more confirmations

I am experiencing the same issue.

rmburg avatar Jul 09 '23 06:07 rmburg

same issue, waiting for fix update

Ivan-Firefly avatar Feb 18 '24 05:02 Ivan-Firefly