WizFi360 TCP message delay & SoftAP+STA
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: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
Would you mind to provide more details? As I understood WizFI360 is running in SoftAP+STA mode and you have TCP server running on the module. Then you are trying to send messages from server to other clients connected to WizFi360 SoftAP, but messages are delayed. Is my understanding correct?
Any screenshots, exact command sequences will be highly appreciated.
Thanks in advance,
Viktor
RE: RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
WizFi360 is running SoftAP+STA indeed. WizFi is running a TCP server, and if WizFi is connected to an AP then it is connected to as a TCP client to a server on that AP too, while other devices which are connected to the WizFi SoftAP are connected as TCP clients to the SoftAp TCP server.
I’m trying to send messages to the TCP clients with the AT commands of
AT+CIPSENDBUF, the exact sequence is this:
AT+CIPSENDBUF,0,[len]
<wait 10ms>
‘>’
[message]
<wait 20ms>
AT+CIPSENDBUF,1,[len]
<wait 10ms>
‘>’
[message]
<wait 20ms>
AT+CIPSENDBUF,2,[len]
<wait 10ms>
‘>’
[message]
<wait 20ms>
Waiting happens with delays in the MCU program. The Program sends a message seperately to a device or to all three of them in a manner like I showed above. Even when it just sends one message to one device it can arrive to the device delayed.
These messages arrive to the TCP clients just fine IF the WizFi360 is not connected to an AP through its STA. But when It is connected, some of the devices get these messages delayed up almost up to a minute in some cases.
For example: Device 1 and 3 would get their messages before Device 2, even though in the command sequence Device 2 is getting sent its message sooner than Device 3.
This Delay only doesn’t happen if after power up, the WizFi360 does not connect to an AP. If it connect to an AP, the delay happens, even if it disconnects from the AP, until another power up.
WizFi360’s Firmware version currently is 1.1.1.2 but it was 1.0.7.2, I thought upgrading firmware would help but the problem still persist even after changing to 1.1.1.2 from 1.0.7.2 .
The exact sequence I take when I set up the module is:
-ATE0
-AT+CWMODE_DEF=3
-AT+CWDHCP_DEF=0,1
-AT+CWSAP_DEF=“[our ssid]”,“[our password]”,1,3,3,0
-AT+CIPAP_DEF=“192.168.100.1”,“192.168.100.1”,“255.255.255.0”
-AT+CWDHCPS_DEF=1,120,“192.168.100.100”,“192.168.100.200”
-AT+CIPMUX=1
-AT+CIPSERVERMAXCONN=3
-AT+CIPSERVER=1,5000
-AT+CIPSTO=1200
-AT+CIPSTAMAC_CUR? [To get the MAC address]
-AT+CIPSTA_DEF? [To get the IP Address]
When trying to connect to an AP:
-AT+CWJAP_DEF=“example”,“password”
If it connected then trying to connect to the server:
-AT+CIPSTART=4,“TCP”,“192.168.137.1”,50000
I hope this will help trying to find a solution, if you need anything else just tell me
Thank you in advance!
RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
I am now checking our module performance.
By message delay, do you mean that message itself is being delayed or delay for “SEND OK” message?
RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
Sorry, I might misunderstand your question. Are you asking if SEND OK is being delayed after the message has been sent?
Because SEND OK only comes after the message has been sent, in which case, yes it is delayed with the message itself, but after I get the delayed message, I get the SEND OK too.
RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
Yes, that was my question.
Base on my tests so far, messages are being delivered almost immediately, while as “SEND OK” messages are being delayed sometimes. But since you are using AT+CIPSENDBUF, it is not necessary to wait for “SEND OK” message.
Since you mentioned that you get messages itself delayed, would you mind informing me whether there is any noise in WiFi channel that you are using or any other circumstances that could impact communication? From my side, I will conduct more tests and check Firmware code.
RE: RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
There aren’t much wifi hotspots around, so I don’t think there is noise in the WiFi channel.
The circumstances I am using is, having three different devices [a phone, a tablet, and a smart watch] with our android program as a TCP client connected to the WizFi SoftAP and communicating like that.
When WizFi360 does not use its STA, then the messages what come from the Module arrive almost instantly too, but when the STA is being used to connect to an AP so that the WizFi can connect to a TCP server on that network, then the delays start happening noticably on the devices. It doesn’t have to be even connected to the TCP server only to the AP and the delays can be noticed.
I have tested with a TCP Client terminal tester and the delays still happened on that too when WizFi was connected to an AP. What I find weird still, that the delay still remains if I connect to an AP and disconnect from it with WizFi, but if I don’t connect to an AP after power up, the delays don’t happen.
I hope this was helpful.
RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
I don’t want to seem impatient or pushy, but can I have an update on how things are going so far?
Thank you!
RE: RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
Would you mind to test with FW v 1.0.7.5?
It can be downloaded here:
Meanwhile I will look for other workarounds.
RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hi,
Sorry it takes longer time than expected. I am still working on this issue, I will let you know the results.
RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
I have uploaded the FW v 1.0.7.5 to our WizFi360 as you requested but the problem about the delayed TCP messages sadly is still present.
RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
Would you mind to provide full logs from UART of WizFi360? Preferably with timestamps, I made exactly same settings that you mentioned above, and tested with similar setup (WizFi360 as SoftAP+STA/TCP Server, smartphone and table as TCP client and another Wizfi360 as TCP client), in my case it worked without any delays.
RE: RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
I have asked for some logs from one of the devices which has the messages delayed more frequently, and they sent me a log from one session of testing while connected to 2 terminals and one Tablet.
TCP link ID was: 0 - Terminal1; 1 - Tablet; 2 - Terminal2; and the messages were sent in this order too.
The left Terminal is Terminal1 while the right Terminal is Terminal2, the log file is from the Tablet’s program when it gets the messages.
As you can see, the Tablet gets the messages delayed compared to the terminals on the Network where the server is found.
(Like on line 10, where the message which was sent at 9:54:05 was delayed and so is the two messages after that and they arrived at the same time at 9:54:11)
I hope this helps figuring out the problem, if you need more logs just tell me.
RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
Unfortunately based on your screenshot it is impossible to understand which commands were given to WizFi360. That’s why I asked log from UART1 of WizFi360. If possible, please provide me one, so that I would be able to reproduce your setup exactly and find out the reason.
RE: RE: WizFi360 TCP message delay & SoftAP+STA
by KVLM ·
Hello,
If you want to know which commands I used, it’s the AT+CIPSENDBUF one, I only use that for message sending and I already written that down, so now I don’t understand what you would like to know, could you elaborate about it?
If it’s about how I use it in code for the Microcontroller then it’s like this:
And I use it something like this:
And as you could see I am sending to three Clients with a message sender like this, just a bit more elaborate to get the desired messages I need, the ones on the screenshot on the terminals.
I cannot provide timestamps for when I send the AT commands because we don’t have an RTC for the MCU in this project, the closest time stamp I can get about when the command is sent is when the message arrives on the terminal on the left side on the screenshot since that was on LinkID 0.
The Terminals got the messages in time because they were on the AP to which the WizFi was connected.
Also, even if I send it only to one client, the delay can still happen. But as I said, it only happens if WizFi’s STA is connected to an AP.
I hope this was helpful.
RE: WizFi360 TCP message delay & SoftAP+STA
by viktor WIZnet ·
Hello,
Were there any other commands used for settings except those that you informed before?
Can you test with the same setup but without MCU and sending commands directly to WizFi360?