5

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 <j@w1.fi> 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 ?

Pang
  • 9,564
  • 146
  • 81
  • 122
Bartlomiej Grzeskowiak
  • 1,009
  • 5
  • 16
  • 35

2 Answers2

4

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.

Bartlomiej Grzeskowiak
  • 1,009
  • 5
  • 16
  • 35
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.

courtyardz
  • 73
  • 1
  • 6