My main aim now is to determine if there will be any packet loss in transmission between two Xbee s2 modules, when the distance between them are varied, and in different environments.

Please how best can i measure/detect this..

many thanks

  • 1
    \$\begingroup\$ Do you mean you are trying to detect when your receiver mistakingly accepts good packets when in fact they are bad. Lost packets should instigate a packet re-send so therefore they are never really lost. Maybe you want to determine this too? \$\endgroup\$ – Andy aka Feb 7 '14 at 10:09
  • \$\begingroup\$ Are you planning to use api mode? If so, this gets easier. \$\endgroup\$ – Erik Friesen Feb 7 '14 at 21:36
  • \$\begingroup\$ But how do I use API mode....what are the steps. \$\endgroup\$ – bulala Feb 9 '14 at 11:09

This answer is aimed at the detection of data corruption at a level above where the Xbee works i.e. at the so-called data link layer. Xbee is presumed to handle the "physical layer" in this answer. See wiki if this is confusing: -

enter image description here

If you want to measure the deterioration in quality of data received (before retry mechanisms try to correct it) then you'd probably be wise to consider setting a yardstick transmission of a known length. Transmit this periodically at a known rate and when the receiver acquires and recognizes the yardstick transmission it counts a number called A.

A is the "good" count.

If the message is received but corrupted (error detection codes recognize corruption) maybe count a number called B. Finally, to check the effectiveness of your error detection method, count a number C. C is for all transmissions that got thru the error detection system but, didn't have exactly the correct message in the payload - you can do this because your receiver can know the yardstick message.

B is messages thrown out due to detecting errors and C is messages that would get thru in error.

Leave the system running for a few minutes and look at the data. A+B+C should equal the number of transmissions sent but if they don't this also indicates that there is a weak link between sender and receiver.

| improve this answer | |
  • \$\begingroup\$ FWIW, the xbee series 2 have a full zigbee stack, so they can theoretically manage layer 1-4. A lot depends on configuration, though. \$\endgroup\$ – Connor Wolf Feb 7 '14 at 11:55
  • \$\begingroup\$ @ConnorWolf yeah I guess the OP needs to work out a way of getting to the data at the lowest level within the Xbee - all the frills removed as much as possible. \$\endgroup\$ – Andy aka Feb 7 '14 at 12:07
  • \$\begingroup\$ i appreciate your comments above. The exercise is based on ECG data( digital data here). i am looking at the possibility that some of the data may be lost as the distance & environment between the modules is increased/varied. \$\endgroup\$ – bulala Feb 7 '14 at 14:37
  • \$\begingroup\$ @bulala I appreciate your appreciation of course and I understood the rest of your comment from the question you asked so, are you trying to hint at something... maybe? Do you have a question? Don't be shy. \$\endgroup\$ – Andy aka Feb 7 '14 at 14:40
  • \$\begingroup\$ @ Andy...series of questions here \$\endgroup\$ – bulala Feb 7 '14 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.