OpenWRT-x86_64: wireless fails to start

I have a Zotac Zbox-ID80 which I want to convert to a router. It's a dual-core Atom CPU, taked 4GB of RAM and a SATA drive, good enough for lots of services. Included networking hardware is a RTL8169 chipset for ethernet, and a Centrino-N 130 for wifi.
I've cloned the OpenWRT repository, switched to 21.02.0-rc3 release branch, and compiled an ext4 image with all the relevant drivers built in. It boots, and the wired networking works fine, but I have trouble with the wireless.
The drivers for wireless (iwlwifi) load fine, the hardware is detected, the wlan0 interface is up, But any attempts to configure it as something useful fail.
Yes, I have checked /etc/config/wireless, and it's not disabled. The file looks like it is correctly configured.
The syslog mentions that wpa_supplicant is attempting to start, but fails. There is no reason mentioned for the failure as far as I can see.

Any help or ideas appreciated.

if "something useful" is an AP, run iw list, and verify AP mode's supported.

    Supported interface modes:
             * IBSS
             * managed
             * AP
             * AP/VLAN
             * monitor

Actually "something useful" to me means client mode. I want it to connect to another wifi router.
I'm aware of AP mode not working on intel wifi chipsets of that generation.

(edit) I should probably mention that I have the exact some issue with a USB wifi adapter (rtl8821ae). Driver loads, wlan interface is up but cannot be configured.

does iw dev <dev> scan work ?

let me try, I'll be back in a few.
While things are booting up, I can say that the "scan" button in the LuCi wireless menu works, it does bring up a list of APs it can connect to, then supposedly it connects to the one I select - but then the wlan interface is listed as "not working"

Yes, iw dev wlan0 scan works. It lists my APs, capabilities etc.

I should mention that one odd thing is that, after the scan and when I try to configure it to connect to my AP, I enter the passphrase, but then it will not let me select an encryption mode. The drop-down menu only has one option "no encryption" which is incorrect. I use WPA2-PSK, but that option does not appear in the menu as it should.
However, I have tried to connect to an open AP (no encryption) and that also fails.

Update: I have added another set of drivers to the image (for rtl8188e) and tested it on another embedded PC, a Foxconn iBT29 (quad-core pentium, 8GB RAM, rtl8169 and rtl8188)

I got the exact same behavior. The wired LAN works, but the wireless doesn't. The wlan interface is present, I can scan for APs and supposedly connect to them, but then there is no connection, wpa_supplicant error in syslog etc exactly as in the original post.

I am out of ideas at this point. That's 2 different systems which fail to get a usable wifi connection.

RTL wifi is seldom used in the same sentence as the word usable :slight_smile:

What is the wpa_supplicant, error message anyway?

"wpa_supplicant failed to start"

Also, I've been using rtl-based cards without many problems, for several years.

Assuming those half pci (?) wifi cards are native - not all card/mobo combinations work together. I wonder if you can force it to connect using iw commands?

https://wireless.wiki.kernel.org/en/users/documentation/iw

https://hev.cc/2654.html

https://wiki.debian.org/iwlwifi#supported

The card is the one that came built into the system. It works fine in a regular Linux distro. It's actually built into the motherboard, not in a slot.