<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Junxiao</div><div><br></div><div>Thank you very much for your answer.</div><div><br></div><div>We identify the problem in the XBee Transport, when is create the block as below<br></div><div><br></div><div><br></div><div>(NFD xbee-transport.cpp)<br></div><div>std::tie(isOk, element) = Block::<i><b>fromBufferXBee</b></i>(<i><b>payload</b></i>, <b><i>length</i></b>);<br>    <br></div><div>(ndn-cxx block.cpp)<br></div><div>std::tuple<bool, Block><br>Block::fromBufferXBee(const uint8_t* buffer, size_t offset)<br>{<br>      std::cout << "Buffer:             "<<buffer<<"\n";<br>      std::cout << "Offset:             "<<offset<<"\n";<br></div><div>      const uint8_t* pos = buffer;<br>      const uint8_t* const end = buffer+offset;<br>      std::cout << "Pos:             "<<pos<<"\n";<br>      std::cout << "End              "<<end<<"\n";<br>      uint32_t type = 0;<br>      std::cout << "type         "<<type<<"\n";<br>      bool isOk = tlv::readType(pos, end, type);<br>      if (!isOk) {<br>        return std::make_tuple(false, Block());<br>      }<br>      std::cout << "type         "<<type<<"\n";<br>      uint64_t length = 0;<br>      std::cout << "length         "<<length<<"\n";<br>      isOk = tlv::readVarNumber(pos, end, length);<br>      if (!isOk) {<br>        return std::make_tuple(false, Block());<br>      }<br>      std::cout << "length         "<<length<<"\n";<br>      // pos now points to TLV-VALUE<br>      if (length > static_cast<uint64_t>(end - pos)) {<br>        return std::make_tuple(false, Block());<br>      }<br>      size_t typeLengthSize = pos - buffer;<br>      auto b = make_shared<Buffer>(buffer, pos + length);<br>      std::cout << "Type:               "<<type<<"\n";<br>      std::cout << "typeLengthSize = pos - buffer :  "<<typeLengthSize<<"\n";<br><br>      return std::make_tuple(true, Block(b, type, b->begin(), b->end(),b->begin() + typeLengthSize, b->end()));<br>}<br></div><div><br></div><div><br></div><div>The resulting trace is:</div><div><br></div><div>Buffer:             100[30]={81[8]=0000000000000001,82[1]=02,83[1]=05,80[12]=6C655F6F726967696E616C5F}<br>Offset:             82<br>Pos:             100[30]={81[8]=0000000000000001,82[1]=02,83[1]=05,80[12]=6C655F6F726967696E616C5F}<br>End              <br>type         0<br>type         49<br>length         0<br>length         48<br>Type:               49<br>typeLengthSize = pos - buffer :  2<br>1558360770.236956 INFO: [nfd.XBeeTransport] Element: 49[48]=305B33305D3D7B38315B385D3D303030303030303030303030303030312C38325B315D3D30322C38335B315D3D30352C<br></div><div><br></div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-">I would like to ask you kindly,</span></span></div><div dir="ltr"><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-"> what would be the appropriate values  for the  <b><i>payload</i></b> and  <b><i>length</i></b>, when is called the <span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-"><i><b>fromBufferXBee</b></i> function?<br></span></span></span></span><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 17 de may. de 2019 a la(s) 11:14, Junxiao Shi (<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Oscar</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">The TX  fragment the Interest Packets as:<br><br>100[30]={81[8]=FFFFFFFFFFFFFFFF,82[1]=00,83[1]=05,80[12]=05310721080A636C69636B69}<br>100[30]={81[8]=0000000000000000,82[1]=01,83[1]=05,80[12]=646569610813746573746669}<br>100[30]={81[8]=0000000000000001,82[1]=02,83[1]=05,80[12]=6C655F6F726967696E616C5F}<br>100[30]={81[8]=0000000000000002,82[1]=03,83[1]=05,80[12]=31090212000A046287BE9A0C}<br>100[21]={81[8]=0000000000000003,82[1]=04,83[1]=05,80[3]=020FA0}<br></div></div></div></blockquote><div><br></div><div>This is a correctly encoded NDN Interest (packet format v0.2) in five NDNLPv2 fragments. I can interpret the L3 packet as:</div><div><div><font face="courier new, monospace">0531 Interest</font></div><div><font face="courier new, monospace">  0721 Name</font></div><div><font face="courier new, monospace">    080A636C69636B6964656961 GenericNameComponent clickideia</font></div><div><font face="courier new, monospace">    08137465737466696C655F6F726967696E616C5F31 GenericNameComponent testfime_original_1</font></div><div><font face="courier new, monospace">  0902 Selectors</font></div><div><font face="courier new, monospace">    1200 MustBeFresh</font></div><div><font face="courier new, monospace">  0A046287BE9A Nonce</font></div><div><font face="courier new, monospace">  0C020FA0 InterestLifetime 4000ms</font></div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">The RX is Dropping the packets as show below:<br><br>XBee RX Message:  100[30]={81[8]=FFFFFFFFFFFFFFFF,82[1]=00,83[1]=05,80[12]=05310721080A636C69636B69}<br></div></div></div></blockquote><div><br></div><div>This line is correct.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">1558009398.386278 TRACE: [nfd.XBeeTransport] [id=256,local=xbee://,remote=xbee://[xbee]] Received: 82 bytes<br></div></div></div></blockquote><div><br></div><div>The "82 bytes" is problematic, as we can see there are only 32 bytes in the NDNLPv2 frame.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Wire Type = 49<br></div></div></div></blockquote><div><br></div><div>I don't know where does this number come from, but this is likely the problem because it also appears in GenericLinkService's error message.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">TLV LpPacket = 100<br></div></div></div></blockquote><div><br></div><div>This is the correct type and is what should be passed to the LinkService.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">1558009398.386386 WARNING: [nfd.GenericLinkService] [id=256,local=xbee://,remote=xbee://[xbee]] packet parse error (unrecognized TLV-TYPE 49): DROP<br></div></div></div></blockquote><div><br></div><div>Yours, Junxiao</div></div></div></div>
</blockquote></div>