Getting TP-Link WN722N to work on RPi OpenWRT

3

1

I'm trying to create my own wireless router using a Raspberry Pi 2 and a TP-Link WN722N. I have OpenWRT running off the MicroSD card and I have installed LuCI, but I need to install the wireless card drivers via SSH. I've tried following the directions here:
OpenWrt → General Discussion → how to enable WN722N (AR9271) wifi usb on MR3020 ?

While the USB card is inserted, I install the drivers, then create the wireless interface:

# install drivers
opkg install kmod-ath9k-htc

# create wireless wan interface 
uci set network.wwan=interface
uci set network.wwan.proto=dhcp
uci set network.wwan.hostname="$STATION"
uci commit network

But when I attempt to enable the wifi interface, UCI gives me an Entry not found error. Every piece of advice I've read is to check /etc/config/wireless for the adapter's settings, but this file does not exist. This probably means that the adapter is not being recognized, but I am able to do this:

root@OpenWrt:~# wifi detect
config wifi-device  radio0
        option type     mac80211
        option channel  11
        option hwmode   11g
        option path     'platform/bcm2708_usb/usb1/1-1/1-1.5/1-1.5: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@OpenWrt:~# lsusb
Bus 001 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So clearly, the RPi is seeing the USB wireless adapter but it is not generating an /etc/config/wireless file. What am I doing wrong?

Any help appreciated, thanks!

user3617429

Posted 2015-10-28T20:45:58.470

Reputation: 31

Do iw list to see the list of detected wireless devices. You also have a Broadcom USB wireless stick connected. Is this intended? – qasdfdsaq – 2015-11-05T14:31:35.820

Answers

0

It doesn't create the file to avoid configuration overlapping.

You must append on the file the detected configuration.

Use: wifi detect > /etc/config/wireless instead.

Hope it helps others.

cusspvz

Posted 2015-10-28T20:45:58.470

Reputation: 175

0

did you insert the usb into a different usb slot? regarding option path: the 5 in the 1.5 is the usb slot id. if you pulled it out of the initial one, and put it into another slot, then you would need to manually update that to the new id. There may be a cli/shell command to do this, and perhaps that what the previous answer by CuSS would achieve with wifi detect > /etc/config/wireless

Mark Peterson

Posted 2015-10-28T20:45:58.470

Reputation: 101