xbee-api icon indicating copy to clipboard operation
xbee-api copied to clipboard

XBee S2C didgimesh support

Open ritujb opened this issue 7 years ago • 3 comments

Hi, is there any chance of you guys adding digmesh protocol support?

ritujb avatar Jul 14 '17 11:07 ritujb

I have no interest in doing it, but feel free to contribute!

jankolkmeier avatar Jul 14 '17 13:07 jankolkmeier

As a note, if you look at the api frames used by s2c digimesh, there is only a couple of unimplemented frames for the frame parser (that you may not even need):

Implementing any of these is done by:

  • Adding the constants for the frame types (and possible response values) to constants.js
  • Writing a test for the frame to be implemented in xbee-api_test.js. For these packets, all being packets from the module, add the tests under 'API Frame Parsing'. The bytes in rawFrame can be inspired by the examples given on the digi website, and in the frame callback, you test if the object properties are what you expect them to be.
  • Implementing the actual parser is done in frame-parser.js. As you can see, the to be parsed frame starts after the frame type byte, and does not contain the checksum byte at the end.

EDIT: and of course, if you implement it, add them to the README.md, following the current formatting.

jankolkmeier avatar Jul 14 '17 14:07 jankolkmeier

And finally, if you look at the last four commits in this branch of @docwelch, you will find that somebody already did the work. but according to issue #32, he just couldn't test it, yet.

jankolkmeier avatar Jul 14 '17 14:07 jankolkmeier