2022-11-30 19:48:23

by Matthias G.

[permalink] [raw]
Subject: Bug report: Can connect with 'wext', but not 'nl80211'

Hello,

I hope this is the right place to report. I can connect via WiFi to my LTE router with the legacy 'wext' driver but not with 'nl80211'.

The router is a rebranded version of this one:
https://forum.openwrt.org/t/alcatel-tlc-hh40-lte-router-based-on-openwrt/77580

This command fails:
# wpa_supplicant -c wpa-home-lte.conf -i wlan0

wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="<redacted>" auth_failures=1 duration=10 reason=CONN_FAILED

while this succeeds:
# wpa_supplicant -Dwext -c wpa-home-lte.conf -i wlan0

Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
wlan0: Associated with dc:9b:d6:de:d4:27
wlan0: WPA: Key negotiation completed with dc:9b:d6:de:d4:27 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to dc:9b:d6:de:d4:27 completed [id=0 id_str=]

Kernel logs, failure:
Nov 30 20:24:41 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
Nov 30 20:24:41 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
Nov 30 20:24:41 papaya kernel: wlan0: Invalid HE elem, Disable HE
Nov 30 20:24:41 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
Nov 30 20:24:42 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
Nov 30 20:24:42 papaya kernel: wlan0: authenticated
Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 2/3)
Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 3/3)
Nov 30 20:24:42 papaya kernel: wlan0: association with dc:9b:d6:de:d4:27 timed out
Nov 30 20:24:45 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
Nov 30 20:24:45 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
Nov 30 20:24:45 papaya kernel: wlan0: Invalid HE elem, Disable HE
Nov 30 20:24:45 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
Nov 30 20:24:45 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
Nov 30 20:24:45 papaya kernel: wlan0: authenticated
Nov 30 20:24:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
Nov 30 20:24:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 2/3)
Nov 30 20:24:46 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 3/3)
Nov 30 20:24:46 papaya kernel: wlan0: association with dc:9b:d6:de:d4:27 timed out

Kernel logs, success:
Nov 30 20:30:45 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
Nov 30 20:30:45 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
Nov 30 20:30:45 papaya kernel: wlan0: Invalid HE elem, Disable HE
Nov 30 20:30:45 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
Nov 30 20:30:45 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
Nov 30 20:30:45 papaya kernel: wlan0: authenticated
Nov 30 20:30:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
Nov 30 20:30:45 papaya kernel: wlan0: RX AssocResp from dc:9b:d6:de:d4:27 (capab=0x431 status=0 aid=1)
Nov 30 20:30:45 papaya kernel: wlan0: associated
Nov 30 20:30:45 papaya kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

System information:
Artix dist, Linux papaya 6.0.7-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 03 Nov 2022 21:10:08 +0000 x86_64 GNU/Linux

wpa_supplicant v2.10

05:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter

mt7921e 32768 0
mt7921_common 94208 1 mt7921e
mt76_connac_lib 69632 2 mt7921e,mt7921_common
mt76 102400 3 mt7921e,mt7921_common,mt76_connac_lib
mac80211 1298432 3 mt76,mt7921_common,mt76_connac_lib
libarc4 16384 1 mac80211
cfg80211 1118208 4 mt76,mac80211,mt7921_common,mt76_connac_lib
rfkill 32768 5 asus_wmi,bluetooth,cfg80211

I can compile a custom linux kernel and wpa_supplicant for e.g. debugging purposes. Let me know if you need more information. I didn't
subscribe to this mailing list, so please answer directly.

Regards,
Matthias


2022-11-30 20:35:45

by Johannes Berg

[permalink] [raw]
Subject: Re: Bug report: Can connect with 'wext', but not 'nl80211'

On Wed, 2022-11-30 at 20:44 +0100, Matthias G. wrote:
> Hello,
>
> I hope this is the right place to report. I can connect via WiFi to my LTE router with the legacy 'wext' driver but not with 'nl80211'.
>
> The router is a rebranded version of this one:
> https://forum.openwrt.org/t/alcatel-tlc-hh40-lte-router-based-on-openwrt/77580
>
> This command fails:
> # wpa_supplicant -c wpa-home-lte.conf -i wlan0
>
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="<redacted>" auth_failures=1 duration=10 reason=CONN_FAILED
>
> while this succeeds:
> # wpa_supplicant -Dwext -c wpa-home-lte.conf -i wlan0
>
> Successfully initialized wpa_supplicant
> ioctl[SIOCSIWENCODEEXT]: Invalid argument
> ioctl[SIOCSIWENCODEEXT]: Invalid argument
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Associated with dc:9b:d6:de:d4:27
> wlan0: WPA: Key negotiation completed with dc:9b:d6:de:d4:27 [PTK=CCMP GTK=CCMP]
> wlan0: CTRL-EVENT-CONNECTED - Connection to dc:9b:d6:de:d4:27 completed [id=0 id_str=]
>
> Kernel logs, failure:
> Nov 30 20:24:41 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
> Nov 30 20:24:41 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
> Nov 30 20:24:41 papaya kernel: wlan0: Invalid HE elem, Disable HE
> Nov 30 20:24:41 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
> Nov 30 20:24:42 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:42 papaya kernel: wlan0: authenticated
> Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 2/3)
> Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 3/3)
> Nov 30 20:24:42 papaya kernel: wlan0: association with dc:9b:d6:de:d4:27 timed out
> Nov 30 20:24:45 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
> Nov 30 20:24:45 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
> Nov 30 20:24:45 papaya kernel: wlan0: Invalid HE elem, Disable HE
> Nov 30 20:24:45 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
> Nov 30 20:24:45 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:45 papaya kernel: wlan0: authenticated
> Nov 30 20:24:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 2/3)
> Nov 30 20:24:46 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 3/3)
> Nov 30 20:24:46 papaya kernel: wlan0: association with dc:9b:d6:de:d4:27 timed out
>

Sounds like the AP is broken and doesn't like some elements wpa_s
includes when nl80211 has certain capabilities ...

Not sure what we can do about that - maybe there's a way to selectively
disable certain capabilities in wpa_s?

johannes

2022-11-30 21:03:03

by James

[permalink] [raw]
Subject: Re: Bug report: Can connect with 'wext', but not 'nl80211'

The AP is linux 6 with a mediatek 7921k, right?

Nov. 30, 2022 14:45:51 Matthias G. <[email protected]>:

> Hello,
>
> I hope this is the right place to report. I can connect via WiFi to my LTE router with the legacy 'wext' driver but not with 'nl80211'.
>
> The router is a rebranded version of this one:
> https://forum.openwrt.org/t/alcatel-tlc-hh40-lte-router-based-on-openwrt/77580
>
> This command fails:
> # wpa_supplicant -c wpa-home-lte.conf -i wlan0
>
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: SME: Trying to authenticate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="<redacted>" auth_failures=1 duration=10 reason=CONN_FAILED
>
> while this succeeds:
> # wpa_supplicant -Dwext -c wpa-home-lte.conf -i wlan0
>
> Successfully initialized wpa_supplicant
> ioctl[SIOCSIWENCODEEXT]: Invalid argument
> ioctl[SIOCSIWENCODEEXT]: Invalid argument
> wlan0: Trying to associate with dc:9b:d6:de:d4:27 (SSID='<redacted>' freq=2452 MHz)
> wlan0: Associated with dc:9b:d6:de:d4:27
> wlan0: WPA: Key negotiation completed with dc:9b:d6:de:d4:27 [PTK=CCMP GTK=CCMP]
> wlan0: CTRL-EVENT-CONNECTED - Connection to dc:9b:d6:de:d4:27 completed [id=0 id_str=]
>
> Kernel logs, failure:
> Nov 30 20:24:41 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
> Nov 30 20:24:41 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
> Nov 30 20:24:41 papaya kernel: wlan0: Invalid HE elem, Disable HE
> Nov 30 20:24:41 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
> Nov 30 20:24:42 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:42 papaya kernel: wlan0: authenticated
> Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 2/3)
> Nov 30 20:24:42 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 3/3)
> Nov 30 20:24:42 papaya kernel: wlan0: association with dc:9b:d6:de:d4:27 timed out
> Nov 30 20:24:45 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
> Nov 30 20:24:45 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
> Nov 30 20:24:45 papaya kernel: wlan0: Invalid HE elem, Disable HE
> Nov 30 20:24:45 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
> Nov 30 20:24:45 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:45 papaya kernel: wlan0: authenticated
> Nov 30 20:24:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:24:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 2/3)
> Nov 30 20:24:46 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 3/3)
> Nov 30 20:24:46 papaya kernel: wlan0: association with dc:9b:d6:de:d4:27 timed out
>
> Kernel logs, success:
> Nov 30 20:30:45 papaya kernel: wlan0: authenticate with dc:9b:d6:de:d4:27
> Nov 30 20:30:45 papaya kernel: wlan0: bad VHT capabilities, disabling VHT
> Nov 30 20:30:45 papaya kernel: wlan0: Invalid HE elem, Disable HE
> Nov 30 20:30:45 papaya kernel: wlan0: 80 MHz not supported, disabling VHT
> Nov 30 20:30:45 papaya kernel: wlan0: send auth to dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:30:45 papaya kernel: wlan0: authenticated
> Nov 30 20:30:45 papaya kernel: wlan0: associate with dc:9b:d6:de:d4:27 (try 1/3)
> Nov 30 20:30:45 papaya kernel: wlan0: RX AssocResp from dc:9b:d6:de:d4:27 (capab=0x431 status=0 aid=1)
> Nov 30 20:30:45 papaya kernel: wlan0: associated
> Nov 30 20:30:45 papaya kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
>
> System information:
> Artix dist, Linux papaya 6.0.7-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 03 Nov 2022 21:10:08 +0000 x86_64 GNU/Linux
>
> wpa_supplicant v2.10
>
> 05:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
>
> mt7921e                32768  0
> mt7921_common          94208  1 mt7921e
> mt76_connac_lib        69632  2 mt7921e,mt7921_common
> mt76                  102400  3 mt7921e,mt7921_common,mt76_connac_lib
> mac80211             1298432  3 mt76,mt7921_common,mt76_connac_lib
> libarc4                16384  1 mac80211
> cfg80211             1118208  4 mt76,mac80211,mt7921_common,mt76_connac_lib
> rfkill                 32768  5 asus_wmi,bluetooth,cfg80211
>
> I can compile a custom linux kernel and wpa_supplicant for e.g. debugging purposes. Let me know if you need more information. I didn't
> subscribe to this mailing list, so please answer directly.
>
> Regards,
> Matthias

2022-12-01 17:48:06

by Matthias G.

[permalink] [raw]
Subject: Re: Bug report: Can connect with 'wext', but not 'nl80211'

On Wed, 2022-11-30 at 21:29 +0100, Johannes Berg wrote:
> Sounds like the AP is broken and doesn't like some elements wpa_s
> includes when nl80211 has certain capabilities ...
>
> Not sure what we can do about that - maybe there's a way to
> selectively
> disable certain capabilities in wpa_s?
>
> johannes

Just for reference, both my Windows 10 and my Android phone can connect
to this 'Congstar'-labelled device without further configuration. I
don't know what Windows and Android are doing behind the scenes though.

Also, I'm not subscribed to either mailing list, so if you'd like more
information please answer directly.

Regards,
Matthias


2022-12-02 13:29:27

by Jouni Malinen

[permalink] [raw]
Subject: Re: Bug report: Can connect with 'wext', but not 'nl80211'

On Thu, Dec 01, 2022 at 06:45:01PM +0100, Matthias G. wrote:
> On Wed, 2022-11-30 at 21:29 +0100, Johannes Berg wrote:
> > Sounds like the AP is broken and doesn't like some elements wpa_s
> > includes when nl80211 has certain capabilities ...

> Just for reference, both my Windows 10 and my Android phone can connect
> to this 'Congstar'-labelled device without further configuration. I
> don't know what Windows and Android are doing behind the scenes though.

If you have a means for capturing wireless sniffer traces of the frames
exchanged between the AP and these various station devices, it would be
useful to take a look at what the exact differences in the Association
Request frame contents. For the nl80211 interface case itself, it would
be interesting to see what is the exact information element that makes
the AP misbehave, e.g., by removing them one by one (this might be
either in wpa_supplicant or kernel) until the association succeeds.

--
Jouni Malinen PGP id EFC895FA

2022-12-02 16:47:56

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Bug report: Can connect with 'wext', but not 'nl80211'

Hi Matthias,

>>> Sounds like the AP is broken and doesn't like some elements wpa_s
>>> includes when nl80211 has certain capabilities ...
>
>> Just for reference, both my Windows 10 and my Android phone can connect
>> to this 'Congstar'-labelled device without further configuration. I
>> don't know what Windows and Android are doing behind the scenes though.
>
> If you have a means for capturing wireless sniffer traces of the frames
> exchanged between the AP and these various station devices, it would be
> useful to take a look at what the exact differences in the Association
> Request frame contents. For the nl80211 interface case itself, it would
> be interesting to see what is the exact information element that makes
> the AP misbehave, e.g., by removing them one by one (this might be
> either in wpa_supplicant or kernel) until the association succeeds.

you can run iwmon (from iwd package) to capture the nl80211 traffic and
it will decode the frames for you.

You might want to also compare it to running iwd instead of wpa_supplicant
since I have some vague memory we had this kind of issue and handled it
somehow.

Regards

Marcel