Force a http[FIN] command
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: Force a http[FIN] command
by ssekim ·
Hello Kurt
—(UART)——(WiFi)—<Web Browser in PC/Smartphone>
And you want to operate WizFi250 as HTTP Server. Right?
But, how doesn’t MCU know the ?
In my guess, MCU would send the all HTTP data to using WizFi250?
If MCU use some buffer before sending HTTP data to , MCU can know the exact size of HTTP data.
(even though it is dynamic pages)
Did i misunderstand something?
RE: Force a http[FIN] command
by kgw6373 ·
Hallo ssekim
Thanks for your replay.
You are right - the MCU composes the HTTP data and could know the centent length.
However until now, the webserver was connected via an lwip-stack to the LAN. With lwip I could close a connection without reseting it. That’s the reason, the webserver simply closes the connetion when dynamic pages are used instead of writing the header, writing the data and then filling the content length of the data into the header.
If there is no way with WizFi250 to close a connection without reseting it, I have to adjust the webserver.
Best regards
Kurt
RE: Force a http[FIN] command
by kgw6373 ·
Hallo ssekim
In the mean time I was looking into the webserver. On short replays the content length can be easily included. But on long replays with multiple frames (replay > then buffer size) this gets realy difficult. You would have to generate twice the replay. The first time just to calculate the length and the seconde time for the real transmitting with the content length.
The possibility of closing the connection without a restart would be extremely helpful.
Best regards
Kurt
RE: Force a http[FIN] command
by ssekim ·
Hello kgw6373
I think that you had better use an “AT+SMGMT=0\r”, “AT+SCON=O,TSN,80,0\r” sequence.
For every TCP-connection, you should apply the timeout(3~5 seconds) in case of TCP-Client(HTTP)-not-disconnection and restart TCP Server for stable and continuous web server service.