SDK 0.9.4: different espconn_sent behaviour?

ESP_Sprite
Posts: 26
Joined: Fri Oct 24, 2014 7:58 pm

SDK 0.9.4: different espconn_sent behaviour?

Postby ESP_Sprite » Sun Dec 21, 2014 8:10 am

Hello,

In SDK 0.9.3 and earlier, if I would call espconn_sent consecutively in a function, it would sent all the data concatenated. If I do the same in 0.9.4, I only see the data from the first espconn_sent.

So eg:
espconn_sent(conn, (uint8 *)"Hello", 5);
espconn_sent(conn, (uint8 *)"World", 5);

for SDK<=0.9.3 would send 'HelloWorld', but for 0.9.4 it only seems to send 'Hello'.

Is this intentional or a bug? If it's intentional, I'll have to modify my code accordingly. If it's a bug, you may want to squash it :)

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: SDK 0.9.4: different espconn_sent behaviour?

Postby Her Mary » Sun Dec 21, 2014 2:12 pm

Can be used like that?

I was told to call next espconn_sent after espconn_sent_callback of the pre-packet.. :roll: :?

ESP_Sprite
Posts: 26
Joined: Fri Oct 24, 2014 7:58 pm

Re: SDK 0.9.4: different espconn_sent behaviour?

Postby ESP_Sprite » Sun Dec 21, 2014 7:11 pm

Her Majesty wrote:Can be used like that?

I was told to call next espconn_sent after espconn_sent_callback of the pre-packet.. :roll: :?


All I can say is: it worked in the past. If espconn_sent can only be used once per callback, I'd like to know that so I can work around this limitation, but it would be pretty inconvenient to do so so I want to make 100% sure this isn't a bug first.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: SDK 0.9.4: different espconn_sent behaviour?

Postby ESP_Faye » Mon Dec 22, 2014 1:03 pm

Yes,you need to call next espconn_sent after espconn_sent_callback of the pre-packet.

In fact,when you call the next espconn,you can check the return value,it won't be ESPCONN_OK but some other error code.

ESP_Sprite
Posts: 26
Joined: Fri Oct 24, 2014 7:58 pm

Re: SDK 0.9.4: different espconn_sent behaviour?

Postby ESP_Sprite » Mon Dec 22, 2014 8:19 pm

Okay, then I'll have to modify esphttpd accordingly. Thanks for the response.

Who is online

Users browsing this forum: No registered users and 6 guests