wlan0: Unsupported driver 'nl80211'

Spearitch

Member
Credits
412
I am working with Buildroot, to flash an image on my STM32MP157C-DK2 I wanted to have Wi-Fi working it but I got this error:
Code:
Successfully initialized wpa_supplicant

nl80211: 'nl80211' generic netlink not found

Failed to initialize driver 'nl80211'

wlan0: Unsupported driver 'nl80211'

FAIL
I configure the interfaces and wpa_supplicant.conf files correctly normally. I don't know wthat that means but my configuration in the menuconfig and linux-menuconfig is right (I think). Does it maybe have something to do with my target machine (the STM in this case) ?

Every Kind of Help is appreciated since I am a newby in Embedded Linux
 


dos2unix

Well-Known Member
Credits
2,834
nl80211 is a generic driver. Usually used in conjunction with specific wifi drivers.

[[email protected] ~]# lsmod | grep 802
snd_soc_skl 180224 0
mac80211 1015808 1 ath10k_core
cfg80211 876544 3 ath,mac80211,ath10k_core
rfkill 28672 6 bluetooth,cfg80211
libarc4 16384 1 mac80211
03:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

On that system I have a Atheros Wifi Card.

[[email protected] ~]# lsmod | grep 802
mac80211 1015808 1 iwlmvm
snd_soc_skl 180224 0
libarc4 16384 1 mac80211
cfg80211 876544 3 iwlmvm,iwlwifi,mac80211
rfkill 28672 6 bluetooth,cfg80211
01:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)

On that system I have a Intel Wifi card.

[[email protected] ~]# lsmod | grep 802
mac80211 1015808 1 iwlmvm
libarc4 16384 1 mac80211
cfg80211 876544 3 iwlmvm,iwlwifi,mac80211
rfkill 28672 4 cfg80211
09:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

You will need to know what kind of Wifi card you have.
Many have the driver built-into the kernel, but many do not.
Intel usually does.
 

Spearitch

Member
Credits
412
nl80211 is a generic driver. Usually used in conjunction with specific wifi drivers.

[[email protected] ~]# lsmod | grep 802
snd_soc_skl 180224 0
mac80211 1015808 1 ath10k_core
cfg80211 876544 3 ath,mac80211,ath10k_core
rfkill 28672 6 bluetooth,cfg80211
libarc4 16384 1 mac80211
03:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

On that system I have a Atheros Wifi Card.

[[email protected] ~]# lsmod | grep 802
mac80211 1015808 1 iwlmvm
snd_soc_skl 180224 0
libarc4 16384 1 mac80211
cfg80211 876544 3 iwlmvm,iwlwifi,mac80211
rfkill 28672 6 bluetooth,cfg80211
01:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)

On that system I have a Intel Wifi card.

[[email protected] ~]# lsmod | grep 802
mac80211 1015808 1 iwlmvm
libarc4 16384 1 mac80211
cfg80211 876544 3 iwlmvm,iwlwifi,mac80211
rfkill 28672 4 cfg80211
09:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

You will need to know what kind of Wifi card you have.
Many have the driver built-into the kernel, but many do not.
Intel usually does.
How can I know that ? your command lsmod | grep 802 does not show anything in my case ( no error but simply nothing)

I talked to someone and he told me this but I didn't understand:

I'd suggest you make sure that CONFIG_NL80211 is compiled as built-in or module in the kernel inside the image.
if it is marked as module, make sure you modprobe it.
 

dos2unix

Well-Known Member
Credits
2,834
Usually people different programs. Most common is lspci.
But I see yours isn't working. It looks like a bug in your system.

[[email protected] ~]# lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:01.2 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x4 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)
00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 (rev d0)
00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)
00:1c.6 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 7 (rev d0)
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
00:1f.0 ISA bridge: Intel Corporation Z97 Chipset LPC Controller
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GM206 High Definition Audio Controller (rev a1)
02:00.0 Non-Volatile memory controller: Intel Corporation SSD 660P Series (rev 03)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)
05:00.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:01.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:03.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:05.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:07.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
09:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
0a:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0b:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller

Another popular tool is lshw

[[email protected] ~]# lshw -class network
*-network
description: Ethernet interface
product: Ethernet Connection (2) I218-V
vendor: Intel Corporation
physical id: 19
bus info: [email protected]:00:19.0
logical name: enp0s25
version: 00
serial: d0:50:99:a8:e1:24
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.1-4 latency=0 link=no multicast=yes port=twisted pair
resources: irq:48 memory:ef700000-ef71ffff memory:ef738000-ef738fff ioport:f040(size=32)
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: [email protected]:04:00.0
logical name: enp4s0
version: 11
serial: d0:50:99:a8:e1:22
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.16-300.fc33.x86_64 duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.0.70 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:18 ioport:d000(size=256) memory:ef500000-ef500fff memory:e2100000-e2103fff
*-network
description: Wireless interface
product: Wireless 8260

vendor: Intel Corporation
physical id: 0
bus info: [email protected]:09:00.0
logical name: wlp9s0
version: 3a
serial: c2:98:84:d7:ef:c6
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.8.16-300.fc33.x86_64 firmware=36.ad812ee0.0 8000C-36.ucode latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:59 memory:ef200000-ef201fff

inxi is also a good one.
[[email protected] ~]# inxi -N
Network:
Device-1: Intel Ethernet I218-V driver: e1000e
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
Device-3: Intel Wireless 8260 driver: iwlwifi
 

Spearitch

Member
Credits
412
Usually people different programs. Most common is lspci.
But I see yours isn't working. It looks like a bug in your system.

[[email protected] ~]# lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:01.2 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x4 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)
00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 (rev d0)
00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)
00:1c.6 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 7 (rev d0)
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
00:1f.0 ISA bridge: Intel Corporation Z97 Chipset LPC Controller
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GM206 High Definition Audio Controller (rev a1)
02:00.0 Non-Volatile memory controller: Intel Corporation SSD 660P Series (rev 03)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)
05:00.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:01.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:03.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:05.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
06:07.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
09:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
0a:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0b:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller

Another popular tool is lshw

[[email protected] ~]# lshw -class network
*-network
description: Ethernet interface
product: Ethernet Connection (2) I218-V
vendor: Intel Corporation
physical id: 19
bus info: [email protected]:00:19.0
logical name: enp0s25
version: 00
serial: d0:50:99:a8:e1:24
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.1-4 latency=0 link=no multicast=yes port=twisted pair
resources: irq:48 memory:ef700000-ef71ffff memory:ef738000-ef738fff ioport:f040(size=32)
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: [email protected]:04:00.0
logical name: enp4s0
version: 11
serial: d0:50:99:a8:e1:22
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.16-300.fc33.x86_64 duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.0.70 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:18 ioport:d000(size=256) memory:ef500000-ef500fff memory:e2100000-e2103fff
*-network
description: Wireless interface
product: Wireless 8260

vendor: Intel Corporation
physical id: 0
bus info: [email protected]:09:00.0
logical name: wlp9s0
version: 3a
serial: c2:98:84:d7:ef:c6
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.8.16-300.fc33.x86_64 firmware=36.ad812ee0.0 8000C-36.ucode latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:59 memory:ef200000-ef201fff

inxi is also a good one.
[[email protected] ~]# inxi -N
Network:
Device-1: Intel Ethernet I218-V driver: e1000e
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
Device-3: Intel Wireless 8260 driver: iwlwifi
yeah lswh is a package that I have to install before building the system.
Gonna try it
 

dos2unix

Well-Known Member
Credits
2,834
I know you are using buildroot here, but it may not be the best distro to start out on.
It assumes you have a lot of experience. It you want a full featured IOT, embedded Linux
that has alot of these things already built in a included, you might look at Fedora Silverblue.


At the very least you could the tools included in it, to find out about your system.
(Which sound card, which network card, which video card, etc..)
 

Spearitch

Member
Credits
412
I know you are using buildroot here, but it may not be the best distro to start out on.
It assumes you have a lot of experience. It you want a full featured IOT, embedded Linux
that has alot of these things already built in a included, you might look at Fedora Silverblue.


At the very least you could the tools included in it, to find out about your system.
(Which sound card, which network card, which video card, etc..)
Yeah but I am not alone in this project, and they want to go further with buildroot indeed

I don't know maybe sharing these with you may help
First one ist system config and second one is kernel config
 

Attachments

Spearitch

Member
Credits
412
I know you are using buildroot here, but it may not be the best distro to start out on.
It assumes you have a lot of experience. It you want a full featured IOT, embedded Linux
that has alot of these things already built in a included, you might look at Fedora Silverblue.


At the very least you could the tools included in it, to find out about your system.
(Which sound card, which network card, which video card, etc..)
Hey :)

I still coldn't find a solution and when I
lshw -class network
I get:
Code:
*-network
       description: Ethernet interface
       physical id: 1
       logical name: eth0
       serial: 00:80:e1:42:6b:16
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=st_gmac driverversion=Jan_2016 duplex=full ip=192.168.8.15 link=yes multicast=yes port=MII speed=1Gbit/s
#
I don't see any wifi infos here.

I will provide you with some files if it can help
 

Attachments

Last edited:

dos2unix

Well-Known Member
Credits
2,834
Very odd. Is this a physical computer or a VM?

Normally lshw will give the hardware type, version and manufacturer.

[[email protected] ~]# lshw -class network
*-network:0
description: Ethernet interface
product: 82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications)
vendor: Intel Corporation
physical id: 0

bus info: [email protected]:04:00.0
logical name: enp4s0f0
version: 06
serial: 00:26:55:ea:b9:aa
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=5.11-2 latency=0 link=no multicast=yes port=twisted pair
resources: irq:80 memory:f78a0000-f78bffff memory:f7880000-f789ffff ioport:e020(size=32) memory:f7860000-f787ffff
*-network:1
description: Ethernet interface
product: 82571EB/82571GB Gigabit Ethernet Controller D0/D1 (copper applications)
vendor: Intel Corporation

physical id: 0.1
bus info: [email protected]:04:00.1
logical name: enp4s0f1
version: 06
serial: 00:26:55:ea:b9:ab
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=5.11-2 latency=0 link=no multicast=yes port=twisted pair
resources: irq:87 memory:f7840000-f785ffff memory:f7820000-f783ffff ioport:e000(size=32) memory:f7800000-f781ffff
*-network
description: Wireless interface
product: Wi-Fi 6 AX200
vendor: Intel Corporation

physical id: 0
bus info: [email protected]:05:00.0
logical name: wlp5s0
version: 1a
serial: 2a:a2:3f:21:c9:7d
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.8.17-300.fc33.x86_64 firmware=55.d9698065.0 cc-a0-55.ucode latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:38 memory:f7700000-f7703fff
*-network
description: Ethernet interface
product: I211 Gigabit Network Connection
vendor: Intel Corporation

physical id: 0
bus info: [email protected]:06:00.0
logical name: enp6s0
version: 03
serial: 70:85:c2:f4:33:15
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=igb driverversion=5.6.0-k duplex=full firmware=0. 4-1 ip=192.168.0.55 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:40 memory:f7600000-f761ffff ioport:d000(size=32) memory:f7620000-f7623fff
 
Last edited:

Spearitch

Member
Credits
412
I am using a physical laptop but I m not using Buildroot for my Laptop. Just a remote control software to access my STM32MP1 after building Buildroot and flashing it.
 

shane87654

New Member
Credits
12
I am having the same problem: how to get wifi working on STM32MP157-DK2 using Buildroot?

First, I confirmed that the DK2 board has wifi by looking on the ST website

I found some resources on configuring the Pi using Buildroot for Wifi. On the Buildroot side this led me turn on the packages: dhcpd, ifupdownscripts.

Then I went to the Buildroot linux-menuconfig and turned on cfg80211. After rebuilding I don't see the wifi working. I tried a wpa_supplicant command from the Pi link above and got the following message

Code:
# wpa_supplicant -B -i wlan0 -W -D nl80211, wext -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Could not read interface wlan0 flags: No such device
wlan0: Unsupported driver ''
So the error message has at least changed (progress!) but still no wifi.

I then went and looked at the DTS file to see what it has to say about wifi and there's only these 2 sections:

Code:
/ {
    model = "STMicroelectronics STM32MP157C-DK2 Discovery Board";
    compatible = "st,stm32mp157c-dk2", "st,stm32mp157";

    aliases {
        serial3 = &usart2;
    };

    wifi_pwrseq: wifi-pwrseq {
        compatible = "mmc-pwrseq-simple";
        reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
    };
};

Code:
/* Wifi */
&sdmmc2 {
    arm,primecell-periphid = <0x10153180>;
    pinctrl-names = "default", "opendrain", "sleep";
    pinctrl-0 = <&sdmmc2_b4_pins_b>;
    pinctrl-1 = <&sdmmc2_b4_od_pins_b>;
    pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
    non-removable;
    st,neg-edge;
    bus-width = <4>;
    vmmc-supply = <&v3v3>;
    mmc-pwrseq = <&wifi_pwrseq>;
    #address-cells = <1>;
    #size-cells = <0>;
    keep-power-in-suspend;
    status = "okay";

    brcmf: [email protected] {
        reg = <1>;
        compatible = "brcm,bcm4329-fmac";
    };
};
Looking in the DTSI there is no mention of WiFi but ethernet pins are configured:
Code:
ethernet0_rgmii_pins_a: rgmii-0 {
                pins1 {
                    pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
                         <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
                         <STM32_PINMUX('G', 13, AF11)>, /* ETH_RGMII_TXD0 */
                         <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
                         <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
                         <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
                         <STM32_PINMUX('B', 11, AF11)>, /* ETH_RGMII_TX_CTL */
                         <STM32_PINMUX('A', 2, AF11)>, /* ETH_MDIO */
                         <STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */
                    bias-disable;
                    drive-push-pull;
                    slew-rate = <2>;
                };
                pins2 {
                    pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
                         <STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
                         <STM32_PINMUX('B', 0, AF11)>, /* ETH_RGMII_RXD2 */
                         <STM32_PINMUX('B', 1, AF11)>, /* ETH_RGMII_RXD3 */
                         <STM32_PINMUX('A', 1, AF11)>, /* ETH_RGMII_RX_CLK */
                         <STM32_PINMUX('A', 7, AF11)>; /* ETH_RGMII_RX_CTL */
                    bias-disable;
                };
            };

            ethernet0_rgmii_pins_sleep_a: rgmii-sleep-0 {
                pins1 {
                    pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
                         <STM32_PINMUX('G', 4, ANALOG)>, /* ETH_RGMII_GTX_CLK */
                         <STM32_PINMUX('G', 13, ANALOG)>, /* ETH_RGMII_TXD0 */
                         <STM32_PINMUX('G', 14, ANALOG)>, /* ETH_RGMII_TXD1 */
                         <STM32_PINMUX('C', 2, ANALOG)>, /* ETH_RGMII_TXD2 */
                         <STM32_PINMUX('E', 2, ANALOG)>, /* ETH_RGMII_TXD3 */
                         <STM32_PINMUX('B', 11, ANALOG)>, /* ETH_RGMII_TX_CTL */
                         <STM32_PINMUX('A', 2, ANALOG)>, /* ETH_MDIO */
                         <STM32_PINMUX('C', 1, ANALOG)>, /* ETH_MDC */
                         <STM32_PINMUX('C', 4, ANALOG)>, /* ETH_RGMII_RXD0 */
                         <STM32_PINMUX('C', 5, ANALOG)>, /* ETH_RGMII_RXD1 */
                         <STM32_PINMUX('B', 0, ANALOG)>, /* ETH_RGMII_RXD2 */
                         <STM32_PINMUX('B', 1, ANALOG)>, /* ETH_RGMII_RXD3 */
                         <STM32_PINMUX('A', 1, ANALOG)>, /* ETH_RGMII_RX_CLK */
                         <STM32_PINMUX('A', 7, ANALOG)>; /* ETH_RGMII_RX_CTL */
                };
            };
So I'm not sure what to make of all this. Do we need to do some wifi driver configuration of the DTS/DTSI files?
 

Spearitch

Member
Credits
412
I am having the same problem: how to get wifi working on STM32MP157-DK2 using Buildroot?

First, I confirmed that the DK2 board has wifi by looking on the ST website

I found some resources on configuring the Pi using Buildroot for Wifi. On the Buildroot side this led me turn on the packages: dhcpd, ifupdownscripts.

Then I went to the Buildroot linux-menuconfig and turned on cfg80211. After rebuilding I don't see the wifi working. I tried a wpa_supplicant command from the Pi link above and got the following message

Code:
# wpa_supplicant -B -i wlan0 -W -D nl80211, wext -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Could not read interface wlan0 flags: No such device
wlan0: Unsupported driver ''
So the error message has at least changed (progress!) but still no wifi.

I then went and looked at the DTS file to see what it has to say about wifi and there's only these 2 sections:

Code:
/ {
    model = "STMicroelectronics STM32MP157C-DK2 Discovery Board";
    compatible = "st,stm32mp157c-dk2", "st,stm32mp157";

    aliases {
        serial3 = &usart2;
    };

    wifi_pwrseq: wifi-pwrseq {
        compatible = "mmc-pwrseq-simple";
        reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
    };
};

Code:
/* Wifi */
&sdmmc2 {
    arm,primecell-periphid = <0x10153180>;
    pinctrl-names = "default", "opendrain", "sleep";
    pinctrl-0 = <&sdmmc2_b4_pins_b>;
    pinctrl-1 = <&sdmmc2_b4_od_pins_b>;
    pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
    non-removable;
    st,neg-edge;
    bus-width = <4>;
    vmmc-supply = <&v3v3>;
    mmc-pwrseq = <&wifi_pwrseq>;
    #address-cells = <1>;
    #size-cells = <0>;
    keep-power-in-suspend;
    status = "okay";

    brcmf: [email protected] {
        reg = <1>;
        compatible = "brcm,bcm4329-fmac";
    };
};
Looking in the DTSI there is no mention of WiFi but ethernet pins are configured:
Code:
ethernet0_rgmii_pins_a: rgmii-0 {
                pins1 {
                    pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
                         <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
                         <STM32_PINMUX('G', 13, AF11)>, /* ETH_RGMII_TXD0 */
                         <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
                         <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
                         <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
                         <STM32_PINMUX('B', 11, AF11)>, /* ETH_RGMII_TX_CTL */
                         <STM32_PINMUX('A', 2, AF11)>, /* ETH_MDIO */
                         <STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */
                    bias-disable;
                    drive-push-pull;
                    slew-rate = <2>;
                };
                pins2 {
                    pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
                         <STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
                         <STM32_PINMUX('B', 0, AF11)>, /* ETH_RGMII_RXD2 */
                         <STM32_PINMUX('B', 1, AF11)>, /* ETH_RGMII_RXD3 */
                         <STM32_PINMUX('A', 1, AF11)>, /* ETH_RGMII_RX_CLK */
                         <STM32_PINMUX('A', 7, AF11)>; /* ETH_RGMII_RX_CTL */
                    bias-disable;
                };
            };

            ethernet0_rgmii_pins_sleep_a: rgmii-sleep-0 {
                pins1 {
                    pinmux = <STM32_PINMUX('G', 5, ANALOG)>, /* ETH_RGMII_CLK125 */
                         <STM32_PINMUX('G', 4, ANALOG)>, /* ETH_RGMII_GTX_CLK */
                         <STM32_PINMUX('G', 13, ANALOG)>, /* ETH_RGMII_TXD0 */
                         <STM32_PINMUX('G', 14, ANALOG)>, /* ETH_RGMII_TXD1 */
                         <STM32_PINMUX('C', 2, ANALOG)>, /* ETH_RGMII_TXD2 */
                         <STM32_PINMUX('E', 2, ANALOG)>, /* ETH_RGMII_TXD3 */
                         <STM32_PINMUX('B', 11, ANALOG)>, /* ETH_RGMII_TX_CTL */
                         <STM32_PINMUX('A', 2, ANALOG)>, /* ETH_MDIO */
                         <STM32_PINMUX('C', 1, ANALOG)>, /* ETH_MDC */
                         <STM32_PINMUX('C', 4, ANALOG)>, /* ETH_RGMII_RXD0 */
                         <STM32_PINMUX('C', 5, ANALOG)>, /* ETH_RGMII_RXD1 */
                         <STM32_PINMUX('B', 0, ANALOG)>, /* ETH_RGMII_RXD2 */
                         <STM32_PINMUX('B', 1, ANALOG)>, /* ETH_RGMII_RXD3 */
                         <STM32_PINMUX('A', 1, ANALOG)>, /* ETH_RGMII_RX_CLK */
                         <STM32_PINMUX('A', 7, ANALOG)>; /* ETH_RGMII_RX_CTL */
                };
            };
So I'm not sure what to make of all this. Do we need to do some wifi driver configuration of the DTS/DTSI files?
This what I figured out and itworked:

1) Invoke the Kernel configuration utility using make linux-menuconfig in your Buildroot directory on
your host machine.
2) Enable Wireless Networking support under Networking support
3) Enable cfg80211 - wireless configuration API, and Generic IEEE 802.11 Networking Stack
(mac80211), under Networking Support,Wireless
4) Enable EEPROM 93CX6 support under Device Drivers, Misc devices, EEPROM support. Required
for RTL8187 module in my Wi-Fi dongle, may not be needed for your particular adapter
5) Enable Wireless LAN driver support under Device Drivers, Network device support
6) Invoke make menuconfig within the buildroot folder from a command prompt
7) Select package iw required to configure wireless networking, under Target packages, Networking applications.
Enable iproute2 if you want to use the ip utility instead of ifconfig.
9) Select package wpa_supplicant and its sub-packages for WPA/WPA2 support:
- Install wpa_cli binary
- Install wpa_passphrase binary
- Enable Support for soft Ap
9) Activated Broadcom FullMAC WLAN driver as module ( : Press space several time to change it)
10) Activated SDIO bus interface support for FullMAC driver
11) Activated wpa_supplicant dhcp
12) go to /lib/firmware and create a directory name firmware
13) git clone git://github.com/murata-wireless/cyw-fmac-fw.git;protocol=https;nobranch=1;name=
murata;destsuffix=murata
14) git checkout -b 8d87950bfad28c65926695b7357bd8995b60016a. If you wnt to check the version then
use:
sha256sum brcmfmac43430-sdio.bin
3ea748266c78351880d6389d672bd22eb0e13629c0607b5010a4a410d1395548 brcmfmac43430-sdio.bin
15) get the .txt file from git repository of ST and put the .bin and .txt file on the /lib/firmware/brcm
directory.
16) copy the brcm43430-sdio.1DX.clm_blob to /lib/firmware/brcm and rename it to brcmfmac43430-
sdio.clm_blob
17) make
18) flash your sdcard with the new image
19) Wifi Setup on the target machine
20) make
21) flash your sdcard with the new image
**Wifi Setup on the target machine**
23) Use wpa_passphrase MYSSID passphrase > /etc/wpa_supplicant.con
24) modprobe brcmfmac
25) ifconfig wlan0 up
26) wpa_supplicant -B -iwlan0 -c /etc/wpa_supplicant.conf
# wait a little bit
27) ifconfig -a
 


Members online


Top