cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] SPWF01SA switch from Data to Command mode

hamper
Associate II
Posted on March 09, 2015 at 06:13

Hello!

I'm configure my SPWF01SA.11 module as udp server:

>>>at+s.sockd=8899,u

 

OK

Then send from PC some data. Module response me

+WIND:61:Incoming Socket Client:192.168.0.100

 

 

 

+WIND:60:Now in Data Mode

 

<sended data>

How I can return module back to Command Mode?

I'm try send at+s. escape command via wifi, via terminal, in upper/low case - no effect.

[UPDT][Solved]

Sorry! at+s. must be sending via UART without any delay between each char.
4 REPLIES 4
Posted on March 09, 2015 at 08:54

Hi Eugene,

you can, if needed, also change default escape sequence (var ''escape_seq'', max 7 chars in length) and default delay (var ''ip_sockd_timeout'', 5 to 250 msec)

Enjoy!

jerry

hamper
Associate II
Posted on March 10, 2015 at 10:27

Found it necessary to make the delay after the esc-seq has been sent to the port.

The documentation does not describe the amount of delay. 700ms - that's what I give a positive result.

However, if at this time the data arrived, the module remains in the data mode.

Now I have is not very elegant design:

- Submitting esc-seq

- Waiting for 700ms. During this time, you should see a message (+WIND) about the transition to the command mode.

- Turning off the socket (at+s.sockd=0)

- Use the command mode

- Turn on the socket (at+s.sockd=<port>,<proto>)

Very unpleasant moment - if you frequently switch between modes, the module is dumped in a hard fault.

Hope this helps someone.

Posted on March 10, 2015 at 15:10

Eugene,

first of all, which version are you using? I know there are some problems while opening and closing socket server in release 3.3.x. This could explain hardfault you are facing.

All of these are currently solved into new FW release (3.4) planned within the end of March. Please contact your local ST support for FW upgrade.

Second point. There is not (700ms?) delay into module FW. The only delay is related to sockd_timeout. This is the time needed by internal state machine to understand that an escape sequence was detected.

Let me know how I can help you.

What's your scenario?

ps: from FW3.4, throughput on socket server has been highly boosted.

hamper
Associate II
Posted on March 11, 2015 at 02:25

Hello again, Jerry!

 

 

>>> first of all, which version are you using? I know there are some problems while opening and closing socket server in release 3.3.x.

 

+WIND:1:Poweron (141106-0950875-SPWF01S)

>>> All of these are currently solved into new FW release (3.4) planned within the end of March.

 

Very! Very good news!

>>> What's your scenario?

It is a bridge between WiFi and ZigBee network for mobile devices. Upon request, the user has to scan the next WiFi access point and switch to the specified. And if it is necessary to work in the MiniAP mode.

>>> ps: from FW3.4, throughput on socket server has been highly boosted.

 

With the greatest looking forward to this revision! )))

PS: By The Way! Jerry! Please tell me what MCU can replace the NRND STM32W108 to work with ZigBee network? Thanks for your answers!