WIZnet Developer Forum

TCP server and UDP client enable

Dear all,

globaly my application is a web server. the Wizfi250 is configure to connect to an AP (so STA mode).
a TCP socket is open with the AT+SCON command
all web page are served as expected.

now, for broadcast purpose, an UDP client is open too. periodically, i send a broadcast message.
that work as expected most of time !..

to prepare my broadcast message, i do a AT+WSTAT=?.
so i wait some reply commands /info from the wizfi250.

during the wait, sometime, a message coming from the UDP socket is inserted inside the command reply !

when all right, my debbuger terminal show me :

WIZFI250_SendCMD : AT+WSTAT=?<CR>
      WIZFI250_WaitANSWER find : AT+WSTAT=?<CR>
      WIZFI250_WaitANSWER find : IF/SSID/IP-Addr/Gateway/MAC/TxPower(dBm)/RSSI(-dBm)<CR>
      WIZFI250_WaitANSWER find : STA/EKO2/192.168.0.220/192.168.0.1/00:08:DC:1E:92:E2/31/51<CR>
      WIZFI250_WaitOK : [OK] find<CR>
WIZFI250_SendCMD : AT+SSEND=1,,,119<CR>
      WIZFI250_WaitANSWER find : AT+SSEND=1,,,119<CR>
      WIZFI250_WaitANSWER find : [1,,,119]<CR>
      WIZFI250_WaitOK : [OK] find<CR>

when a problem occur, my debbuger terminal show me :

WIZFI250_SendCMD : AT+WSTAT=?<CR>
      WIZFI250_WaitANSWER find : AT+WSTAT=?<CR>
      WIZFI250_WaitANSWER find : IF/SSID/IP-Addr/Gateway/MAC/TxPower(dBm)/RSSI(-dBm)<CR>
      WIZFI250_WaitANSWER find : STA/EKO2/192.168.0.220/192.168.0.1{1,192.168.0.14,8967,120}*Á°ŠƒÀ<VT>
H#<BEL>a<EOT><FS><VT>
ë<CR>
<DC1>Time NOT SETwifly-EZX Ver 4.00.1, Apr 19WP-PANEL-SW89<BEL>a}<ACK>fhÔ<DC2>À¨<SO><CR>
      WaitOK RCV : /00:08:DC:1E:92:E2/31/48<CR>
      WIZFI250_WaitOK : [OK] find<CR>
WIZFI250_SendCMD : AT+SSEND=1,,,99<CR>
      WIZFI250_WaitANSWER find : AT+SSEND=1,,,99<CR>
      WIZFI250_WaitANSWER find : [1,,,99]<CR>
      WIZFI250_WaitOK : [OK] find<CR>

a DATA frame from the UDP socket ( socket number 1, from IP 192.168.0.14 which is another equipment on my LAN) is inserted in middle of the AT+WSTAT reply !!

for sure i’m carefully check my code … don’t see any problem to parse the different Wizf250 message …
so it is a bug from the Wizfi250 module himself ?.. firmware v 1.0.3.3

thanks for any help, regards
Phil

Hi phil31

If a Data frame and a reply are mixed…

First of all, would you test same situation on EVB board + PC Serial tool.

I guess it is because some data frame was not processed in the MCU before AT+WSTAT command had been processed.

Thanks

hello Daniel,

well it’s not easy to do these tests with the EVB. the problem occurs not often, but it’s highly repetitive.
each time i 've got a problem,maybe 1 each hour, this is the same DATA frame, in the same reply position :

all right : WIZFI250_WaitANSWER find : STA/EKO2/192.168.0.220/192.168.0.1/00:08:DC:1E:92:E2/31/51
problem : WIZFI250_WaitANSWER find : STA/EKO2/192.168.0.220/192.168.0.1{1,192.168.0.14,8967,120}*Á°ŠƒÀ …

the DATA frame arrive in same position, just after the GW ip from the WSTAT command !

if that was some DATA which arrive just before i send the WSTAT command, why i see it in a middle of the command reply !?
and not just after send the WSTAT (before the echoed command), of after reply of the WSTAT command ?..
or even a single frame…
why it is every time in the middle, with same position, of the command reply ? every time mixed with the reply command !..?

this problem description mean nothing to you ?

thanks for you support, regards
Phil

[quote=“wizdaniel”]Hi phil31

If a Data frame and a reply are mixed…

First of all, would you test same situation on EVB board + PC Serial tool.

I guess it is because some data frame was not processed in the MCU before AT+WSTAT command had been processed.

Thanks[/quote]

no i don’t think so … as you can see, the beginning of the DATA reply, is the answer to the +WSTAT command …
then in the middle of this answer, a new COMMAND frame is inserted by the WIZFI module … no \CR\LF between the 2 frames !
the new command frame is fully inserted, right terminated, then the end of the WSTAT in inserted !

please some advice ?

thanks, regards

up because more i do tests, more i’m convince that there is a problem with the module !

i see clearly that an UDP frame is inserted inside the WSTAT command reply… NO CR LF to terminate the WSTAT reply before the DATA frame …

doing this with the EVB is not possible
it occurs on my board because it’s repetitive task… and time to time, this event occur …

please can you investigate ?

thanks, regards

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.