cancel
Showing results for 
Search instead for 
Did you mean: 

Yet another SPI SPWF04S problem

Posted on June 14, 2017 at 12:07

Hi all.

I'm having trouble connecting to AP with SPI mode. I tried to same network with putty and USB-to-UART cable and it connected fine (I only did ping over the connection, so not much). However with SPI it connects and drops it right away and repeats it forever.

Initializing SPWF04SA Interface..

>> Configuration Failure no 2 <-----i

nteresting, 'RAM cannot be mounted'

<<WIND 7, status 0

10

<<WIND 1, status 0

170216-fd39c59-SPWF04S

<<WIND 13, status 0

SPWF04SA

<<WIND 65, status 0

1

<<WIND 0, status 0

<<WIND 3, status 0

20

<<WIND 32, status 3

>>AT

<<OK

>>AT

<<OK

>>AT

<<WIND 49, status 2

0

<<OK

>>AT

<<OK

>>AT

<<OK

<<WIND 32, status 3

wifi started and ready...

>>AT

<<corrupted OK packet!!

<<OK

End of Initialization..

>>connecting to AP... TPNY, xxxxxxxxxx, 2

>>AT

<<corrupted OK packet!!

<<OK

>>AT

<<OK

>>AT

<<OK

>>AT

<<OK

>>AT

<<OK

>>AT

<<OK

<<WIND 32, status 3

<<WIND 21, status 4

<<WIND 35, status 4

00

<<WIND 19, status 7

98:DE:D0:EA:4C:62

<<WIND 25, status 7

TPNY

<<WIND 41, status 7

2

<<WIND 21, status 4

<<WIND 35, status 4

00

<<WIND 21, status 4

<<WIND 35, status 4

00

<<WIND 19, status 7

98:DE:D0:EA:4C:62 (after this it loops back line <<WIND 25 status 7)

The RAM mount thing is a littlebit worrying.

Othervise it seems to connect-disconnect-connect forever.

My setup is STM32F469NI, 1Mhz (currently) SPI and X-Nucleo-IDW04A1 board.

#spwf04sa

Note: this post was migrated and contained many threaded conversations, some content may be missing.
22 REPLIES 22
Posted on June 14, 2017 at 17:42

Ciao Matti,

there is something strage.

Configuration failures (WIND:7) with reason code < 10 are rare and 'blocking'. It means that if you get that error, module will not boot. I see here that module goes on...

What's the reason code for disconnection?

Try to clean module's variables. AT&F (or GPIO0 high at boot), and start from scratch

j

Posted on June 15, 2017 at 08:41

Hi Gerardo.

Ok, booted the module with jumper in the JP2 and then rebooted it without it. No effect on the module. I'll see what happens if i put the firmware again to module altough it's the same version as the one currently in it.

Don't know about the reason, but first time it seems that there's :

<<WIND 49, status 2 <---WPA terminated

After that it's just:

<<WIND 41, status 7 <----Wifi disassosiation, don't know about the status code.

2

-----------------

Regarding the driver package (

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-software/x-cube-wifi1.html

). When I download it the version is still 3.0.1 in both name and in version history document.
Posted on June 15, 2017 at 10:50

Ciao Matti,

- JP2 is boot pin. Use GPIO0 instead.

- just downloaded v3.0.2 from link above. It's ok in links, project name, release note, file content, etc.

Posted on June 15, 2017 at 11:49

Ciao.

1. I updated the firmware (same 1.0.0 as before) with USB-to-UART bridge. No change.

2. I set the GPIO0 to 3v from the boot and tried also toggling the line high for 500ms before wifi init. No difference in behaviour.

3. The driver package still downloads as 3.0.1. Last version in the update history is V3.0.1 / 27-Mar-2017.

Posted on June 15, 2017 at 14:22

Ok. Now there's the correct version. Quite lot of delta to 3.0.2. Altough it wouldn't hurt if you guys would update the file headers also .

The latest version now manages not to drop the connection. However socket write failed with error:

<<WIND 84, status 10.

EDIT: not so fast I'm afraid. First time it connected, but now it either freezes in the boot or just doesn't connect at all. Same RAM error still lingers.

Posted on June 15, 2017 at 15:23

Few questions regarding the wifi_connect().

1. Why the radio is turned off middle of configuration? With USB-UART it doesn't allow changing other than SSID with radio on.

2. Why there isn't AT&W after the configuration? Is it because the wifi_init() puts the module in idle by default?

Mridupawan Das
Associate II
Posted on June 16, 2017 at 08:37

websocket, mqtt and tftp implementation are not complete, so please don't try that. we hope to support it in the next release cycle. Usage logic for sockets are same. you seem to be using secure socket.

Beware that only mutual and one-way auth are supported in SPWF04. Anonymous mode won't work. So you must supply certificates.

Posted on June 16, 2017 at 08:05

Hi Matti,

can you please try this connect function just for experiment.

regards,

Mridu

________________

Attachments :

connect_func.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyZ2&d=%2Fa%2F0X0000000bA5%2F.eZ2FzqquBlX7iUx_LjVaDAHdZYG60FZCPfP95JZK3Q&asPdf=false
Mridupawan Das
Associate II
Posted on June 16, 2017 at 10:14

Hi Matti,

yes, SPWF01 supports anonymous, one-way and mutual auth. SPWF04 only supports one-way and mutual auth. So yes that has changed.

regarding usage of certificates, there is no immediate instructions but I will check if we can direct you to some docs.

regards,

Mridu