ESP8266 Developer Zone The Official ESP8266 Forum 2016-10-27T23:16:57+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=2944 2016-10-27T23:16:57+08:00 2016-10-27T23:16:57+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2944&p=10306#p10306 <![CDATA[Re: Espconn api not ACKing tcp packets]]> Statistics: Posted by gustavo — Thu Oct 27, 2016 11:16 pm


]]>
2016-10-27T23:03:09+08:00 2016-10-27T23:03:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2944&p=10305#p10305 <![CDATA[Espconn api not ACKing tcp packets]]> I'm trying to implement UPNP IGD port forwarding using the espconn api.

I create a connection to the router and then:
1) On the connected callback (espconn_regist_connectcb) I send the GET request for the IGD description using espconn_send;
2) on the receive callback (espconn_regist_recvcb) I parse the IGD description (which needs 4 tcp packets) and I send a request (espconn_send) asking if a port is open;
3) I receive the response on the same callback (espconn_regist_recvcb), if the port is free I send the mapping request (espconn_send).

All the tcp packets can be seen in this pcap: http://s000.tinyupload.com/?file_id=00012444369366896292

My problem is that there isn't a ACK for the second request, which makes the router re-transmit the 2) response.
And my last request isn't sent either, espconn_send doesn't return any error, but the pcap can't capture the packet.

Why isn't the ACK being sent?

Statistics: Posted by gustavo — Thu Oct 27, 2016 11:03 pm


]]>