2017-10-24 04:06 AM
SPWF04 SPI SOCKET SERVER
I have the SPWF04SA configured as an STA and connected to a Wifi AT.
I have an udp socket server opened in the SPWF04, for that I have used the following sentence:
AT+S.SOCKDON=3333,u mapped to spi as following: (Ex:3333)
020009470204333333330175
Then I send data from my PC to the SPWF04 so I receive the WIND message of incomming data
021A370B00303A303A31343A31340D0A //0:0:14:14 I receive 14 data
So I ask for data received using the corresponding message
AT+S.SOCKDR=0,0,0 //sockid=0 cliendid=0 numbytes=0 what means receive all data
02000A4B03010001000100
And then I receive data correctly
803AFE070031343A31310D0A //:14:14
0230030E004646464646464646303030313046 //03 Means data spi answer and 4646464646464646303030313046
The problem I have is when trying to send larger packets Ex:254 bytes.
It seens to be working as I received the 0x37 (WIND incomming data)message and I ask for data using 0x4B command.
Sometimes I received all data correctly in one answwer and others in two answer that it is ok.
But I have found that sometimes the answer is received in more SPI messages
>02000A4B03010100010003000000
<803AFE09003133343A3133340D0A0A0A0A0A0A0A Size =31 33 34 -> 134 bytes
<02300378004646……some data received 0x78=120bytes
<0230030E004646……more data received 0x0E=14 bytes Total=134 bytes OK
<023A000000000000 finish
The problem is that sometimes the module stops sending SPI messages for a while and later starts sending again
<0201100702003130
<02100116003137303231362d66643339… 170216-fd39c59-SPWF04S
<02100D08005350574630345341 SPWF04SA
It continues sendind SPI messages and it makes the handshake correctly, link up again so when I open the socket it starts communicating correctly.
The problem is that this happens quite often so I would like to know if its depends on the size of packets or may be when packets are sent too often.. just to try to avoid it
I haver read as well that there is a beta fw that may fix some bugs.... It’s the fw 1.1 already available? I would like to upgrade it if possible. I have been looking at the web but I haven’t found it.
I have also modified the following configuration variables: ip_sock_memsize ->2 and ip_sock_threshold ->50 and also ->90 But it didn't work any better...
Thanks in advance.