2015-09-25 04:41 AM
Hi,
Is there any reference AT-commands library written in C for SPWF01 modules? Googling didn't help. Target OS is FreeRTOS, but generic C library is acceptable. I know, I can write it using state machines etc. It will take time. I believe many of you have already implemented something related. I would also glad to hear any clues on generic AT-commands libraries which could be easily extended for this module. They should support at least following functionality: - data and command states - async status messages from modem Could also somebody answer two additional questions: - if there any status messages while module is in data mode? So, should I check RX buffer in data mode for something like ''+WIND:''? - what happens in case of closed socket on remote end or lost network? Will module return to command mode itself? Answer to these additional questions would help in implementing own state machine. Thank you. #spwf #spwf01s-wifi #spwf012015-09-28 07:43 AM
Hi,
About additional questions:1 - When module is into DataMode, WINDs are not transmitted on UART; you should stay as long as possible in CommandMode, and switch into DataMode on incoming ''+WIND:64:Sockd Pending Data''2 - In both cases (TCP remote connection down and Network Lost), module automatically turns to command mode (notifying thet remote host has gone). In the second case, socket server is automatically closed also.Note: UDP connection down cannot be triggered by remote peers...Regardsjerry2015-09-29 02:37 AM
Hi,
I have an answer also for main question.By Y2015 end, STM32 C libraries to manage the Wi-Fi module will be available in the framework of STM32 Open Development Environment.
Thanksjerry2015-09-30 02:27 AM
So, does this generally mean we still have to check data in RX buffer and wait for a status message from module? What's the right way to get notified that module has returned to command mode because of network error and to change state of host state machine?
Is there any AT library preliminary drafts available? We have to have fully working product in earl December at latest. BR, Grigori2015-09-30 03:25 AM
2015-09-30 12:17 PM
Hi Grigori,
External host needs always to check rxbuffer to parse received async messages, called WINDs. On almost every received indication, an action is required. When network is lost module prints WINDs ''59:back to command mode'' and ''62:client gone'' (if in DataMode), and ''33:network lost''.If module is in command mode, WIND:33 is always preceeded by WIND:30 ''bss lost''.If you don't like parsing rxbuffer, there is an alternative HW way: check (e.g. by interrupt on external host) the GPIO13. It changes its status when module gets the IP address (GPIO low -> wifi up) and lost the network (GPIO high -> wifi down, or network lost).About the preliminary library, I'll try to get infos. I think the best way is to contact your local ST support/distributor.Hope to be helpfulThanksjerry2015-09-30 12:30 PM
Hi Mark,
about the issue with Chrome, I'd like to reproduce this problem. What should I do?Another info: did you already tried to reduce ip_wait_timeout config variable value?About flow control, it's ok. RTS and CTS lines allow up to 1Mbps without bytes loss on UART. It's really useful for socket server DataMode...Thanksjerry2015-10-01 12:01 AM
2015-10-01 12:18 AM
Hi Mark,
module request external host to stop sending by RTS line.RTS goes high (stop) when internal buffers are full.Using low baudrates, this usually never happens. To observe an RTS switch, you need to directly stream into DataMode, or call SOCKW in loop, etc...I assume you are using latest FW3.4.Ciaojerry2015-11-16 11:47 PM
Hi Jerry,
In the previous message, you inform that''By Y2015 end, STM32 C libraries to manage the Wi-Fi module will be available in the framework of STM32 Open Development Environment.''
Do you have any update on this?Please advise.Thank you.Benny