Web server and TCP server don't work together

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Web server and TCP server don't work together

503 Views
infoterm
Contributor I

I have TCP server socket for MODBUS and it works fine. When I add webserver to my project there is no comunication for TCP server and http server even they works correctly separately. Is there some RTCS configuration or example where both web server and TCP server works correctly ?

Labels (1)
Tags (1)
0 Kudos
1 Reply

229 Views
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi Aleksandar,

Are you adding enough sockets for your application? The web_hvac demo application is a good example of how to implement this.

Take a look to the file:

C:\Program Files\Freescale\Freescale MQX 3.8\demo\web_hvac\RTCS.c

It adds the next lines:

    _RTCSPCB_init = 4;

    _RTCSPCB_grow = 2;

    _RTCSPCB_max = 20;

    _RTCS_msgpool_init = 4;

    _RTCS_msgpool_grow = 2;

    _RTCS_msgpool_max  = 20;

    _RTCS_socket_part_init = 4;

    _RTCS_socket_part_grow = 2;

    _RTCS_socket_part_max  = 20;

These lines will ensure you to have at least 4 sockets available in the system. Remember that your server will already take one, so you will have 3 remain sockets with this configuration settings. Also remember to close those sockets that already finished the client connection in the server side (your board).

I hope this helps you.

Garabo

0 Kudos