Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZBOSS: bug in zboss - reverse extendedpanid #1293

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/adapter/zboss/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ export class ZBOSSDriver extends EventEmitter {
const ieeeAddr = result.payload.ieee;

result = await this.execCommand(CommandId.GET_EXTENDED_PAN_ID, {});
const extendedPanID = result.payload.extendedPanID;
// TODO: bug in extendedPanID - got reversed value
const extendedPanID = result.payload.extendedPanID.reverse();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No chance that payload is used again (after this call), right? Because reverse is "in-place".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where it can be used yet. When I checked earlier, the extpanid was made of identical elements, so I didn't notice the problem. And here I suddenly discovered that a reset occurs at startup - the set and read values do not match.


result = await this.execCommand(CommandId.GET_PAN_ID, {});
const panID = result.payload.panID;
Expand Down
Loading