FW 1.0.5.2 & multi connection
Wireless
No replies yet. Be the first to reply.
Join the discussion.
Wireless
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: FW 1.0.5.2 & multi connection
by cliff ·
Hello,
Actually “TCP Server Multi Connection” is possible on Station mode.
Following shown “Multi Connection” example.
[code]Set Factory Default
[OK]
WizFi250 Version 1.0.5.2 (WIZnet Co.Ltd)
[OK]
WizFi250 Version 1.0.5.2 (WIZnet Co.Ltd)
AT
[OK]
AT+WSET=0,DIR-815_Wiznet
[OK]
AT+WSEC=0,WPA2,12345678
[OK]
AT+WNET=1
[OK]
AT+WJOIN
Joining : DIR-815_Wiznet
Successfully joined : DIR-815_Wiznet
[Link-Up Event]
IP Addr : 192.168.1.107
Gateway : 192.168.1.1
[OK]
AT+FSOCK=9,1
[OK]
AT+SCON=O,TSN,5000,0
[LISTEN 0]
[OK]
[CONNECT 0]
[LISTEN 1]
[CONNECT 1]
[LISTEN 2]
[CONNECT 2]
[LISTEN 3]
AT+SMGMT=?
Number of Sockets : 4 (SCID/Mode/Remote/Local/DataMode)
0/TSN/192.168.1.106:63543/5000/0
1/TSN/192.168.1.106:63549/5000/0
2/TSN/192.168.1.106:63555/5000/0
3/TSN/0.0.0.0:0/5000/0
[OK][/code]
Note that WizFi310 supports both Soft AP mode and Station mode.
Thank you.
Best regards.
RE: FW 1.0.5.2 & multi connection
by phil31 ·
hello
well please can you maintain update a pdf file with all news commands and options ?
the wiki page is not update. several options/definitions are missing.
my application use one TCPserver, one TCPclient and several UDP sockets.
i run in STA mode, with multi socket activated (AT+FSOCK=9,1).
when the wizfi module receive a header (when a web browser access to the module), we receive something like that :
“{0,192.168.0.216,59834,422} …HTTP header request …”
that mean on socket 0, from IP 192.168.0.216, on port 59834 and data header is 422 bytes
or if another web browser do same, we receive an header like
“{1,192.168.0.216,47312,416} …HTTP header request …”
that mean on socket 1, from IP 192.168.0.216, on port 47312 and data header is 416 bytes
why the port numbers are different ?
the wizfi module open the TCP server on a specified port : AT+SCON=O,TSN,80,0 so port 80.
how we can know that we need to reply the web page data ? do we need at this time analyses and parse the data header to know what to reply ?
and as we need to use TCP server and TCP client, in these both case we will receive some HTTP header … not easy to know what to reply !
thanks, regards
RE: FW 1.0.5.2 & multi connection
by cliff ·
Hello,
As you mentioned, WizFi seem to be currently running as server.
The port number must be different.
That is client’s port number that connect to WizFi.
And thanks for pointing out. We will update that information in the near future.
Thanks. Best regards.
RE: FW 1.0.5.2 & multi connection
by phil31 ·
Cliff,
please can you reply to my question !?
the W250 module is configured as explain previously : 1 TCP server, 1 TCP client and several UDP sockets.
we enable multiple connection AT+FSOCK=9,1
what is the right method to know what we need to reply to the incoming request ?
==> so, do we parse the data header and analyze it to define if we need reply with HTML data ?
previously, without multiple connection enable, we used the socket number to know what to reply. but now, for the TCP server, the socket number change on each client request !
now, both TCP server and client sockets may provide some HTTP request !
thanks, regards
RE: FW 1.0.5.2 & multi connection
by cliff ·
Hello,
Actually, as mentioned above, I don’t know what point is problem exactly.
Can you send me a more detailed description of the situation and an AT command log file for a definite answer?
Thanks, regards
RE: FW 1.0.5.2 & multi connection
by phil31 ·
in fact, something is strange !
with multiple connection enable, when we receive a request to serve, we see some “asynchronous” message before the end of our reply.
the module send the data header to our CPU. we analyze it then we start the process to reply : prepare the data to reply, start to send with AT+SSEND, then before the end of this command, we receive others kind of message (like [CONNECT…)
a new request is send to our CPU before we send all data of the first one and wait for [OK]
i don’t know if that is a bug in the module or not, but it will be not easy to manage this kind of method. we don’t use a real time OS !
thanks, regards
RE: FW 1.0.5.2 & multi connection
by cliff ·
Hello,
I think, following link will be helpful to you.
This is mbed library for WizFi250.
[url]WizFi250Interface - This is WizFi250 library for NetworkInterfaceAPI … | Mbed
It will be helpful to check above library code and focus on WizFi250_at.cpp and WizFi250_msg.cpp source code.
Thanks, best regards.
RE: FW 1.0.5.2 & multi connection
by phil31 ·
well i’m not a fluent cpp user !
what may be useful ? … the fact that a circular buffer is employed ?
thanks
RE: FW 1.0.5.2 & multi connection
by cliff ·
Yes, we think that.
It is recommended to use the buffer because the module looks fine.
And even if you don’t know cpp, that library code will help you entirely.
Thanks.
RE: FW 1.0.5.2 & multi connection
by phil31 ·
Hello Cliff,
well please can you provide more information about “this buffer” …
after review the code, i don’t understand what may be useful !
we already write our own driver.
the problem is that the module send some command after we start the procedure to send some data to the module.
we send AT+SSEND and send our data. but instead of receiving the [OK], sometime we receive information from another socket !
the module don’t wait the end of the SSEND command, to send some new request to the CPU.
thanks, regards