Skip to content

Fix 24 bits types handling#290

Merged
fairecasoimeme merged 1 commit intofairecasoimeme:v3.1dfrom
badzz:write24bit
May 6, 2020
Merged

Fix 24 bits types handling#290
fairecasoimeme merged 1 commit intofairecasoimeme:v3.1dfrom
badzz:write24bit

Conversation

@badzz
Copy link
Copy Markdown
Contributor

@badzz badzz commented May 3, 2020

It is stored in a 32 bits C type but we copy into a 32 bits array for sending which is wrong. Code is changed to copy into 24bits structure
Further fixing would include sending back a shorter length as the function sends back 4 bytes length instead of 3 bytes.
I suspect the other structure like 40bits and 56bits have the same issue
Orignal issue was that when sending 0x123456 was ending up as 0x345600 on the zigbee sniffer

It is stored in a 32 bits C type but we copy into a 32 bits array for sending which is wrong. Code is changed to copy into 24bits structure
Further fixing would include sending back a shorter length as the function sends back 4 bytes length instead of 3 bytes.
I suspect the other structure like 40bits and 56bits have the same issue
Orignal issue was that when sending 0x123456 was ending up as 0x345600 on the zigbee sniffer
@fairecasoimeme
Copy link
Copy Markdown
Owner

ok great ! 👍
Fred

@fairecasoimeme fairecasoimeme merged commit 53a0211 into fairecasoimeme:v3.1d May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants