OpenWrt Forum Archive

Topic: WiFi setup on Qualcomm Atheros QCA9531

The content of this topic has been archived on 3 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

/proc/cpuinfo:

system type             : Qualcomm Atheros QCA9531 rev 2
machine                 : Qualcomm Atheros AP147 reference board
processor               : 0
cpu model               : MIPS 24Kc V7.4

I would like to connect my OpenWRT Atheros QCA9531 router to my local WiFi network.
That way, anyone using my local wifi network can get access to the router and login to make changes.

I know how to run the router in AP mode:
editing /etc/configre/wireless, and using wifi + iwconfig commands.

I have not figured out to make the router be a client and connect to a guest network using a key phrase, and in this way allow other users connect to it through the wan/lan that the router is a client on.

I have seen various articles of making the router a bridge etc, but not exactly what i was looking for. Need access to the router lan so users on the same WiFi can ssh into it, or use the web interface, etc..

For reference, i have tried something like this, to make the wireless into a client and get it to connect to a local WiFi netowrk:
/etc/config/wireless

root@OpenWrt:/# cat /etc/config/wireless
config wifi-device  wifi0
        option type     qcawifi
        option channel  auto
        option macaddr  00:03:7f:14:78:83
        option hwmode   11ng
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device   'wifi0'
        option network  'wan'
        option mode     'sta'
        option ssid     'SE-WiFi'
        option encryption       'psk2'
        option key      'secretpassword'

config wifi-device  wifi1
        option type     qcawifi
        option channel  auto
        option macaddr  00:03:7f:25:e4:bd
        option hwmode   11ac
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1

config wifi-iface
        option device   wifi1
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption none

And in my /etc/config/network, i set option for wifi0 to use dhcp:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
       option ifname 'eth0'
        option proto 'dhcp'

config switch
        option name 'eth1'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth1'
        option vlan '1'
        option ports '0 1 2 3 4'

Anyways for this setup above, i run: /etc/init.d/network restart
And i get:

[ 1499.010000] 8021q: adding VLAN 0 to HW filter on device ath0
Command failed: Operation not supported
Successfully initialized wpa_supplicant
[ 1500.910000] ieee80211_ioctl_getparam : parameter 0x284 not supported
[ 1500.960000] wlan_mlme_stop_bss: do_wme_init is set to 0
ath0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=UNKNOWN
'wifi1' is disabled
root@OpenWrt:/# [ 1507.340000] wlan_mlme_stop_bss: do_wme_init is set to 0

And did not get any IP address assigned.
iwconfig:

root@OpenWrt:/# iwconfig
wifi0     no wireless extensions.

lo        no wireless extensions.

eth1      no wireless extensions.

eth0      no wireless extensions.

ath0      IEEE 802.11b  ESSID:"SE-WiFi"
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated
          Bit Rate:0 kb/s   Tx-Power:26 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

br-lan    no wireless extensions.

wifi1     no wireless extensions.

bond0     no wireless extensions.

ifconfig -a:

ath0      Link encap:Ethernet  HWaddr 00:03:7F:14:78:83
          inet6 addr: fe80::203:7fff:fe14:7883/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:3 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

bond0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-lan    Link encap:Ethernet  HWaddr 02:AB:BB:CC:DE:34
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr FE:BA:1C:89:52:AD
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr 02:AB:BB:CC:DE:34
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:11910 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11910 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:809784 (790.8 KiB)  TX bytes:809784 (790.8 KiB)

wifi0     Link encap:UNSPEC  HWaddr 00-03-7F-14-78-83-00-48-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:404 errors:0 dropped:0 overruns:0 frame:0
          TX packets:966 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:2699
          RX bytes:106290 (103.7 KiB)  TX bytes:81130 (79.2 KiB)
          Interrupt:47 Memory:b8100000-b8120000

wifi1     Link encap:UNSPEC  HWaddr 00-03-7F-25-E4-BD-00-48-00-00-00-00-00-00-00-00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:2699
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:40 Memory:b0000000-b0200000

Have also tried various different configs with slight modifications, but did not reach the result i wanted -
Trying to get the router to connect as a client to the WiFi network that is available here.

Your config looks valid to me.

Maybe you've run into a bug. Go file one under the LEDE Project.

Hi BenS

I just got Atheros QCA9531. Comfast CF-E214N MA1. I 'm lookinf for file in openwrt.
Please point me the file I can install to the device.

Thank you in advance.

Chuan

Be so kind and not double post.

The discussion might have continued from here.