ESP8266 Developer Zone The Official ESP8266 Forum 2016-10-18T15:50:12+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2869 2016-10-18T15:50:12+08:00 2016-10-18T15:50:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2869&p=10191#p10191 <![CDATA[Re: User data length when proto = binary]]>
traderlopez wrote:
I'm not sure where I messed up the computation right now, I'll review it once again. It seems very obvious now that 0x11 - 0x10 (16) is 1, so the reported length is perfect.

Thanks very much for your support, Alen.


Welcome.

Statistics: Posted by Guest — Tue Oct 18, 2016 3:50 pm


]]>
2016-10-17T19:48:17+08:00 2016-10-17T19:48:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2869&p=10181#p10181 <![CDATA[Re: User data length when proto = binary]]>
Thanks very much for your support, Alen.

Statistics: Posted by traderlopez — Mon Oct 17, 2016 7:48 pm


]]>
2016-10-14T10:14:16+08:00 2016-10-14T10:14:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2869&p=10154#p10154 <![CDATA[Re: User data length when proto = binary]]>
traderlopez wrote:
Maybe a little bug, and a question. Thanks in advance for your support.

I send binary data from server to device in the mesh. Header length is 16, total length 18.

When I use espconn_mesh_get_usr_data, reported user data length is 1 instead of 2. Returned pointer for data is pointing to 17th byte (&buffer[16]), which seems correct, but the length should be 2.

I want to know as well if this function is using any dynamic allocation to return the buffer for user data, or just positions the user data pointer where the user data starts.


This is an example of the information being sent towards a node in the mesh:

sending:
40 11 11 00 5c cf 7f c1 0b 64 c0 a8 00 64 58 1b 60 3e


Thanks very much.
Francisco Lopez.


1. the total length in mesh packet header is 0x0011, so the data length is 1.
40 11 11 00 5c cf 7f c1 0b 64 c0 a8 00 64 58 1b 60 3e
2. the function just positions the user data pointer where the user data starts.

Statistics: Posted by Guest — Fri Oct 14, 2016 10:14 am


]]>
2016-10-13T17:32:55+08:00 2016-10-13T17:32:55+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2869&p=10149#p10149 <![CDATA[User data length when proto = binary]]>
I send binary data from server to device in the mesh. Header length is 16, total length 18.

When I use espconn_mesh_get_usr_data, reported user data length is 1 instead of 2. Returned pointer for data is pointing to 17th byte (&buffer[16]), which seems correct, but the length should be 2.

I want to know as well if this function is using any dynamic allocation to return the buffer for user data, or just positions the user data pointer where the user data starts.


This is an example of the information being sent towards a node in the mesh:

sending:
40 11 11 00 5c cf 7f c1 0b 64 c0 a8 00 64 58 1b 60 3e


Thanks very much.
Francisco Lopez.

Statistics: Posted by traderlopez — Thu Oct 13, 2016 5:32 pm


]]>