node-open-protocol icon indicating copy to clipboard operation
node-open-protocol copied to clipboard

Fix MID 0002 revision 6 implementation

Open ferm10n opened this issue 2 years ago • 3 comments

closes https://github.com/st-one-io/node-open-protocol/issues/40

ferm10n avatar Mar 24 '23 20:03 ferm10n

I discovered something potentially significant. This PR will cause this test to fail: Should handle error of generic communication with reply of request MID0004 Error ~ 74/76 - Based Test 04/07/2018

It appears that the sample data captured for the mid 0002 is missing the stationID, stationName, and clientID. I'm not sure how this data was captured, but it might make sense that it'd be missing these if node-open-protocol was used to capture the payload (since its parser for mid 0002 seems wrong).

Still, it's cause for concern, and makes me want to confirm what I think is a bug is actually a bug! But this is problematic since it appears this project has been unmaintained for a while now...

ferm10n avatar Mar 24 '23 21:03 ferm10n

My earlier theory feels wrong, because the data length in the sessionControlClient test I mentioned isn't long enough to capture the missing keys. I assume that data was captured from a real tool, but that would mean that a power focus 4000 was not correctly implementing the mid. none of this seems to add up...

ferm10n avatar Mar 24 '23 22:03 ferm10n

I've modified the test to accept what I believe is a correct mid 0002 payload.

ferm10n avatar Mar 28 '23 17:03 ferm10n