cancel
Showing results for 
Search instead for 
Did you mean: 

IDW01M1 Wifi Sample Codes for STM32F411RE

Robert Kwan
Associate II
Posted on April 26, 2017 at 07:24

Hello!

I recently bought the IDW01M1 WiFi expansion board 

and I am trying to have it working with the STM32F411RE.

However, from the examples in en.x-cube-wifi1_firmware.zip,

I can find the .bin file for STM32F401RE-Nucleo only

and so I tried to flash this WiFi_VCOM .bin to the STM32F411RE board.

I can see LED1 is green, so power is ok.

No other LED On, so module is ok?!

When I use Tera Term, I don't see any output and when I send 'AT', no 'OK' either.

So my question is that  F401RE .bin image cannot work directly on F411RE board please?!

Since I am still a newbie to this WiFi module, I am not sure if it will be easy to recompile the sample application for F411RE then?!

Any suggestion / comment is welcome.

Thanks & Best Regards,

Robert

#stm32f411re-wifi-idw01m1
41 REPLIES 41
Mridupawan Das
Associate II
Posted on April 26, 2017 at 10:13

Hi,

by default the bin's are built for X-NUCLEO-IDw04A1.

you need to re-build for IDW01M1.

Also F411RE is not supported by default and you need to build with F411RE drivers idelly.

Posted on April 26, 2017 at 19:54

Thanks for the info, Mridupawan!

Then I will have a lot to figure out...

1. Which parameter/s should I modify to make it built for X-NUCLEO-IDW01M1 instead please?

2. My original F411RE environment is just GCC-based command line with Cygwin

   and so I don't know how easy to incorporate the sample folder structure.

   I think /EWARM sub-folder in sample app is for IAR ARM IDE, /MDK-AM sub-folder is for Keil ARM IDE

   but no idea on what /SW4STM32 sub-folder is for which IDE?!

   And all of these have only /STM32F401RE-Nucleo reference folder but no STM32F411RE-Nucleo reference folder, so I am not sure what should be modified?!

Any suggestion please?

Thanks & Best Regards,

Robert

Posted on April 27, 2017 at 00:55

Hello!

I have found out that

https://developer.mbed.org/teams/ST/code/HelloWorld_IDW01M1v2/

would work if I import their sample code to the online mbed compiler to compile for F411RE.

It will just work fine when I flash the .bin from the online mbed compiled output.

However, if I try to export the codes for toolchain: Make-GCC-ARM for NUCLEO-F411RE

as in

https://developer.mbed.org/teams/ST/code/HelloWorld_IDW01M1v2/export

it would not work at all,

because only the *.lib will be exported but no related *.h to use with the *.lib at all.

And I have no idea if those *.lib would work for F411RE or not at all?!

Therefore, I used

https://developer.mbed.org/teams/ST/code/HelloWorld_IDW01M1v2/compile

to trace out all the files that got compiled by the online mbed compiler and then downloaded all the related *.cpp/*.h to mimick the same.

However, it still doesn't work well as I still have the following compile error which I cannot figure out at all?!

0690X00000606nYQAQ.pngI

I don't know why the codes in SPWFSA01.cpp would cause this invalid conversion from 'int' to 'const char*' error...

   SPWFSA01::SPWFSA01(PinName tx, PinName rx, PinName reset, PinName wakeup, bool debug)

    : _serial(tx, rx, 1024), _parser(_serial),

      _reset(reset, PIN_OUTPUT, PullNone, 1),

   _wakeup(wakeup, PIN_OUTPUT, PullNone, 0),

    dbg_on(debug)  <=== Problem HERE?!

{

    _serial.baud(115200);  // LICIO  FIXME increase the speed

    _parser.debugOn(debug);

}

Any idea please?!

Thanks & Best Regards,

Robert

Posted on April 28, 2017 at 00:53

I find that even if the

/external-link.jspa?url=https%3A%2F%2Fdeveloper.mbed.org%2Fteams%2FST%2Fcode%2FHelloWorld_IDW01M1v2%2F

would work with my F411RE board.

The reference code does not support any AP mode setting,

so eventually it won't meet what I want to do.

Therefore, I investigated more on how to make the XCUBE IDW01M1 Wifi Sample Codes working for STM32F411RE...

1. I found that the wifi_conf.h has the SPW04 setting which Mridupawan mentioned before.

And so I modified it to be for SPWF01

#ifdef USE_STM32F4XX_NUCLEO

#define CONSOLE_UART_ENABLED

#define SPWF01 => for X-NUCLEO-IDW01M1?!

//#define SPWF04 => for X-NUCLEO-IDw04A1?!

#endif

This is not mentioned in any document and so not obvious for people who would like to use though.

2. Then I mimicked the \STM32F401RE-Nucleo folder to create a new \STM32F411RE-Nucleo folder

and found another startup_stm32f411xe.s file but just renamed stm32f401xe_flash.icf to stm32f11xe_flash.icf.

Also, I modified all the STM32F401 variables to STM32F11 in the Project.* files

3. And then when I downloaded the IAR IDE to rebuild, it would compile into \STM32F411RE-Nucleo\Exe folder ok with Project.bin.

4. After I reflashed this Project.bin to my F411RE board, I would get:-

0690X00000606srQAA.png

It looks ok for initialization

but when I type ''AT'', no ''OK'' response. Type ''AT+S.STS'', no response at all.

Therefore, something is still wrong inside

while (1)

{

wifi_vcom();

}

}

in main.c

?!

However, I have no more clue on how to debug from here anymore!

Please help if any suggestion.

Thanks & Best Regards,

Robert

Posted on April 28, 2017 at 15:34

Hi Robert,

The documentation currently is a bit erratic, so please bear with us!

To build for F411 should not be a problem since the F401 I think shares the same drivers (as they are of the same family).

What you probably need are the correct files/settings in your build environment.

E.g. If you are using IAR for compilation, you need to change the device settings to the correct device (F411-RE).

Options->Settings->General->etc.

You said you have changed the linker script which should be fine.

I would be able to help you more with specific advice once I try it myself and if you give me some time.

thanks,

Mridu

Robert Kwan
Associate II
Posted on April 29, 2017 at 01:34

Hello Mridu,

Thanks for your message.

It's really frustrating and disappointing after trying so many different ways but still not able to get it working at all!

In fact, I was hoping that this Wifi module is more powerful and easy to use

as I already can use the ESP8266 NodeMCU ok.

I modified the IAR Project General Setting like this:-

0690X00000606rRQAQ.png

but not sure if any other details I may have missed?!

Looking forward to receiving your update soon.  Thanks.

On the other hand, I even tried to compile with the System Workbench but I found it difficult to get the project files set up correctly and so I gave up.

I will try to install Keil MDK IDE to see if it would make any difference later if I have time.

I know that my hardware should be ok because I tried the mbed sample codes and it worked but it doesn't have the mini AP capability I need unfortunately...

Thanks & Best Regards,

Robert

Posted on April 29, 2017 at 12:17

Hi Robert,

here is a quick way to port to F411RE which I tried.(of which you have already done some steps)

Let's take the example of the WiFi_VCOM Application and toolset IAR (EWARM folder).

1. Inside EWARM, copy the 'STM32F401RE-Nucleo' and rename to 'STM32F411RE-Nucleo'

2. Copy two files: 'startup_stm32f411xe.s' and 'stm32f411xe_flash.icf' inside above created folder (You can find these files in examples of STM32Cube_FW_F4_Vx.yy.0 driver applications downloaded from the st website)

3. Open the project.eww and then open Project Settings

4. In 'General Options' tab, select correct device name: 'ST STM32F411RE'

5. In 'C/C++ Compiler->Preprocessor' tab, change 'Defined Symbols:' value: STM32F410xE to STM32F411xE

6. In 'Linker->Config' tab, select correct linker script file 'stm32f411xe_flash.icf' (already copied to home directory in previous step)

7. In workspace project file view: Example->EWARM-> select correct startup file: '

startup_stm32f411xe.s

' (already copied in home directory in previous step)

8. Build Project-> should be clean without errors.

Run project and check.

Type in console (tera-term). By default, module echo is OFF, so you will not see what you type unless you enable echo on your terminal.

Type AT and press enter and you should see OK as response on the terminal.

Test other AT commands.(e.g. AT+S.STS, AT+S.GCFG=...etc.)

Above steps worked for me.

I also checked Client_Socket example, which worked on the F411RE as well.

Hope I did not miss any step.

Let us know.

regards,

Mridu 

Robert Kwan
Associate II
Posted on May 01, 2017 at 20:37

Hi Mridu,

Thanks for your information.

I have already done most of your steps before.

The only difference was the .icf which I didn't know where to find and so I just renamed the F401 to F4

Now I got the right one as you pointed out.

However, my result is still same as before.

No response after typing AT.

I wonder if there is any tool or HW version issue as I can see that some other users are having similar issues

but no problem from your side.

I am using:-

And I noticed that the LEDs on my IDW01M1 Wifimodule would have only the GREEN light ON from all these sample app here. Is this correct?!

Because when I ran the mbed example, not only the GREEN LED but also the YELLOW LED would be ON and then I could see the RED and BLUE ones flashed at the beginning (maybe during reflash or init?!)

And after the reflash, the GREEN LD2 on F411RE board will also flashes.

All these are quite different from the XCUBE IDW01M1 Wifi Sample Codes.

Is the YELLOW LED supposed to be ON after correct Wifi module initialization even for XCube Wifi Sample Codes please?!

I don't have the scope to probe the GPIOs yet as I could see that you and others are helping Kerry in the other thread

but I think that our problems are similar. And so that's why if our IDW01M1 Wifimodules are newer Hardware version

than the ones you use now?!

Thanks & Best Regards,

Robert

Robert Kwan
Associate II
Posted on May 01, 2017 at 23:10

Hi Mridu,

Can you post your functional .bin for me to try please?!

Again, mine is with:-

#ifdef USE_STM32F4XX_NUCLEO 

#define CONSOLE_UART_ENABLED

#define SPWF01 => for X-NUCLEO-IDW01M1?!

//#define SPWF04 => for X-NUCLEO-IDw04A1?!

#endif

And I also tried to capture my setup photos for you to check here please.

0690X00000603oNQAQ.jpg0690X00000603oSQAQ.jpg

Thanks & Best Regards,

Robert