-
Notifications
You must be signed in to change notification settings - Fork 37
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
ParseSerialBuffer() cannot handle receipt of a fragmented ACK #47
Comments
On further study the logic looks less strange and I think the fix is actually very simple. The response following the ACK byte needs to drop through to the logic that assembles fragmented messages and ultimately calls ProcessMessage() near the end of ParseSerialBuffer(). Line 1333
Line 1335
Can someone confirm this looks good? I don't want to break fundamental ZWave operation. |
The above fix is not sufficient. I have been testing the following re-write for the past week or so and it seems solid for all branches (except NAK which don't occur on my system, and in any event aren't handled by ProcessMessage. It's also much clearer as to how each message type is dealt with. What do you think? Maybe too many trace statements, but they've been helpful to track code coverage during my testing. Pat
|
I recently upgraded my HomeGenie from a Pi2 to a faster Pi4, while continuing to use an old Aeon stick as the controller. This has resulted in many more fragmented Zwave frames. SOF frames are handled ok, but if an ACK is fragmented, the code incorrectly handles it, as follows. A normal ACK frame is traced as 06-01-04-01-13-01-E8.
2022-12-25 07:59:21.2557 Trace [[[ BEGIN REQUEST ]]]
2022-12-25 07:59:21.2557 Trace WaitAck
2022-12-25 07:59:21.2557 Trace Sending Message (Node=39
2022-12-25 07:59:21.2557 Debug 01-0E-00-13-27-07-60-0D-00-02-25-01-00-05-3B-B7
2022-12-25 07:59:21.2630 Debug 06-01-04 // Start of ACK
2022-12-25 07:59:21.2630 Debug ZWaveMessage (RawData=01-04)
2022-12-25 07:59:21.2630 Debug ZWaveMessage (Direction=Inbound
2022-12-25 07:59:21.2630 Debug 15
2022-12-25 07:59:21.2630 Warn Bad message checksum
2022-12-25 07:59:21.2630 Debug 01-13-01-E8 // Remainder of ACK
2022-12-25 07:59:21.2630 Trace Expected message length is 21
2022-12-25 07:59:21.3637 Debug 01-04-01-13-01-E8
2022-12-25 07:59:21.3637 Trace Merged buffer to message: 01-13-01-E8-01-04-01-13-01-E8
2022-12-25 07:59:21.3637 Trace Expected message length is 21
2022-12-25 07:59:22.7655 Debug 01-04-01-13-01-E8
2022-12-25 07:59:22.7655 Trace Merged buffer to message: 01-13-01-E8-01-04-01-13-01-E8-01-04-01-13-01-E8
In fact the logic in ParseSerialBuffer() looks very strange.
The text was updated successfully, but these errors were encountered: