LWM problem in the payload

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All

 

I'am using LWmesh but I fond a problem during a transmission message from Coordinator to END Device.

I've tried all message type from UNICAST , MULTICAST up to BROADCAST.

I've tried to send a message with 50 bytes of data. The data is the incremental number from 0 to 50.

ON the coordinator side I send the message with  NWK_DataReq(&appNwkDataReq) where appNwkDataReq is as follow:

 

00 00 00 00 00 21 00 01 01 03 0f 0f 31 06 36 58 12 00 00 21 00 01 32 00 01 02 03 04

05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20
21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31

 

If you look the bold part is the data from 0 up to 49.

 

In the receiver side i received the following frame:

21 00 01 32 00 01 02 03 04 05 f8 d3 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17
18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31

 

If you look the underlined bold numbers something appens during transmission!!!

It's seems to be an incremental number like an ID number of the packet but I can't understand who change these two bytes.

I tried to disable security and other features but however this number appears !!!!

 

Someone have had the same problem ?

 

Thanks

 

Closed

Closed
This topic has a solution.
Last Edited: Fri. Oct 16, 2015 - 12:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry I forgot... I'm using the ATMega256RFR2  module.

 

Thanks

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Other informations:

 

I used the Wireshark sniffer and disabled Security.

In the air the frame is correct so Coordinador send the right data do Nodes.

Something appens in the Nodes ...

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Find problem in the source code. 

 

Forgot     

 

msg->lqi = ind->lqi;
msg->rssi = ind->rssi;

 

Forgot my post !!!

 

Thanks

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

None of what you have written makes any sense to me. You will have to be more specific and show some code if you want any help.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry Alex

 

The problem was in the appDataInd function.

I left the old example code 

 

AppMessage_t *msg = (AppMessage_t *)ind->data;

msg->lqi = ind->lqi;
msg->rssi = ind->rssi;

 

This code overwrite the data frame exactly in the location previous  explained.

Unfortunately this is a simple bug but yesterday I lost lots of time and for  this reason I wrote this request.

This morning, with 'fresh brain' , I re-checked code and used the sniffer to check the 'air'.

After exclusion of all possible problem I debugged step by step and found the problem.

 

I don't know if is possible to close otherwise I did that.

 

Sorry

Thanks

Giacomo