espconn_mesh_disconnect does not close tcp connection

0xfa1c0
Posts: 7
Joined: Sat Dec 10, 2016 11:48 pm

espconn_mesh_disconnect does not close tcp connection

Postby 0xfa1c0 » Sun Jan 01, 2017 5:11 pm

Hi all, in my project I have a mesh and a tcp server that sink the data from the sensor network. The sensor network form a mesh and establish the tcp connection with the server using

Code: Select all

espconn_mesh_enable(mesh_enable_cb, MESH_ONLINE);
, then each device sends data through

Code: Select all

espconn_mesh_sent
function.
The behaviour that I would expect is that once sent the data, the device disconnects from the server closing the TCP connection, to do this I call

Code: Select all

espconn_mesh_disconnect
, but it doesn't close the tcp connection, there is any other command? Thank you

ESP_Xutao
Posts: 134
Joined: Tue Sep 27, 2016 5:42 pm

Re: espconn_mesh_disconnect does not close tcp connection

Postby ESP_Xutao » Wed Jan 04, 2017 11:42 am

hi:
Do not call this API in any espconn callback. If needed, please use system task to trigger espconn_mesh_ disconnect.you can consult mesh_api document:http://espressif.com/sites/default/files/documentation/30a-esp8266_nonos_mesh_api_reference_v1.0.0_20160203.pdf

0xfa1c0
Posts: 7
Joined: Sat Dec 10, 2016 11:48 pm

Re: espconn_mesh_disconnect does not close tcp connection

Postby 0xfa1c0 » Fri Jan 06, 2017 1:30 am

Can I call it from a timer callback?

Who is online

Users browsing this forum: No registered users and 3 guests