No dhcp request being sent by Ralink MT7601U

I'm trying to use a USB Dongle as a wifi client / station:

usb device: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter

on:

Model: TP-Link TL-WDR4300 v1
Architecture: Atheros AR9344 rev 2
Firmware Version: OpenWrt 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.044.30835-34e0d65
Kernel Version: 4.14.221

with steps:

opkg install kmod-mt7601u # brings mt7601u-firmware

wifi config # radio2 appeared
uci set wireless.radio2.channel='auto'
uci set wireless.radio2.disabled='0'

# /etc/config/dhcp
uci set dhcp.wwan=dhcp
uci set dhcp.wwan.interface='wwan'
uci set dhcp.wwan.ignore='1'
# /etc/config/firewall
uci set firewall.@zone[0].network='lan'
uci set firewall.@zone[1].network='wan wan6 wwan'
# /etc/config/network
uci set network.wwan=interface
uci set network.wwan.proto='dhcp'
uci set network.wwan.metric='30'
# /etc/config/wireless
uci del wireless.default_radio2
uci set wireless.wifinet3=wifi-iface
uci set wireless.wifinet3.ssid='My wifi'
uci set wireless.wifinet3.device='radio2'
uci set wireless.wifinet3.mode='sta'
uci set wireless.wifinet3.network='wwan'
uci set wireless.wifinet3.encryption='psk2+aes'

uci commit
wifi reload
/etc/init.d/network restart

Up to here it connects successfully to the wifi network, but it doesn't get IP address, even if I ran manually:

udhcpc -i wlan2

it ends in all cases with wwan: udhcpc: sending discover
No logs at all on logread messages for dnsmask dhcp server, so the dhcp request frame for some reason does not travel to it.

logs when I do a ifdown wwan ; ifup wwan

Tue May  4 03:51:48 2021 daemon.notice netifd: wwan (30182): udhcpc: received SIGTERM
Tue May  4 03:51:48 2021 daemon.notice netifd: Interface 'wwan' is now down
Tue May  4 03:51:48 2021 daemon.notice netifd: Interface 'wwan' is disabled
Tue May  4 03:51:48 2021 daemon.notice netifd: Interface 'wwan' is enabled
Tue May  4 03:51:48 2021 daemon.notice netifd: Interface 'wwan' is setting up now
Tue May  4 03:51:48 2021 daemon.notice netifd: wwan (30220): udhcpc: started, v1.30.1
Tue May  4 03:51:48 2021 daemon.notice netifd: wwan (30220): udhcpc: sending discover
Tue May  4 03:51:48 2021 kern.info kernel: [301845.174079] wlan2: deauthenticating from xx:xx:xx:74:a1:ea by local choice (Reason: 3=DEAUTH_LEAVING)
Tue May  4 03:51:48 2021 daemon.notice netifd: Network device 'wlan2' link is down
Tue May  4 03:51:48 2021 daemon.notice netifd: Interface 'wwan' has link connectivity loss
Tue May  4 03:51:48 2021 daemon.notice wpa_supplicant[30134]: wlan2: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:74:a1:ea reason=3 locally_generated=1
Tue May  4 03:51:48 2021 daemon.notice wpa_supplicant[30134]: nl80211: deinit ifname=wlan2 disabled_11b_rates=0
Tue May  4 03:51:48 2021 daemon.notice wpa_supplicant[30134]: wlan2: CTRL-EVENT-TERMINATING
Tue May  4 03:51:48 2021 daemon.notice netifd: wwan (30220): udhcpc: read error: Network is down, reopening socket
Tue May  4 03:51:48 2021 daemon.notice netifd: Interface 'wwan' is disabled
Tue May  4 03:51:49 2021 daemon.notice netifd: wwan (30220): udhcpc: bind: No such device
Tue May  4 03:51:49 2021 daemon.notice netifd: Interface 'wwan' is now down
Tue May  4 03:51:49 2021 user.notice mac80211: Failed command: iw phy phy2 set antenna 0xffffffff 0xffffffff
Tue May  4 03:51:49 2021 daemon.notice netifd: radio2 (30252): command failed: Not supported (-122)
Tue May  4 03:51:49 2021 user.notice mac80211: Failed command: iw phy phy2 set distance 0
Tue May  4 03:51:49 2021 kern.info kernel: [301845.968259] IPv6: ADDRCONF(NETDEV_UP): wlan2: link is not ready
Tue May  4 03:51:49 2021 daemon.notice wpa_supplicant[30316]: Successfully initialized wpa_supplicant
Tue May  4 03:51:50 2021 daemon.notice netifd: Interface 'wwan' is enabled
Tue May  4 03:51:51 2021 daemon.notice wpa_supplicant[30318]: wlan2: SME: Trying to authenticate with ea:de:27:74:a1:ea (SSID='My Wifi' freq=2437 MHz)
Tue May  4 03:51:51 2021 kern.info kernel: [301847.800025] wlan2: authenticate with xx:xx:xx:74:a1:ea
Tue May  4 03:51:51 2021 kern.info kernel: [301847.868709] wlan2: send auth to xx:xx:xx:74:a1:ea (try 1/3)
Tue May  4 03:51:51 2021 kern.info kernel: [301847.881570] wlan2: authenticated
Tue May  4 03:51:51 2021 daemon.notice wpa_supplicant[30318]: wlan2: Trying to associate with xx:xx:xx:74:a1:ea (SSID='My Wifi' freq=2437 MHz)
Tue May  4 03:51:51 2021 kern.info kernel: [301847.894021] wlan2: associate with xx:xx:xx:74:a1:ea (try 1/3)
Tue May  4 03:51:51 2021 kern.info kernel: [301847.904802] wlan2: RX AssocResp from xx:xx:xx:74:a1:ea (capab=0x431 status=0 aid=3)
Tue May  4 03:51:51 2021 kern.info kernel: [301847.949818] wlan2: associated
Tue May  4 03:51:51 2021 daemon.notice netifd: Network device 'wlan2' link is up
Tue May  4 03:51:51 2021 daemon.notice netifd: Interface 'wwan' has link connectivity
Tue May  4 03:51:51 2021 daemon.notice netifd: Interface 'wwan' is setting up now
Tue May  4 03:51:51 2021 daemon.notice wpa_supplicant[30318]: wlan2: Associated with xx:xx:xx:74:a1:ea
Tue May  4 03:51:51 2021 daemon.notice wpa_supplicant[30318]: wlan2: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Tue May  4 03:51:51 2021 daemon.notice wpa_supplicant[30318]: wlan2: WPA: Key negotiation completed with ea:de:27:74:a1:ea [PTK=CCMP GTK=CCMP]
Tue May  4 03:51:51 2021 daemon.notice wpa_supplicant[30318]: wlan2: CTRL-EVENT-CONNECTED - Connection to ea:de:27:74:a1:ea completed [id=0 id_str=]
Tue May  4 03:51:51 2021 kern.info kernel: [301847.982952] IPv6: ADDRCONF(NETDEV_CHANGE): wlan2: link becomes ready
Tue May  4 03:51:51 2021 daemon.notice netifd: wwan (30367): udhcpc: started, v1.30.1
Tue May  4 03:51:51 2021 daemon.notice netifd: wwan (30367): udhcpc: sending discover
Tue May  4 03:51:54 2021 daemon.notice netifd: wwan (30367): udhcpc: sending discover
Tue May  4 03:51:57 2021 daemon.notice netifd: wwan (30367): udhcpc: sending discover

device info:

root@OpenWrt:~# iw phy phy0 info
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * managed
                 * monitor
        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 65535 bytes (exponent: 0x003)
                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)
        interface combinations are not supported
        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
        Supported extended features:
                * [ RRM ]: RRM
                * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
                * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
root@OpenWrt:~# ubus call network.device status
"wlan2": {
                "external": true,
                "present": true,
                "type": "Network device",
                "up": true,
                "carrier": true,
                "mtu": 1500,
                "mtu6": 1500,
                "macaddr": "xx:xx:xx:0d:4c:af",
                "txqueuelen": 1000,
                "ipv6": true,
                "promisc": false,
                "rpfilter": 0,
                "acceptlocal": false,
                "igmpversion": 0,
                "mldversion": 0,
                "neigh4reachabletime": 30000,
                "neigh6reachabletime": 30000,
                "neigh4gcstaletime": 60,
                "neigh6gcstaletime": 60,
                "neigh4locktime": 100,
                "dadtransmits": 1,
                "multicast": true,
                "sendredirects": true,
                "statistics": {
                        "collisions": 0,
                        "rx_frame_errors": 0,
                        "tx_compressed": 0,
                        "multicast": 0,
                        "rx_length_errors": 0,
                        "tx_dropped": 0,
                        "rx_bytes": 76926,
                        "rx_missed_errors": 0,
                        "tx_errors": 0,
                        "rx_compressed": 0,
                        "rx_over_errors": 0,
                        "tx_fifo_errors": 0,
                        "rx_crc_errors": 0,
                        "rx_packets": 595,
                        "tx_heartbeat_errors": 0,
                        "rx_dropped": 0,
                        "tx_aborted_errors": 0,
                        "tx_packets": 218,
                        "rx_errors": 0,
                        "tx_bytes": 75972,
                        "tx_window_errors": 0,
                        "rx_fifo_errors": 0,
                        "tx_carrier_errors": 0
                }
        },

Hi, can I have a video explaining how to set this up

to be more specific what are you trying to achieve?
This hw doesn't have a proper working driver so it doesn't work as AP neither Sta/Client mode.
So it is somewhat useless, my advice is don't waste time on this.
but if you just want to have a 2nd wireless client connection there is another chip that works and get ip.
but it is not recommend at all to use for long term use or at least no saturate these usb devices with transfer because they heat and are really unstable. and also none of them seems to work in AP mode...

You can verify with tcpdump if the packets are indeed sent. tcpdump -i wlan2 -vn

1 Like