UDP sends garbage when concurrent TCP socket is active

Hi,
I have an application using a STM32 olimexino board and a W5100 shield. It uses FreeRTOS and runs 4 tasks, of which one task handles a NTP client and another task handles a Web server.
The Ethernet library has been modified by myself by adding mutexes around all SPI accesses to guarantee the complete, undisturbed transmission of the read, write and write command operations, in this multitasking environment.
The NTP client and the web server work perfectly, when used separately.
However, if I use them concurrently, the UDP transmission is corrupted by the Web server activity, and not the contrary (the web server works unaffected by the concurrent operation).
What happens is this.
Normally the NTP client sends every 20 seconds a UDP datagram of 48 bytes according to the NTP format, and expects a UDP datagram in response.
After some time of concurrent operation, the UDP datagram I record using Wireshark has a length of 96 and contains 48 bytes of garbage, followed by the correct 48 bytes of the NTP structure.
Of course this datagram receives no response from the server. At the next attempt to send a request, the datagram lengh is 144 and contains 96 bytes of garbage, followed by the correct 48 bytes of the NTP structure.
I cannot imagine how garbage data could be inserted BEFORE the data I want to send, nor why this occurs only when the Web server is processing its own traffic.

Are you using the iolibrary we provide?
If no, first you need to use the iolibrary for test.

hey irina can i speak to you in privately?about w5500 web server , i need to run web server with stm32 & w5500 , i add io library and i have ping from w5500 chip…but i wanna to run web server ,when i add httpserver header file to my project i have several error ,can you help me please?we want to create new product and in future we need many w5500 chips for our product

This GitHub site is currently adding projects.
Among them, there is a project for HTTP Server.
https://github.com/WIZnet-ioLibrary/W5x00-HTTPServer

image

You have to modify from W5100S to W5500 in wizchip_conf.h and you can use HTTP Server Project for W5500

1 Like

Thank you very much :slightly_smiling_face:

i work with blue pill header board (stm32f103c8t6) and using keil compiler , can you give me source file or training for this ?

can i give your skype or whatsapp for asking my questions about w5500 chip and runing web server?
i working on smart home company and if i success to runing web server and make web relay we need to many of w5500 Chips for our product

Please check the link below

1 Like

thank you very muck dear irina :slightly_smiling_face: its work very good

can i change my ip in web page and storage it on microcontroller? without flash ic or sd card

i mean user can change ip and dns or something via web page and when reset microcontroller this configuration does not change

And next question is how can i compare end of url
For example:
This is my url:https://192.168.100.45

And i wtite the html code like this :

<a href=‘Relay’ Relay1ON < / button >

When i click the button the gpio activated but i need code that when i enter this url (Https://192.168.100.45/Relay) its worked too

Can you help me?

The HTTP server we provide finds the corresponding phrase in the message and makes it work.
It seems that you want to use Restful.
I think you can’t use that mode with the link we provided so you have to implement it yourself.

1 Like

It means i can’t use your httpserver.h or its work and i need to change webpage.h and userhanlder.h?

Could i use some function in io libraty like ( http_get_uri_name) or something to get value of URL?

Hello @irina_kim
how are you
is it work on stm32f101?or i need to port this library for f101 series?

and which header file should be change for that?