Could not connect to wpa_supplicant: wlan0 - re-trying

22,868

Solution 1

After issuing

strace wpa_cli -i wlan0

the problem with /tmp folder was reported:

bind(3, {sa_family=AF_FILE, path="/tmp/wpa_ctrl_1095-5"}, 110) = -1 EROFS (Read-only file system)

After mounting tmpfs:

mount -t tmpfs -o size=12m tmpfs /tmp/

everything works fine.

Solution 2

I solved this by running sudo wpa_cli -i wlan0 in response to the "Read-only file system" permissions error.

In contrast to the accepted answer, this does not carry the side-effect of altering the permissions of the directory mounted at /tmp/.

Thank you @BartlomiejGrzeskowiak. I did not know about strace.

Share:
22,868
Bartlomiej Grzeskowiak
Author by

Bartlomiej Grzeskowiak

Updated on July 05, 2022

Comments

  • Bartlomiej Grzeskowiak
    Bartlomiej Grzeskowiak almost 2 years

    I work on embedded device and I am configuring the WLAN module (QCA6174 - ath10k driver) with wpa_supplicant.

    • I load the driver modules (backports-20151120):

      insmod /lib/modules/3.10.65-b2196-h301/wlan/compat.ko; 
      insmod lib/modules/3.10.65-b2196-h301/wlan/cfg80211.ko; 
      insmod /lib/modules/3.10.65-b2196-h301/wlan/mac80211.ko; 
      insmod /lib/modules/3.10.65-b2196-h301/wlan/ath.ko; 
      insmod /lib/modules/3.10.65-b2196-h301/wlan/ath10k_core.ko skip_otp=y; 
      insmod /lib/modules/3.10.65-b2196-h301/wlan/ath10k_pci.ko
      
    • I start the wpa_supplicant (default wpa_supplicant.conf):

      wpa_supplicant -dd -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
      
      [  182.257304] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
      

    everything seems to work fine. I see the wlan0 interface,I can scan with iwlist, /var/run/wpa_supplicant/wlan0 exist.

    • But I can not use wpa_cli interface:

       #wpa_cli 
       wpa_cli v2.4
       Copyright (c) 2004-2015, Jouni Malinen <[email protected]> and contributors
       Selected interface 'wlan0'
      
       Interactive mode
      
       Could not connect to wpa_supplicant: wlan0 - re-trying
      

    Do you have any hints how can I track down the problem ?