Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp604758pxb; Sat, 11 Sep 2021 15:23:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi/P4fsh+7He3i947w+njS/wjPIHxFmwQCra9PsHXIeZMmvxc90qHvfbhkrIvf1j8SJmS7 X-Received: by 2002:a05:6402:318c:: with SMTP id di12mr5141258edb.55.1631398996981; Sat, 11 Sep 2021 15:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631398996; cv=none; d=google.com; s=arc-20160816; b=tTR3E4y5PPH0iVnMBvblp2n2FLuKhSNGs62oV3/KKh9DLOdmI6nUswxluMfed5VMLX tMkaw1Ov/XffI/feJP/QHlu1Y9pOY6uACDnZ2CcPYxbJwCQu9FsaYDYdYsXAg9dELQwa kvIEAYkZ5kQz0kxiq+Fl1nPdmN3xB32pCuhzpkCFukiWslEmG/i+qFOhUY0nCN6Vkrak k00H/OIq6mmMQhoMV/X9jPzMLN8D3dzJzC6/wjVTWR5WjhUg0mZ0XVM0xqKYKGV9hdfg 8pa9OuNM8e78F2jOjciBrk2KwO+UJ2uRMbM1lvMkr8BYAsYlERfBBOLqYLX6dyDwpw7U 1zhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:to:message-id:date; bh=1YiPPynntw2xHS5u6PlC2Mm1JTlMZnkr8Dmo/gP8Fj0=; b=KAs2QfHoLTX4B+7CNBA9Y62erB1CzU6CAyraG6lGLYWoiNwG0ttDmX0fEN+UPp12qQ 7BHdvl7nC18c28sbjftLG5v+9RWi6BORGlu4gTfCuMBdME60euMLQ151e4Dj7LZULB6y 0aILjNi1coQmdmRPCCBtpxxvMCPpekWRdEhjE9XRcb/5GHSVYGF8PPghihsb9JtaXC7w OGtjZqoWSbWo+NuSsitejm6ef5ZlQzbIzbWz2ZzDgF0DbMWeljpD/rGb2jd5QQdoX6rh Kz57Q9pkqjSyd86UK3uxMLiNqQYSKd5idDGR81iTOJZTiIsia9CikXnFMrD4ywTHOwit F5xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf3si2857942edb.237.2021.09.11.15.22.37; Sat, 11 Sep 2021 15:23:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231521AbhIKWVs (ORCPT + 99 others); Sat, 11 Sep 2021 18:21:48 -0400 Received: from smtp6.ctinetworks.com ([205.166.61.199]:60188 "EHLO smtp6.ctinetworks.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbhIKWVs (ORCPT ); Sat, 11 Sep 2021 18:21:48 -0400 X-Greylist: delayed 532 seconds by postgrey-1.27 at vger.kernel.org; Sat, 11 Sep 2021 18:21:48 EDT Received: from localhost (unknown [117.193.4.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp6.ctinetworks.com (Postfix) with ESMTPSA id 2E4BD85B00 for ; Sat, 11 Sep 2021 18:11:34 -0400 (EDT) Date: Sun, 12 Sep 2021 03:39:32 +0530 (IST) Message-Id: <20210912.033932.2187976226343353888.enometh@meer.net> To: linux-wireless@vger.kernel.org Subject: help troubleshooting failures connect to an access point with iw/iwd From: Madhu In-Reply-To: <20210421.102130.167565230547376402.enometh@meer.net> References: <20210420.063244.1157699536418751229.enometh@meer.net> <9167fd6d-affa-21d5-bd8d-0fb3d49d38f0@justmail.de> <20210421.102130.167565230547376402.enometh@meer.net> X-Mailer: Mew version 6.8 on Emacs 28.0.50 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: 2E4BD85B00.A91D1 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-SpamCheck: X-ctinetworks-Watermark: 1632262301.20706@m9DEXiAm/ywwWfCSV0XDqw Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org I've been using wpa_supplicant with rtw88 and b43 cards to connect to a wpa-psk home router successfully for many years. This was with -Wext. However I'm not able to accomplish this with iw or iwd. $iw --version iw version 5.9 $ iw dev wlan0 connect SSID key psk:<64bits> PSK CCMP CCMP command failed: Invalid argument (-22) - This always fails with this message. corresponding parameters work with wpa_supplicant. $/usr/libexec/iwd --version 1.17 $/usr/libexec/iwd -d $ iwctl station wlan0 get-hidden-access-points $ iwctl --passphrase=XXX station wlan0 connect SSID If this connects it always immediately disconnects kernel: [86195.924708] wlan0: authenticate with 58:xx:6e:xx:51:e4 kernel: [86196.264641] wlan0: send auth to 58:xx:6e:xx:51:e4 (try 1/3) kernel: [86196.268477] wlan0: authenticated kernel: [86196.274379] wlan0: associate with 58:xx:6e:xx:51:e4 (try 1/3) kernel: [86196.281420] wlan0: RX AssocResp from 58:xx:6e:xx:51:e4 (capab=0x411 status=0 aid=1) kernel: [86196.281491] rtw_8822ce 0000:xx:00.0: sta 58:xx:6e:xx:51:e4 joined with macid 0 kernel: [86196.282235] wlan0: associated kernel: [86238.445926] wlan0: deauthenticated from 58:xx:6e:xx:51:e4 (Reason: 6=CLASS2_FRAME_FROM_NONAUTH_STA) kernel: [86238.594381] rtw_8822ce 0000:xx:00.0: sta 58:xx:6e:xx:51:e4 with macid 0 left - So an connection, after authentication immediately deauthenticates with (Reason: 6=CLASS2_FRAME_FROM_NONAUTH_STA). The deauthentication happens when any packet is to be sent on the interface - In the case of b43 any authenticated connection also deauthenticates but with (Reason: 15=4WAY_HANDSHAKE_TIMEOUT) - These are also the failure modes when iwd is used under NetworkManager-1.33.2 - I tried connman-1.40, but that didn't work at all It kept putting the device into ad-hoc mode before trying to connect, and the connection fails (even if i set the device in station mode via iwctl, connman sets it to ad-hoc mode) I'm stumped on how to debug this - I'm seeking any suggestions on what to look at the netlink layer to track down these problems. I may be missing something basic, if you can spot it please let me know. [latest 5.10 kernel with both in-kernel rt88 drivers and lwfinger from april 2021]