AnsweredAssumed Answered

K64F: RTOS + LiWP - tcp echo and http server

Question asked by Bony X on Jul 30, 2018
Latest reply on Jul 31, 2018 by Bony X

Hello!

Is it possible to deinitialize the tcpip with liwp?

I'am using the tcp echo example.

I'd like to close tcp taks and then open the http server (also from http server example) - after pressing the button.

 

So first i initialized tcpecho and switch IRQ. It works. Then I press the button - now i'd like to initialize http server.

 

If i try use both in one project (http server initialization after pressing a button), I have this statement:

"tcp_slowtmr: active pcb->state != CLOSED".

 

Now I try to delete tcp connection and tcp task:

 

netconn_close(conn);
netconn_delete(conn);
vTaskDelete(xHandle_TCP_task);

 

And after that initialize the http server:

if(xTaskCreate(http_server,"http_server",5000, NULL, 16, NULL) != pdPASS)
{
     PRINTF("Task creation failed!(main)\r\n");
}

 

Now I dont have "tcp_slowtmr: active pcb->state != CLOSED", but unfortunately, still not working.

 

 

Both of exampkes work separately.

 

So, what i should to do? Is it possible to use http server after closing some tcpip application?

Outcomes