cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting socket data pending indication (+WIND:55)

sauli
Associate
Posted on July 01, 2016 at 11:38

Working with the SPWF01SA.11 module.  In an attempt to make my program event based, I was trying to utilize the indications for reading data received from a socket.  But I am not getting the +WIND:55 indication although data is received:

1. Open a socket to a MQTT server (test.mosquitto.org) -> OK

2. Send a MQTT CONNECT packet -> OK

3. Wait for +WIND:55:Pending Data

10 seconds goes by with nothing at all received from the WiFi module

4. Close the socket -> ERROR: Pending data

5. Query pending data -> DATALEN: 4

6. Read four bytes -> Get exactly the response I was waiting for.

Same as a communication log:

AT+S.SOCKON=test.mosquitto.org,1883,t

 ID: 00

OK

AT+S.SOCKW=01,36

Send 36 bytes of socket data.

OK

AT+S.SOCKC=00

ERROR: Pending data

AT+S.SOCKQ=00

 DATALEN: 4

OK

AT+S.SOCKR=00,4

Read 4 bytes of socket data

OK

Why am I not getting the indication?  None of the indications is disabled.

The version date of the module was 150410, and since the ST website has a newer version 160129, I decided to update. The batch file in the update packet - after inputting the .bin file path and the serial port number - takes about an eyeblink to run to 'Press a key to exit...'. It gives no error messages, but obviously does not update the firmware either.

It does print a web address which lead me to Sourceforge stm32flash page.  I downloaded that program and ran it instead of 1203flash.exe used by the batch file. I used exactly the same command line arguments, and this time the binary file was programmed to the module.  Only, now the module is dead. How do I recover it?

The new version would be useful also because it supports error numbering in the ERROR response. Parsing the error code form the description string is unnecessarily tedious.

3 REPLIES 3
Posted on July 04, 2016 at 11:14

If you need the indication, turn the indication on.

AT+S.SOCKON=test.mosquitto.org,1883,t,ind

About the stm32flash, I think you deleted the bootloader. Module is lost. Contact your direct support/distributor to get a recover image...

sauli
Associate
Posted on July 04, 2016 at 13:41

Ahh, I somehow managed to miss that ind. I didn't realize that you can control it by socket.

About the recovery image.. Should I program it with stm32flash? And why didn't 1203flash work?  Do I ever again dare to try update the module firmware?

Posted on July 05, 2016 at 13:43

You can use stm32flash (the one given by ST, not the standard one from Google code) or STM32 Flash Loader Demonstrator. Contact ST to recover dead module