cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a CubeIDE project with IOC file that enables WiFi on B-L475E-IOT01A2?

PST
Associate II

Hi,

I would like to create a new CubeIDE project with a IOC file (from scratch) for B-L475E-IOT01A2 that enables WiFi. I know that there are working examples (for example WiFi_HTTP_Server that works fine) but these projects do not have IOC files. I have tried to create such a new project adding es_wifi source files but id doesn't work. Probably the SPI bus should be set up in the right way together with clock configurations. Do you have any suggestions or point me to any working CubeIDE projects with IOC files?

Best

PST

1 ACCEPTED SOLUTION

Accepted Solutions
Skane
Associate II

Hi

I manage to build a project using B-L4S5I-IOT01 kit which include the Wifi chip onboard, this is a basic TCP communication https://github.com/shadowkane/STWorld/tree/master/B-L4S5-IOT01A_SimpleTCPClient. you can have a look, i have included a demonstration on how to import files and build your project. good luck

View solution in original post

6 REPLIES 6
Imen.D
ST Employee

Hello @PST​,

I would propose for you to import available WiFi example from SW4STM32 to STM32CubeIDE:

\Projects\B-L475E-IOT01A\Applications\WiFi\WiFi_HTTP_Server\SW4STM32\

For that, you have to follow the User Manual UM2579: Migration guide from System Workbench to STM32CubeIDE.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
PST
Associate II

Thank you. I did it when I wanted to modify the working example. Unfortunately, during this process, the IOC file is not created. Is it possible to create the IOC for such imported project?

Best

PST

Skane
Associate II

Hi @PST​ 

for the last couple days i was trying to do the same thing and unfortunately i run into the same problem,

i tried the Wifi_HTTP example, and another example from x_cube_iota1 repository (example name is "IOTA-Client), the example itself is working, Wifi and the client side are fine, but when i try to import the library to my project (project from scratch) at first i had problem to compile the project but after some modification i manage to compile it but the problem is i have problem in the WIFI_RESET_MODULE() function, the problem come from HAL_delay which is come from HAL_GetTick(), infinit loop and i don't know why, but when i lower the delay period from 500 to 100 the function works but i cannot set up the network interface structure and this is the error mesg i get in terminal

this is how i imported the library (or at least the files i need since i only want to connect to router as first step):

+ download the x-cube-iota1 package

+ import from "x-cube-iota1\Middlewares\ST\STM32_Connect_Library" (try to keep the same architecture)

  • core
  • Includes
  • netif
  • services

+ import from "x-cube-iota1\Projects\B-L4S5I-IOT01A\Applications\IOTA-Client" the missing file i need:

  • src/net_conf.c
  • inc/net_conf.h

+ import from "x-cube-iota1\Drivers", i important what i need only

  • from "BSP\Components" common folder and es_wifi folder and hts221 folder (you can import other drivers if you need them)
  • from "BSP\B-L475E-IOT01" imported missing files only

in the project properities->c/c++ general->paths and symbols:

  • for the include i added all folders that hold the header files like (STM32_Connect_Library/Includes, BSP/Components/es_wifi, etc)
  • in source location i added : STM32_Connect_Library) i need to compile .c files in this folder to manage to compile the main file and generate the executable file

with those modification i manage to import the library (the function i need) but the program didn't run well for me. as i said, stuck in hal_getTick() and when i lower the delay, i get this error msg: "ERROR: ../Middlewares/ST/STM32_Connect_Library/core/net_core.c:228 Interface cannot be initialized. net_if_init

Can not set-up the network interface structure"

if you already manage to import the library, can you share the solution, otherwise feel free to try my solution and maybe it will work for you,

i'm waiting for you answer

best regards

PST
Associate II

Thank you. I will follow your advice and let you know.

Best

PST

Skane
Associate II

Hi

I manage to build a project using B-L4S5I-IOT01 kit which include the Wifi chip onboard, this is a basic TCP communication https://github.com/shadowkane/STWorld/tree/master/B-L4S5-IOT01A_SimpleTCPClient. you can have a look, i have included a demonstration on how to import files and build your project. good luck

PST
Associate II

Thank you. Your solution works on B-L4S5I-IOT01 and B-L475E-IOT01A2. Best regards, PST