Could not connect to wpa_supplicant: wlan0 - re-trying

Bartlomiej Grzeskowiak picture Bartlomiej Grzeskowiak · Dec 14, 2015 · Viewed 22k times · Source

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 ?

Answer

Bartlomiej Grzeskowiak picture Bartlomiej Grzeskowiak · Dec 15, 2015

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.