Posts by treysis

    Never used WPA3. WPA/WPA2 mixed or WPA-only or WPA2-only didn't make a difference.

    I will try without encryption!

    If I find my WiFi dongle I will try that as well.

    Already increased wait time but that's not it. No matter the waiting (tried different methods, even on boot), the first connection will still fail with "invalid key" and thus connman(?) will disable auto-connect for this network for the time being.

    Thinking a little further: Have you also considered that the counterpart to the Wi-Fi connection: the router/repeater,

    Of course! That's why I've tried other routers as well.

    might not be "enthusiastic" about this type of connection interruption by the Broadcom client and block the reconnection?

    There is no reconnection. It happens on first connection attempt after hours/days.

    It's a very large number of the users with RPi, LE and wifi connection. So, in the case of the clear iwd/broadcom bug, this forum would be filled with bug reports

    There are plenty of bug reports! Forum and Github. From many reports you can see that people are simply switching to cable or external WiFi adapter because they cannot find a solution.

    and probably solved long time ago. I don't say all it's perfect with iwd, just this probably isn't a simple software "bug" case.

    Has to be solved by iwd or broadcom folks. I don't think they monitor bug reports as closely.

    I had this wifi "thing" or something very the same, but at least I tried few things.

    I also tried a few things: simpler password/ssid, different routers, Pi is within 1 m of router, 2.4 vs 5 GHz, WPA vs WPA2.

    With external antenna, I only disconnected that tiny and weak on-board antenna and connected one with "normal size", the broadcom wifi and the iwd remains the same (nightly build LE, so the iwd it's more or less up to date). I don't know if in my case what triggered that issue, was the signal strenght or something in the router... but now it's working well.

    As I said, the Pi is more or less next to the Pi. And once it is connected, there is no issue whatsoever. For hours. The only problem is autoconnection after ungraceful shutdown.

    My current workaround is to have both 2.4 and 5 GHz networks configured for autoconnect. So after ungraceful shutdown, the first one to connect to will fail and LE will then just connect to the other one.

    I proved it. Look at my logs. No WPA3, RPi close to router, tested with different routers, tested both 2.4 and 5 GHz, 100% replicable issue, only after ungraceful shutdown.

    You said you almost never use WiFi let alone internal WiFi. If you would try, you'd be able to replicate the issue! Important: only after ungraceful shutdown! That's why it seems random to many users. It is not!

    Some of the feedback / known issue / suggestions on the issues - please try these first.

    Disabling fast-transition (FT) in access-point radio properties (this may be resolved in current connman/iwd/drivers, there have been changes in all 3 code bases around this)
    Not using WPA3 (this may be resolved in current connman/iwd/drivers, there have been changes in all 3 code bases around this)
    Moving the device closer to the access-point to improve signal strength

    Different underlying issues. The main issue, however, is not related to any of those. The main issue is some software/firmware issue on boot after unclean shutdown.

    Well, I believe it just hasn't been viewed isolated and is instead mixed with other unrelated WiFi issues. What is clear: THIS problem only (but always!) occurs when there was no graceful shutdown (reboot or boot after shutdown), but never occurs when the system was shutdown properly, on at least the RPi4 platform.

    It most likely affects everyone. It's just that many people went for cable as a workaround (or in general) and never noticed that their WiFi isn't working.

    So yes, the overall user base that insists on using WiFi might be low, but it's most likely every WiFi user out there.

    I'll try a different platform than RPi4 when I find the time.

    So, since the issue is not magically going to disappear, I eventually found the time to capture the logs of iwd.

    Here is the log where the autoconnect after a powerloss fails:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    And here is the log where autoconnect works after reboot/graceful shutdown:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I don't think it's only affecting a few users as mentioned in this infamous thread: invalid wifi key

    I see a lot of posts about this error, also a very long github issue: https://github.com/LibreELEC/LibreELEC.tv/issues/7166

    Thanks. I can rule out poor signal strength as router and RPi4 are in direct vicinity of each other and also because the error is 100% reproducible and the workaround also works 100% of the time. Also both 2.4 and 5 GHz networks are affected. Once connection is established, there is no issue with it and I never had any dropouts/disconnects.

    I'll post the full log but it'll take some time to redact as there's lots of sensitive information (neighboring WiFi stations in particular) contained within.

    Can I somehow get the wireless stack to be more verbose in its output?

    Had a look at the journal now. Nothing obvious. iwd just fails telling me the key was invalid (which of course it is not as it works after the next boot). Unfortunately, only connmand is verbose, iwd not so much: