cancel
Showing results for 
Search instead for 
Did you mean: 

MPU nteraction with a Endpointrest through wifi

SigmaPrime
Senior

Hello everyone,

I received my STM32MP157C-DK2 device and I built a Buildroot-image and flashed it successfully.

I am new to STM32 and to the IoT field so perhaps you can orient me and tell me which Programs I need to do so. I want to write a "hello_world" program that sends hello_world every x-seconds to an Endpoint-rest through Wifi.

Is it possible to only use Linux Bash/Shell interface to execute my Program? (I am familiar to these) and like I said I am only testing some features here like the ability of the DK2 to interact with Endpoint-rests.

Thank you all and have a nice day.

22 REPLIES 22
Olivier GALLIEN
ST Employee

Hi @SigmaPrime​ ,

If you are new to STM32MP1 I recommend you to go through our wiki.

You can find some resource regarding Wifi setup.

https://wiki.st.com/stm32mpu/wiki/How_to_setup_wifi_connection

https://wiki.st.com/stm32mpu/wiki/How_to_configure_a_wlan_interface_on_hotspot_mode

None related to endpoint-rest but maybe it can give you better view of MP1.

Else please be aware that we are only supporting Yocto based solution, not Buildroot.

For this we can recommend some partners.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you for your response

Actually I am having trouble dealing with Buildroot and Wi-Fi connection. The patches installed and given by Buildroot are not actual.

For someone newly introduced to buildroot I made some research and had some basic knowledge but some specific things like installing new patches and configuring drivers are not detailed and I try since 1 week to connect my board to Wi-Fi.

This is what I get every time :

Successfully initialized wpa_supplicant

nl80211: 'nl80211' generic netlink not found

Failed to initialize driver 'nl80211'

wlan0: Unsupported driver 'nl80211'

FAIL

When I lshw I get: 

lshw -class network *

-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

My kernel and system Configurations are more than correct and I enable all needed features.

Fee
Senior

Hi,

for the On-Chip wifi module of the STM32MP157c-dk2 you must enable the broadcom FullMAC WLAN driver and its SDIO bus interface (the brcmfmac module is used) in the linux-menuconfig.

In buildroot you have to activate the 'Broadcom BRCM bcm43xx' firmware at Target packages -> Hardware handling -> Firmware -> linux firmware -> Wifi firmware. Also you will need a .txt file to load the firmware. I got this one from the ST Starter Package cause it is not available in the buildroot package. Just search for 'brcmfmac43430-sdio.txt'. I tried this one (https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43430-sdio.txt) too wich worked as well, I did not test it though. You will see in the dmesg which .txt file is needed.

SigmaPrime
Senior

As you can see everything is on .. But how do I upload the .txt file ? do I have to do that before or after the build. If after then were (in which folder)

0693W000005AuFMQA0.png0693W000005AuFHQA0.png 

It goes to /lib/firmware/brcm on your target after building (you can use the buildroot overlay function for example). Buildroot will also copy the bcrm firmware to that folder, be sure to enable it, too.

Blocked ... I did everything but still nothing

Activated Broadcom FullMAC WLAN driver as module ( <M>)

Activated SDIO bus interface support for FullMAC driver

Activated wpa_supplicant dhcp etc ...

for the driver I

1- git clone git://github.com/murata-wireless/cyw-fmac-fw.git;protocol=https;nobranch=1;name=murata;destsuffix=murata

2- git checkout -b 8d87950bfad28c65926695b7357bd8995b60016a

3- got the .txt file from: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt?fbclid=IwAR1KtSo4XzA8mV_tbL9ERkdBMduSwtbBed66_5tMDpq5D_wpFy69FSClC_s

4 - my brcm directory on my target device (STM32MP157C-DK2) looks like in the photo I uploaded

0693W000005B06LQAS.pngI don't know what is not working here.

I can share my interfaces and wpa_supplicant files. Maybe there is a fault there but I don't thing so.

Here is also my Kernel and Linux configuration

Hi,

you dont have to download any driver manually. The linux driver configuration seems fine to me.

The wifi chip needs a firmware to run too. That one you will get by activating it in the buildroot menuconfig. I assume you did that according to how your bcrm folder looks.

Waht does

ifconfig -a

say? Can you see the wlan0 device there? If you can see it there it is only a wpa_supplicant / interfaces configuration. Didn't test it that far but you will find a lot of examples and information in the web. I know of two people that got it working though.

SigmaPrime
Senior

yeah but I did everything right. the download part was a supplement.

ifconfig -a does not output wlan0

I only have sit0 lo and eth0

Some detail I may want to share is that in linux-menuconfig under

> Networking support > Wireless I get a "-*-" in front of "Wireless" and not a [*]