Web server and TCP server don't work together

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Web server and TCP server don't work together

863 次查看
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 ?

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

589 次查看
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 项奖励
回复