I am installing openwrt on an old x86 laptop have been trying to use a Ralink rt5470 to turn the whole thing into an access point. In LuCI, I am able to scan for networks with the interface but the access point in the wireless menu gives the error "Wireless is not associated".
These are the packages I installed to download the drivers
opkg install kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb kmod-usb-core kmod-usb-uhci kmod-usb-ohci kmod-usb2 usbutils
This is my proof that the drivers are loaded
root@OpenWrt:~# lsusb
Bus 001 Device 002: ID 18a5:025b Verbatim ToughMax
Bus 001 Device 003: ID 148f:5370 Ralink 802.11 n WLAN <--
Bus 002 Device 001: ID 1d6b:0003 Linux 5.15.162 xhci-hcd xHCI Host Controller
Bus 001 Device 004: ID 04ca:3015
Bus 001 Device 005: ID 0bda:57f2 KS0HD0500463807BA0LM06 HD WebCam
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.162 xhci-hcd xHCI Host Controller
root@OpenWrt:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 2: Dev 2, If 0, Class=, Driver=usb-storage, 480M
|__ Port 4: Dev 3, If 0, Class=, Driver=rt2800usb, 480M <--
|__ Port 5: Dev 4, If 1, Class=, Driver=, 12M
|__ Port 5: Dev 4, If 0, Class=, Driver=, 12M
|__ Port 7: Dev 5, If 0, Class=, Driver=, 480M
|__ Port 7: Dev 5, If 1, Class=, Driver=, 480M
Here are the current interfaces.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP qlen 1000
link/ether 54:ab:3a:e8:4d:ac brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 00:0c:b3:55:95:37 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether 54:ab:3a:e8:4d:ac brd ff:ff:ff:ff:ff:ff
inet 10.1.99.3/24 brd 10.1.99.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fe80::56ab:3aff:fee8:4dac/64 scope link
valid_lft forever preferred_lft forever
And here is my proof that wlan0 is in fact the dongle
root@OpenWrt:~# ls -l /sys/class/net/wlan0/device/driver/
lrwxrwxrwx 1 root root 0 Aug 4 01:14 1-4:1.0 -> ../../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0
--w------- 1 root root 4096 Aug 4 01:14 bind
lrwxrwxrwx 1 root root 0 Aug 4 01:14 module -> ../../../../module/rt2800usb
-rw-r--r-- 1 root root 4096 Aug 4 01:14 new_id
-rw-r--r-- 1 root root 4096 Aug 4 01:14 remove_id
--w------- 1 root root 4096 Aug 4 01:14 uevent
--w------- 1 root root 4096 Aug 4 01:14 unbind
Now, here is my config
/etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option proto 'static'
option ipaddr '10.1.99.3'
option netmask '255.255.255.0'
option gateway '10.1.99.1'
option dns '10.1.99.1'
option device 'br-lan'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '7'
option hwmode '11g'
option path 'pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0'
option htmode 'HT20'
option country 'US'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'laptop'
option encryption 'psk2'
option key 'lambdasauce'
Here are some more commands that I saw people give
root@OpenWrt:~# iw phy0 info
Wiphy phy0
wiphy index: 0
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
Retry short long limit: 2
Coverage class: 0 (up to 0m)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
Band 1:
Capabilities: 0x17e
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: 2 usec (0x04)
HT TX/RX MCS rate indexes supported: 0-7, 32
Frequencies:
* 2412 MHz [1] (30.0 dBm)
* 2417 MHz [2] (30.0 dBm)
* 2422 MHz [3] (30.0 dBm)
* 2427 MHz [4] (30.0 dBm)
* 2432 MHz [5] (30.0 dBm)
* 2437 MHz [6] (30.0 dBm)
* 2442 MHz [7] (30.0 dBm)
* 2447 MHz [8] (30.0 dBm)
* 2452 MHz [9] (30.0 dBm)
* 2457 MHz [10] (30.0 dBm)
* 2462 MHz [11] (30.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
valid interface combinations:
* #{ managed, AP, mesh point } <= 8,
total <= 8, #channels <= 1
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Supported extended features:
* [ RRM ]: RRM
* [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
* [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
* [ SCAN_RANDOM_SN ]: use random sequence numbers in scans
* [ SCAN_MIN_PREQ_CONTENT ]: use probe request with only rate IEs in scans
* [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
* [ DEL_IBSS_STA ]: deletion of IBSS station support
* [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
* [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support
root@OpenWrt:~# iw wlan0 info
Interface wlan0
ifindex 3
wdev 0x1
addr 00:0c:b3:55:95:37
type managed
wiphy 0
txpower 30.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
dmesg
[ 6.648860] Intel(R) 2.5G Ethernet Linux Driver
[ 6.650070] Copyright(c) 2018 Intel Corporation.
[ 6.653092] r8169 0000:04:00.1: can't disable ASPM; OS doesn't have ASPM control
[ 6.682375] r8169 0000:04:00.1 eth0: RTL8411b, 54:ab:3a:e8:4d:ac, XID 5c8, IRQ 129
[ 6.684041] r8169 0000:04:00.1 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[ 6.778915] PPP generic driver version 2.4.2
[ 6.782520] NET: Registered PF_PPPOX protocol family
[ 6.930838] usb 1-4: reset high-speed USB device number 3 using xhci_hcd
[ 7.122153] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[ 7.138763] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[ 7.140316] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 7.140578] usbcore: registered new interface driver rt2800usb
[ 7.141954] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 7.830168] Generic FE-GE Realtek PHY r8169-0-401:00: attached PHY driver (mii_bus:phy_addr=r8169-0-401:00, irq=MAC)
[ 8.078666] r8169 0000:04:00.1 eth0: No native access to PCI extended config space, falling back to CSI
[ 8.120386] r8169 0000:04:00.1 eth0: Link is Down
[ 8.125830] br-lan: port 1(eth0) entered blocking state
[ 8.131324] br-lan: port 1(eth0) entered disabled state
[ 8.136272] device eth0 entered promiscuous mode
[ 10.916159] r8169 0000:04:00.1 eth0: Link is Up - 1Gbps/Full - flow control off
[ 10.921149] br-lan: port 1(eth0) entered blocking state
[ 10.922401] br-lan: port 1(eth0) entered forwarding state
[ 10.923732] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 64.483498] i915 0000:00:02.0: [drm] Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 64.488545] i915 0000:00:02.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
[ 155.745797] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 155.751796] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
For other things I have done I have rebooted the laptop many times and unplugged the dongle and saw wlan0 go away. Any ideas what it might be?