cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to make a transparent bridge with SPWF04?

Pascal Zosso
Associate II
Posted on November 21, 2017 at 11:46

Hello,

I know my question is simple but the answer, I think, is not as simple.

Here is my use case:

I would like to exchange a small amount of data between a PC (client) and a remote device (server) quickly and often

The

PC

role is to

- open a TCP connection to the server socket

- start and stop application exchange

- process the data.

The

remote device

role is to

- provide Wifi AP

- listento a socket server

- execute the command send by the PC

- send data periodically

I'm okay to create a server socket, use SPI protocole, and send data between them BUT I find very annoying the WIND notifications system to know there is pending data.

Is it possible to disable the WIND notifications (with the WIND mask) and to use the IRQ line to signal only when application data have been received on the socket server?

My dream would be : once the initialisation is over, to disable the notification and only use write and read socket command to manage the application data (a transparent bridge mode as I said)

Best regards,

#transparent-bridge #spwf04 #socket

Note: this post was migrated and contained many threaded conversations, some content may be missing.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on November 22, 2017 at 16:40

'Data Mode' is not part of SPWF04 (since multiple clients are now allowed), and SPI will not assert nHostINT if WINDs are disabled. Disable unuseful WINDs, and only keep the ones you need.

WIND:55 is needed if you don't want to continuously poll (AT+S.SOCKQ) for incoming data.

View solution in original post

8 REPLIES 8
Posted on November 21, 2017 at 19:39

Take a look at 'Data Mode' over SPWF01Sx modules. Once socket server is open, and client is in, there is a simple p2p connection without AT commands and/or WIND notifications. But:

- no SPI interface (only AT commands over UART)

- only 1 server, supporting only 1 client

- others...

Posted on November 22, 2017 at 09:07

Hello,

Data mode of SPWF01Sx is exactly the same thing I would like to do with the SPWF04SA because I need to the speed of the SPI for my application, UART is too slow. I would like to reduce WIND notifications traffic as much as possible to not interfere with the application process.

My questions mainly concerns the behavior of the SPI when the 

'Pending Data'

WIND notifications are disabled:

Does the SPWF04 assert the IRQ line to signal there is data in the socket server?

What behavior should I expect when application data are exchange?

Best regards

Posted on November 22, 2017 at 16:40

'Data Mode' is not part of SPWF04 (since multiple clients are now allowed), and SPI will not assert nHostINT if WINDs are disabled. Disable unuseful WINDs, and only keep the ones you need.

WIND:55 is needed if you don't want to continuously poll (AT+S.SOCKQ) for incoming data.

Posted on November 23, 2017 at 11:57

Okay, I see how I am supposed to disable the WIND notifications, but the device does not apply the new config.

I tried with the first 32 WINDS:

1) AT+S.SCFG with 'console_wind_off_low' 0xFFFFFFFF

2) 

AT+S.WCFG

3) AT+S.RESET

Then the module doesn't interact anymore with the host. The LED of GPIO 10 (module running) stop blinking and stay ON.

Should I do something more after the WIND 2 'Reset' notification?

Posted on November 27, 2017 at 10:40

Are you using STM32CubeExpansion_WIFI1 as external host application? Because, in this case, it expects some WINDs to start using the module (e.g. WIND:0)

Posted on November 27, 2017 at 13:22

I am using a MSP430F2618 from Texas Instrument (

http://www.ti.com/product/MSP430F2618

) as host MCU. The SPWF04SA is mounted on a 4 layers PCB with the MCU and some others chips. I can send you a schematic if it can help.
Posted on November 28, 2017 at 11:35

I don't know how to help you using that micro. I'm sorry.

Typical WINDs log contains:

+WIND:1:Poweron:xxxxxx-xxxxxxx-SPWF04S

+WIND:13:Copyright (c) 2012-2017 STMicroelectronics, Inc. All rights Reserved:SPWF04Sx

+WIND:0:Console active

+WIND:32:WiFi Hardware Started

Since you masked 0 to 31 WINDs, you should receive the only WIND:32

After reset, blinking LED starts blinking (and then it stops), or never starts blinking? In the first case, console LED should be on (before WIND:0, even if masked) and than off (at WIND:0 time); in the second case, console LED never goes high. In the first case module will reboot because of watchdog; in the second case module never starts. In both cases, module stops because SPI master is not giving the clock after an nHostIRQ interrupt, or SPI master gives less clocks than required by module's SPI header.

Note: if you need to perform a factory reset (and restore wind_off_low value), you can do via HW. Put GPIO0 high at startup.

Posted on November 28, 2017 at 15:56

Don't worry for the micro, I got it

I made you the step-by-step initialisation as implemented in my program, including LEDs' states:

0690X00000608zLQAQ.png

The SPWF04SA no longer assert the nHostIRQ line. I tried with different value for console_wind_off_low such 0x20000000 but it is still the same behavior.

It seems, it is a problem with the Reset command. Do I use it correctly?

Thank you for your help, I really appreciate it