2017-11-21 02:46 AM
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.Solved! Go to Solution.
2017-11-22 08:40 AM
'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.
2017-11-21 10:39 AM
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...
2017-11-22 01:07 AM
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
2017-11-22 08:40 AM
'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.
2017-11-23 03:57 AM
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?
2017-11-27 02:40 AM
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)
2017-11-27 05:22 AM
I am using a MSP430F2618 from Texas Instrument (
) 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.2017-11-28 03:35 AM
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.
2017-11-28 07:56 AM
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:
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