You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2019. It is now read-only.
The current xbee_sZB_createSourceRoute_tx_func in master overwrites the last byte of the last 16-bit address in the source route list as well as the last byte of the 16-bit destination address.
The offset 11 should be 12 as far as I can tell, and I am not sure why the last byte was overwritten by 0. The spec doesn't seem to indicate that.
This is the diff of my change.
diff --git a/modes/xbeeZB/route.c b/modes/xbeeZB/route.c
index cede0a9..1c94638 100644
--- a/modes/xbeeZB/route.c
+++ b/modes/xbeeZB/route.c
@@ -51,8 +51,8 @@ xbee_err xbee_sZB_createSourceRoute_tx_func(struct xbee *xbee, struct xbee_con *
iBuf->data[0] = identifier;
iBuf->data[1] = 0; /* the datasheet specifies that the frameID is always zero */
memcpy(&(iBuf->data[2]), buf, len);
- iBuf->data[11] = 0; /* the datasheet specifies that this is zero */
- iBuf->data[bufLen - 1] = '\0';
+ iBuf->data[12] = 0; /* the datasheet specifies that this is zero */
+ //iBuf->data[bufLen - 1] = '\0';
*oBuf = iBuf;
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The current xbee_sZB_createSourceRoute_tx_func in master overwrites the last byte of the last 16-bit address in the source route list as well as the last byte of the 16-bit destination address.
The offset 11 should be 12 as far as I can tell, and I am not sure why the last byte was overwritten by 0. The spec doesn't seem to indicate that.
This is the diff of my change.
The text was updated successfully, but these errors were encountered: