Anthony96922 / mt7601u-ap

AP driver for MT7601U dongles
GNU General Public License v2.0
117 stars 48 forks source link

SSID `test` is visible but connection attempts time out #36

Open axxel opened 1 year ago

axxel commented 1 year ago

I followed the README plus blacklisted the mt7601u module. The config file is unchanged from the template in this repo. The system is an x86 (Atom) running a Debian with our own stock 5.4.5 kernel. Here is my log:

Oct 13 16:10:09 kernel: [ 2249.956304] usb 1-1: new high-speed USB device number 4 using ehci-pci
Oct 13 16:10:09 kernel: [ 2250.125219] usb 1-1: New USB device found, idVendor=148f, idProduct=7601, bcdDevice= 0.00
Oct 13 16:10:09 kernel: [ 2250.125643] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 13 16:10:09 kernel: [ 2250.125886] usb 1-1: Product: 802.11 n WLAN
Oct 13 16:10:09 kernel: [ 2250.126116] usb 1-1: Manufacturer: MediaTek
Oct 13 16:10:09 kernel: [ 2250.126345] usb 1-1: SerialNumber: 1.0
Oct 13 16:10:09 systemd-udevd[637]: Using default interface naming scheme 'v243'.
Oct 13 16:10:09 systemd-udevd[637]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Oct 13 16:10:51 kernel: [ 2292.188363] IPv6: ADDRCONF(NETDEV_CHANGE): ra0: link becomes ready

Notably, the last line above only appeared after the command sequence ip link set ra0 up, ip link set ra0 down, ip link set ra0 up. After the first up call the ip a reported status for the ra0 device was state UNKNOWN. After the full up -> down -> up sequence I see:

6: ra0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 76:01:dd:b0:0b:02 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::7401:ddff:feb0:b02/64 scope link 
       valid_lft forever preferred_lft forever

At that point I see the test SSID but trying to connect from both an Android phone and an Ubuntu 22.04 fails. Here is some syslog from the client side:

Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2422] Config: added 'ssid' value 'test'
Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2422] Config: added 'scan_ssid' value '1'
Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2422] Config: added 'bgscan' value 'simple:30:-70:86400'
Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2422] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2422] Config: added 'auth_alg' value 'OPEN'
Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2422] Config: added 'psk' value '<hidden>'
Oct 13 16:13:44 xps wpa_supplicant[1119]: wlx70f11c0e7575: SME: Trying to authenticate with 76:01:dd:b0:0b:02 (SSID='test' freq=2437 MHz)
Oct 13 16:13:44 xps kernel: [155098.890031] wlx70f11c0e7575: authenticate with 76:01:dd:b0:0b:02
Oct 13 16:13:44 xps NetworkManager[1006]: <info>  [1665670424.2678] device (wlx70f11c0e7575): supplicant interface state: disconnected -> authenticating
Oct 13 16:13:44 xps kernel: [155098.898180] wlx70f11c0e7575: send auth to 76:01:dd:b0:0b:02 (try 1/3)
Oct 13 16:13:44 xps kernel: [155098.942748] wlx70f11c0e7575: send auth to 76:01:dd:b0:0b:02 (try 2/3)
Oct 13 16:13:44 xps kernel: [155098.975098] wlx70f11c0e7575: send auth to 76:01:dd:b0:0b:02 (try 3/3)
Oct 13 16:13:44 xps kernel: [155098.995683] wlx70f11c0e7575: authentication with 76:01:dd:b0:0b:02 timed out

On the host side I don't see anything in the syslog related to that connection attempt. I noticed that using a password other than password as specified in the WPAPSK=password line, results in the exact same behavior of both the host and the client.

I'd appreciate any hint on what to try next or how to enable some debug logging on the host side to get any idea what is going wrong here.

Anthony96922 commented 1 year ago

Might be because the locally administered bit is set on the AP. Try adding MacAddress=74:01:dd:b0:0b:02 to the config file.

SerebryakovS commented 1 year ago

Have same issue. I successfully compiled this driver for openWRT and I can see new network interface: ra0 Link encap:Ethernet HWaddr 74:01:DD:B0:0B:02 inet6 addr: fe80::7601:ddff:feb0:b02/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 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:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) From the host AP is visible as well, but no way to connect: [ 8370.783821] wlan0: send auth to 74:01:dd:b0:0b:02 (try 1/3) [ 8370.909043] wlan0: send auth to 74:01:dd:b0:0b:02 (try 2/3) [ 8371.011547] wlan0: send auth to 74:01:dd:b0:0b:02 (try 3/3) Please help with this problem, I tried to configure options in config file and using iwpriv but couldn't resolve the issue.... I agree with axxel: no any debug message that could help to understand what's going on... By the way, I tried your option, but no positive result as well(((

wasalm commented 1 year ago

Have the same issue. Also tried to add the mac address to the config file and nothing changed

fliker09 commented 1 year ago

Yep, running into exact same issue and providing MacAddress didn't help at all :-(

kuhiu commented 1 year ago

same issue here!

kuhiu commented 1 year ago

hi i fixed it adding the udhcpd server using busybox

fliker09 commented 1 year ago

Can you please describe what exactly you did? Sun May 28 23:22:26 GMT+03:00 2023 Anthony96922/mt7601u-ap @.***>: hi i fixed it adding the udhcpd server using busybox — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @github.com>

kuhiu commented 1 year ago

@fliker09 sure, the SSID "test" was visible but when i tried to connect with my phone it failed (i think that it could get the ip number). I added the busybox-udhcpd server (i m working with yocto on a petalinux platform). I used this /etc/udhcpd.conf file

The start and end of the IP lease block

start 10.0.0.20 end 10.0.0.254

The interface that udhcpd will use

interface ra0

opt dns 10.0.0.1 10.0.0.10 option subnet 255.255.255.0 opt router 10.0.0.1

opt wins 192.168.10.10

option dns 129.219.13.81 # appended to above DNS servers for a total of 3

option domain local option lease 864000 # default: 10 days option msstaticroutes 10.0.0.0/8 10.127.0.1 # single static route option staticroutes 10.0.0.0/8 10.127.0.1, 10.11.12.0/24 10.11.12.1

Arbitrary option in hex form:

option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4"

And i run this to startup the network

ifconfig ra0 10.0.0.1 netmask 255.255.255.0 && udhcpd /etc/udhcpd.conf

Now i got connected with my phone