Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A64 => Topic started by: francois on December 15, 2021, 11:36:22 am

Title: wifi and the latest Bullseye minimal image
Post by: francois on December 15, 2021, 11:36:22 am
Hello, I'm trying the latest Bullseye minimal image (released on Nov 30) from
https://images.olimex.com/release/a64/

and I'm having trouble connecting to a wifi network.

I see that NetworkManager and wpa_supplicant are running as services but trying nmtui to connect to a wifi does not work. Wifi networks are detected but even though I provide a password, I end up with the same message:

"Passwords or encryption keys are required to access the wireless network 'xxx'"
and finally (after 2 tries):
"Could not activate connection: Activation failed: Secrets were required but not provided".

I tried editing the connection and provide a BSSID (as it's recommended on some websites), but no success. I've tried with different wifi networks and always the same result.


What's the proper/expected way to connect to a wifi using this Bullseye image ? What am I doing wrong ?

Thanks

Francois
Title: Re: wifi and the latest Bullseye minimal image
Post by: francois on December 18, 2021, 10:09:59 pm
am I really the only one unable to connect with wifi using the latest bullseye image ?
Title: Re: wifi and the latest Bullseye minimal image
Post by: gDanix on January 07, 2022, 11:25:21 pm
I also have this problem. The wifi never really gets to reliably connect.

I have searched a lot about this issue, and I didn't find anything. I'm starting to think that it's a hardware problem, but I don't know where to start debugging.

Maybe @LubOlimex can point the information needed (models, dmesg, etc...) to try to devise what can be going on.
Title: Re: wifi and the latest Bullseye minimal image
Post by: JohnS on January 08, 2022, 01:47:24 pm
Unreliable could well be poor power.

John
Title: Re: wifi and the latest Bullseye minimal image
Post by: gDanix on January 08, 2022, 03:22:20 pm
I don't think so, since I'm using https://www.olimex.com/Products/Power/SY0605E/ to power up the board. (This is the 1 amp version, there is another power supply capable of 2 amps, but I don't think that 1 amp is limiting the capabilities of the board, is it? (also, taking into account that at first, wifi worked well)).

Nevertheless, my image was quite old, and it got recently broken after I repeteadly powered off the board abruptly. In a couple of days, I'll download the most recent images, and test WIFI with no other USB or HDMI device connected to it, to definitively rule out the power issue.
Title: Re: wifi and the latest Bullseye minimal image
Post by: gDanix on January 13, 2022, 01:19:34 am
Well, now I can't reproduce this issue. It just dissappeared since my OS image (an old, but official one) was automatically repaired (I didn't know it was capable of doing so), and it didn't happened in the most recent image.

Maybe it was a software problem...
Title: Re: wifi and the latest Bullseye minimal image
Post by: gDanix on January 15, 2022, 08:40:35 pm
Well, I have done some more tests, and I honestly think that the problem is that the wifi signal is not strong enough for the PCB antenna that most of the Olinuxino A64 models have. I paired my board with my phone, very close to the board, and the connection was good, and I didn't have any problems.

In my home a straight line from my board and my router has to go through 3 walls. PCs and phones can reach, but I think my board don't.

Maybe this is the reason why an external antenna version of the board exists now (A64-OLinuXino-1Ge16GW-EA), so getting the board closer to the router or using ethernet would be the solution.

In my case, neither are possible options, so I just hacked OpenWRT into an old router, made it connect by wifi to my main router, plug the board to the old router by ethernet, and everything went incredibly well. I opened an SSH session to my board, forget about it during a couple oy hours, and after that, the connection was still alive and everything was working fast and as expected.
Title: Re: wifi and the latest Bullseye minimal image
Post by: francois on January 17, 2022, 11:09:17 am
I have myself made more tests too, and to sum it up, wifi is not usable.

The first thing I did was set up 4 (four !) different AP/Wifi routers. One has 802.11n deactivated (as I read somewhere that older wifi chips might have problems with 802.11n even though they're supposed to support it), one has no password for the SSID, one is an AP-only, and another is a traditional wifi router with 2.4Ghz and 5Ghz bands. Brands are Cisco, Tp-link and Asus. All wifis provide DHCP in a way or another.

Of course any real computer or smartphone is able to connect to all these wifis without any problem.

The tests were made on 3 (three !) different Olinuxino-64 boards !

Then I used the "Bullseye Base" image, the one with xfce, naively thinking that Olimex had at least checked that this worked. Fact is: it doesn't 90% of the time. The message is always the same ("secrets were required but not provided"). Once this message appears it's useless to continue, you'll have more luck by rebooting. If you're lucky, after reboot, you'll be "magically" connected to the wifi.

Now connecting from one wifi to another is again dictated by sheer luck. It'll seem to work until it doesn't and then you just "have to wait" (?) or reboot and this will like "shuffle the cards" and maybe you'll be able to connect.

Moving to the "Bullseye minimal" image, I first tried to use nmtui as it seemed simpler but it really does not seem to work. What worked, though with the same kind of behavior as the xfce image, it to use nmcli directly ... by insisting (meaning issue the same command over and over and reboot from time to time), you'll be finally be able to connect.

Once a connection is successful, the wifi configuration is saved in /etc/NetworkManager/system-connections and it's easier to move from one wifi connection to another ... but sometimes it just won't work.


Reading the logs it's very obscure why connections are failing. It's always a "association took to long" timeout. Looks like there's some kind of desynchronization between the RTL8723 driver, the Network Manager service and wpa_supplicant.

Second to last thing I did is use an unofficial bullseye image (found here: https://sd-card-images.johang.se/boards/a64_olinuxino.html). The image is very incomplete/minimal and the RTL8723 firmware needs to be installed. I also installed iwd (instead of NetworkManager and wpa_supplicant) and I had much more consistent results. Connection failed sometimes but once it works, it works and connecting to another wifi works too.

As using this incomplete image required much work for the other stuff to work (like audio), I thought that maybe using iwd on the official image would be the solution (and of course disabling/uninstalling NetworkManager and wpa_supplicant). Unfortunately it was not as I was unable to reproduce the same amount of successful results. Meaning there's something on the image that is wrong. What exactly is beyond my abilities.


I must insist again that the tests were made on 3 different olinuxino-64 and that it does not matter what kind of AP/wifi router is used, security activated or not. What's more, I've never been able to connect to the router that provides the same SSID on two different frequencies (2.4 and 5.0). I suppose it's because the SSID is the same and it seems like this is asking to much to the RTL8723.


I'm tired of trying and trying again to make this work.


If anyone at Olimex is reading this, please TELL ME what I'm doing wrong OR FIX your IMAGES.

Until then I won't order any more from Olimex (I have 6-7 olinuxino-64 that are just useless) and I certainly won't recommend Olimex to anyone.
Title: Re: wifi and the latest Bullseye minimal image
Post by: francois on January 17, 2022, 04:43:54 pm
UPDATE.

Ok it looks like I've finally been able to make it work but NOT BY USING OLIMEX IMAGES' DEFAULT CONFIGURATION. I still need an answer about how to make it work with those.

Here's what I did, starting from a fresh Olimex Bullseye minimal image (transferred to eMMC)

apt update
apt upgrade
(this upgraded 12 packets -- don't know if this has any importance or not ... probably not ...)

Install iwd, disable wpa_supplicant and NetworkManager ...
apt install iwd
systemctl mask --now wpa_supplicant
systemctl mask --now NetworkManager
systemctl enabled --now iwd
nano /etc/iwd/main.conf
Wrote the following in /etc/iwd/main.conf to allow iwd's own dhcp client to get an ip address:
[General]
EnableNetworkConfiguration=true
Then:
systemctl restart iwd
iwctl station wlan0 scan
iwctl station wlan0 get-networks

I tried then to connect to one of my 4 wifis:
iwctl station wlan0 connect MY_WIFI --passphrase MY_SECRET

It would fail at first with "Operation failed" error. The log/journal would show a warning like "Is there another supplicant running" (which is not the case, of course).

But running it again, repeatedly if needed, will finally work.
I also tried to create the psk file beforehand (as instructed here:  https://wiki.archlinux.org/title/Iwd#WPA-PSK ) but would obtain the same failure.

Only repeating the same command again and again would finally work (usually in 2-3 tries).

Then I've done the same for the other 3 wifis. And the very good news is that:
- my wifi connection is stable
- will reconnect to the preferred wifi after a reboot
- can switch from one wifi to another without any error using iwctl


I hope this can help others but WHY did Olimex used wpa_supplicant and NetworkManager when obviously it does not work, is beyond my comprehension.

I'm still FURIOUS because I've lost days working on this while I was expecting Olimex to provide a working image and/or at least some support on these forums.  >:(

FINAL NOTE: I have retested the above procedure from scratch 3 times and it's been working successfully EVERY TIME while Olimex's wpa_supplicant/NetworkManager fails miserably.



Title: Re: wifi and the latest Bullseye minimal image
Post by: gDanix on January 23, 2022, 06:31:49 pm
Thank you, @francois , for the detailed report!

I think everybody reading this will be extremely happy that this is only a software issue. My worst fear was that a lot of boards would need some sort of hardware repair.

Personally I think Olimex is doing a good job, taking into account they may not have a budget as high as others (that probably spend way more in marketing and partners than in actually doing something). I personally will continue buying from Olimex, in part to support a small european business, and in part because Amazon, Aliexpress and co. have enough money and power to do more harm than good.

I hope that your suggestions trigger all sorts of improvements in future versions of the official images!

Many thanks to everybody involved in this issue.
Title: Re: wifi and the latest Bullseye minimal image
Post by: francois on January 26, 2022, 10:02:48 am
@gDanix,

I sincerely wish they did a better job at support. They provide images (and sell them on SD cards !) that are not usable/complete/properly configured.

I also chose Olimex because I wanted to support a European company and not rely on Amazon, Alibaba or other Chinese products, but unfortunately, at this stage, I cannot recommend Olimex to anyone who'd like an alternative to a Raspberry for instance.

Hoping this will change very soon ...
Title: Re: wifi and the latest Bullseye minimal image
Post by: LubOlimex on January 27, 2022, 04:53:48 pm
Thank you for the contribution, it seems the wifi network tools are not working as they should in the default a64 images, I've notified the developers and hopefully this will be fixed for the next release. Overall it is free and open-source effort and while we try our best to have everything working, sometimes it is very hard to have both everything working and moving forward we newer Linux releases and so on.

Also sorry for delay in response, there was quite a huge pile up of things after new year's break.
Title: Re: wifi and the latest Bullseye minimal image
Post by: francois on May 15, 2022, 12:33:27 pm
I noticed a few days ago that Olimex released a new Bullseye image on April 14, 2022 .

Still this does NOT fix the wifi issue ...

nmtui does NOT work even though it's the only thing installed in the image ...

Using/installing iwd ultimately works but after so many attempts it's laughable !

I don't understand ... why is this still not fixed ? Looks like the devs didn't even test the wifi part ...

Very very very disappointed ...

I won't buy anything else from Olimex unless this is fixed or unless a method to fix it is provided ...