Hi Felix, Jonas, While playing with my AXS101 board and USB WI-Fi dongles I bumped in a couple of issues. Fortunately I found at least one dongle that works quite nice. That's TP-Link TL-WN721N (or its WN722N sibling) which is based on Atheros AR9271 chip even though it did require one unexpected tweak.
For starters I just selected "kmod-ath9k-htc" in menuconfig and on boot saw USB device recognized, its firmware was loaded, "wifi detect" recognized it as well, see log below. But then "wlan0" interface was not created on "wifi" command. After some googling I somehow came to resolution that "hostapd" package installation fixes this problem. And indeed once I got image rebuilt with "CONFIG_PACKAGE_hostapd=y" all worked as expected and I was able to use my board as a Wi-Fi access point. So the question is if this is expected (requirement for "hostapd") [for "ath9k_htc"]? Another minor issue is that USB dongle gets recognized a bit late so that automatic "wifi detect" gets already executed and "/etc/config/wireless" isn't created. That requires manual execution of "wifi detect > /etc/config/wireless". Essentially extending delay in "package/base-files/files/etc/init.d/boot" makes a difference: ---------------------->8------------------- # allow wifi modules time to settle sleep 15 # instead of 1 ---------------------->8------------------- but I'm not sure if we want to do that change for all devices. Then if there's a better way to make auto population of "/etc/config/wireless"? -Alexey Generic arc770 + kmod-ath9k-htc (CONFIG_PACKAGE_kmod-ath9k-htc=y): ------------------------------------->8-------------------------------------- [ 1.140000] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 1.710000] init: - preinit - Detected arc-sdp // Synopsys AXS101 Development Board [ 1.800000] random: mktemp urandom read with 3 bits of entropy available Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [ 4.930000] procd: - early - [ 5.540000] procd: - ubus - [ 6.550000] procd: - init - [ 7.150000] Loading modules backported from Linux version master-2015-10-26-0-g28c26cb [ 7.160000] Backport generated by backports.git backports-20150903-4-g12cf266 [ 7.190000] cfg80211: World regulatory domain updated: [ 7.190000] cfg80211: DFS Master region: unset [ 7.220000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 7.240000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 7.260000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 7.260000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A) [ 7.280000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A) [ 7.280000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s) [ 7.300000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s) [ 7.300000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [ 7.320000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) [ 7.360000] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [ 7.370000] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2 [ 7.380000] usb 1-1: Falling back to user helper [ 7.400000] usbcore: registered new interface driver ath9k_htc [ 7.410000] firmware ath9k_htc!htc_9271-1.4.0.fw: firmware_loading_store: map pages failed [ 7.420000] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested [ 7.730000] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980 [ 7.970000] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 10.300000] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3 [ 10.300000] ath9k_htc 1-1:1.0: FW RMW support: Off [ 10.410000] ieee80211 phy0: Atheros AR9271 Rev:1 [ 10.410000] cfg80211: Regulatory domain changed to country: CN [ 10.460000] cfg80211: DFS Master region: FCC [ 10.460000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 10.510000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 10.510000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (N/A) [ 10.560000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s) [ 10.560000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A) [ 10.610000] cfg80211: (57240000 KHz - 59400000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A) [ 10.610000] cfg80211: (59400000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4400 mBm), (N/A) [ 10.670000] cfg80211: (63720000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A) [ 12.760000] eth0: device MAC address 3e:ef:92:b3:6b:8f [ 15.940000] device eth0 entered promiscuous mode [ 15.940000] br-lan: port 1(eth0) entered forwarding state [ 15.950000] br-lan: port 1(eth0) entered forwarding state [ 17.870000] br-lan: port 1(eth0) entered disabled state [ 20.870000] stmmaceth e0018000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 20.870000] br-lan: port 1(eth0) entered forwarding state [ 20.880000] br-lan: port 1(eth0) entered forwarding state [ 22.880000] br-lan: port 1(eth0) entered forwarding state BusyBox v1.24.1 (2015-11-23 10:31:24 MSK) built-in shell (ash) _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- DESIGNATED DRIVER (Bleeding Edge, r47603) ----------------------------------------------------- * 2 oz. Orange Juice Combine all juices in a * 2 oz. Pineapple Juice tall glass filled with * 2 oz. Grapefruit Juice ice, stir well. * 2 oz. Cranberry Juice ----------------------------------------------------- root@pnr:/# root@pnr:/# ifconfig br-lan Link encap:Ethernet HWaddr 3E:EF:92:B3:6B:8F inet addr:10.121.8.60 Bcast:10.121.8.255 Mask:255.255.255.0 inet6 addr: fe80::3cef:92ff:feb3:6b8f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:162 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:15563 (15.1 KiB) TX bytes:2106 (2.0 KiB) eth0 Link encap:Ethernet HWaddr 3E:EF:92:B3:6B:8F UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:286 errors:0 dropped:0 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:31537 (30.7 KiB) TX bytes:2284 (2.2 KiB) Interrupt:32 Base address:0x8000 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:65536 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) root@pnr:/# ls /etc/config/ dropbear network system root@pnr:/# wifi detect config wifi-device radio0 option type mac80211 option channel 11 option hwmode 11g option path 'platform/axs10x_mb/e0040000.ehci/usb1/1-1/1-1:1.0' option htmode HT20 # REMOVE THIS LINE TO ENABLE WIFI: option disabled 1 config wifi-iface option device radio0 option network lan option mode ap option ssid OpenWrt option encryption none root@pnr:/# wifi detect > /etc/config/wireless root@pnr:/# uci set wireless.radio0.disabled=0 root@pnr:/# uci commit wireless root@pnr:/# cat /etc/config/wireless config wifi-device 'radio0' option type 'mac80211' option channel '11' option hwmode '11g' option path 'platform/axs10x_mb/e0040000.ehci/usb1/1-1/1-1:1.0' option htmode 'HT20' option disabled '0' config wifi-iface option device 'radio0' option network 'lan' option mode 'ap' option ssid 'OpenWrt' option encryption 'none' root@pnr:/# wifi root@pnr:/# ifconfig br-lan Link encap:Ethernet HWaddr 3E:EF:92:B3:6B:8F inet addr:10.121.8.60 Bcast:10.121.8.255 Mask:255.255.255.0 inet6 addr: fe80::3cef:92ff:feb3:6b8f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3871 errors:0 dropped:0 overruns:0 frame:0 TX packets:77 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:327703 (320.0 KiB) TX bytes:7514 (7.3 KiB) eth0 Link encap:Ethernet HWaddr 3E:EF:92:B3:6B:8F UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5671 errors:0 dropped:0 overruns:0 frame:0 TX packets:81 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:645363 (630.2 KiB) TX bytes:7658 (7.4 KiB) Interrupt:32 Base address:0x8000 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:65536 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) ------------------------------------->8-------------------------------------- The same as above + "hostapd" installed (CONFIG_PACKAGE_hostapd): ------------------------------------->8-------------------------------------- root@pnr:/# wifi detect > /etc/config/wireless root@pnr:/# uci set wireless.radio0.disabled=0 root@pnr:/# uci commit wireless root@pnr:/# wifi [ 68.420000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 68.440000] device wlan0 entered promiscuous mode [ 68.700000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 68.710000] br-lan: port 2(wlan0) entered forwarding state [ 68.710000] br-lan: port 2(wlan0) entered forwarding state [ 70.710000] br-lan: port 2(wlan0) entered forwarding state [ 78.920000] device wlan0 left promiscuous mode [ 78.920000] br-lan: port 2(wlan0) entered disabled state [ 79.860000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 79.880000] device wlan0 entered promiscuous mode [ 79.880000] br-lan: port 2(wlan0) entered forwarding state [ 79.890000] br-lan: port 2(wlan0) entered forwarding state [ 80.150000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 81.890000] br-lan: port 2(wlan0) entered forwarding state root@pnr:/# ifconfig br-lan Link encap:Ethernet HWaddr 42:C2:01:AB:6B:58 inet addr:10.121.8.31 Bcast:10.121.8.255 Mask:255.255.255.0 inet6 addr: fe80::40c2:1ff:feab:6b58/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:828 errors:0 dropped:0 overruns:0 frame:0 TX packets:42 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:72318 (70.6 KiB) TX bytes:5824 (5.6 KiB) eth0 Link encap:Ethernet HWaddr 42:C2:01:AB:6B:58 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1516 errors:0 dropped:0 overruns:0 frame:0 TX packets:48 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:163431 (159.6 KiB) TX bytes:6052 (5.9 KiB) Interrupt:32 Base address:0x8000 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:65536 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) wlan0 Link encap:Ethernet HWaddr 60:E3:27:0C:E3:1F inet6 addr: fe80::62e3:27ff:fe0c:e31f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:129 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:14774 (14.4 KiB) ------------------------------------->8-------------------------------------- _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel