cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between Stm32F7 and SPWF01S module

Nandy K
Associate II
Posted on October 01, 2015 at 12:44

Hai,

I have configured SPWF01S wifi module as miniAP and

I have connected STM32F7-Disco with SPWF01S through UART.

I am sending the command AT+S.SOCKD = <port number> to the wifi module and it is ready for listening.

Now I have connected my  mac to the wifi module and I am sending a string to it.

I would like to access the buffer where this string will be stored on the wifi module.

Question.

1. where the strings will be stored in the SPWF01S module during Transmit and Receive.

2. How I can access it ?

#spwf01s-wifi
8 REPLIES 8
Posted on October 01, 2015 at 13:08

Hi,

I'll try to explain in a short description what to do:

- using socket clients, you can access receive buffer of the module by SOCKR command;

- using socket server, there are no commands to be used. We call it ''DataMode'', opposite to ''CommandMode''.

On incoming client connection, module automatically switches from CommandMode to DataMode. This means that every OverTheAir-received byte is printed on the UART, and every UART-received byte is sent to remote client.

You can however switch from CommandMode to DataMode by AT-command, and from DataMode to CommandMode by an escape sequence (configurable string variable).

I suggest to take a look at HandsOn.pdf document. There are dedicated tutorials on SOCKD.

Hope to got your question.

Regards

jerry

Nandy K
Associate II
Posted on October 01, 2015 at 14:45

Hi Thanks for your quick reply,

I got it what you are explaining.

I would like it explain it better ,

for example I have connected the(STM32F7 + SPWF01S) with my ipad.

If I send a string HAI from my ipad it should reach STM32F MCU via wifi module.

If my MCU receives HAI it should respond HELLO to ipad via wifi module.

To do this I need to store the string HAI in a buffer of my MCU how i can do this?

when I send an AT command AT+S.SOCKR the received string is displayed on the hyper terminal but i want it in a buffer.

Posted on October 01, 2015 at 16:14

Do you want direct access to internal module's RAM?

Nandy K
Associate II
Posted on October 01, 2015 at 16:38

Yes you are right.

Posted on October 01, 2015 at 17:12

No, I'm sorry.

Nandy K
Associate II
Posted on October 01, 2015 at 17:18

Is it not possible ? 

Do you have any idea like how to store the string in a buffer on my MCU after receiving it using SOCKR

Posted on October 01, 2015 at 20:42

As a general rule:

- implement an UART driver based on DMA circular buffer and USART idle interrupt;

- implement a parser function, able to recognize ''+WIND:'' strings, and detect the right indicator number. Usually, on every received indication (number) can be associated an action to be performed on wifi module;

- run the parser on some specific interrupts: DMA buffer half/full and/or USART idle. My suggestion is to use an OS inside the external MCU. Block the parser on a semaphore, and unblock the semaphore on the interrupts above.

However, you can use the proper forum to ask for UART management on STM32F7. Community is very active on STM32 MCUs.

Hope again to got your point...

j

Nandy K
Associate II
Posted on October 02, 2015 at 14:34

ok fine thanks a lot for your information