Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHCP not working (Raspberry Pi), otherwise fine #45

Open
mexon opened this issue Mar 29, 2019 · 2 comments
Open

DHCP not working (Raspberry Pi), otherwise fine #45

mexon opened this issue Mar 29, 2019 · 2 comments

Comments

@mexon
Copy link

mexon commented Mar 29, 2019

I am trying to get this driver working with an Archer T2UH plugged into a Raspberry Pi 3. It works fine if I give it a static IP address. But it can't connect using DHCP. If I do a tcpdump on both sides during the DHCP phase, on the DHCP server side I can see it receiving the request and sending a response. But on the Raspberry Pi I can only see the request, not the response.

In Wireshark I can see that the DHCP response is addressed to 192.168.3.103, the new address of the T2UH. So I'm guessing that the driver is ignoring packets that are not broadcast and are not sent to the existing IP address of the adapter. I don't know a lot about the details of DHCP, but it seems like it shouldn't work that way.

To reproduce, install 2018-11-13-raspbian-stretch-lite.img on the Raspberry Pi. Then...

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 148f:761a Ralink Technology, Corp. 
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. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $ sudo apt-get install git raspberrypi-kernel-headers
pi@raspberrypi:~ $ git clone https://github.com/xtknight/mt7610u-linksys-ae6000-wifi-fixes.git
pi@raspberrypi:~ $ cd mt7610u-linksys-ae6000-wifi-fixes/
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ git log -n 1 --oneline
f0aa052 Merge pull request #37 from Viish/master
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ make
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ sudo make install
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ sudo modprobe mt7610u_sta
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ lsmod | grep mt7610u_sta
mt7610u_sta           970752  0
cfg80211              573440  2 mt7610u_sta,brcmfmac
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ ifconfig ra0
ra0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf 
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ sudo wpa_cli -i ra0
wpa_cli v2.4
Copyright (c) 2004-2015, Jouni Malinen <[email protected]> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.



Interactive mode

> reconfigure
OK
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE-AUTH 
<3>Trying to associate with XX:XX:XX:XX:XX:XX (SSID='buttercup' freq=5180 MHz)
<3>Associated with XX:XX:XX:XX:XX:XX
<3>CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=DE
<3>WPA: Key negotiation completed with XX:XX:XX:XX:XX:XX [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to XX:XX:XX:XX:XX:XX completed [id=0 id_str=]
> quit
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ ifconfig ra0
ra0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.185.103  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::XXXX:XXXX:XXXX:XXXX  prefixlen 64  scopeid 0x20<link>
        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
        RX packets 765  bytes 155717 (152.0 KiB)
        RX errors 4  dropped 0  overruns 0  frame 0
        TX packets 92  bytes 12026 (11.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ sudo ifconfig ra0 192.168.3.5
pi@raspberrypi:~/mt7610u-linksys-ae6000-wifi-fixes $ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.3.1, port 37078
[  5] local 192.168.3.5 port 5201 connected to 192.168.3.1 port 37080
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  1.59 MBytes  13.4 Mbits/sec                  
[  5]   1.00-2.00   sec  1.58 MBytes  13.2 Mbits/sec                  
[  5]   2.00-3.00   sec  1.53 MBytes  12.8 Mbits/sec                  
[  5]   3.00-4.00   sec  1.10 MBytes  9.22 Mbits/sec                  
[  5]   4.00-5.00   sec  41.0 KBytes   336 Kbits/sec                  
[  5]   5.00-6.00   sec  59.4 KBytes   487 Kbits/sec                  
[  5]   6.00-7.00   sec  9.90 KBytes  81.1 Kbits/sec                  
[  5]   7.00-8.00   sec  33.9 KBytes   278 Kbits/sec                  
[  5]   8.00-9.00   sec  38.2 KBytes   313 Kbits/sec                  
[  5]   9.00-10.00  sec  60.8 KBytes   498 Kbits/sec                  
[  5]  10.00-10.01  sec  1.41 KBytes   861 Kbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.01  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.01  sec  6.03 MBytes  5.06 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
@kyuhyong
Copy link

kyuhyong commented Sep 3, 2020

Same problem here to on rp3.
$ uname -a
Linux oagv_node 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux

$ lsusb
Bus 001 Device 005: ID 045e:0800 Microsoft Corp.
Bus 001 Device 004: ID 0e8d:7610 MediaTek Inc.

$ dmesg | grep -i mt76
[ 4.642994] mt76x0 1-1.2:1.0: ASIC revision: 76100002 MAC revision: 76502000
[ 4.644185] mt76x0 1-1.2:1.0: Direct firmware load for mediatek/mt7610u.bin failed with error -2
[ 4.646495] mt76x0: probe of 1-1.2:1.0 failed with error -2
[ 4.646755] usbcore: registered new interface driver mt76x0
[ 6.012631] mt7610u_sta: loading out-of-tree module taints kernel.
[ 8.211090] /var/lib/dkms/mt7610u_sta/1.0/build/os/linux/../../chips/mt76x0.c:2114 assert (pAd->TxPower[choffset].Channel == 36)failed
[ 8.226889] mt76x0_read_tx_alc_info_from_eeprom: EEPROM_MT76x0_TEMPERATURE_OFFSET (0xD1) = 0xf8
[ 8.226898] mt76x0_read_tx_alc_info_from_eeprom: TemperatureOffset = 0xfffffff8

ifconfig shows ra0 only assigned 169.254.x.x instead of 192.168.x.x

Any updates?

@mexon
Copy link
Author

mexon commented Sep 3, 2020

Hey, thanks for reminding me that this adapter is still lying around in a drawer. The good news is, there's a native driver baked into recent kernels that works! Almost! I just tried it on Raspbian 10, kernel 4.19.118-v7+. With the hackery from that second link, plus a reboot, it associates fine. So looks like it's time for me to try to remember why I bought that adapter all those years ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants