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

MID 0002 revision 6 is incorrectly implemented #40

Open
ferm10n opened this issue Mar 24, 2023 · 3 comments · May be fixed by #41
Open

MID 0002 revision 6 is incorrectly implemented #40

ferm10n opened this issue Mar 24, 2023 · 3 comments · May be fixed by #41

Comments

@ferm10n
Copy link
Contributor

ferm10n commented Mar 24, 2023

Open Protocol spec defines rev 6 with these new fields:

  • sequenceNumberSupport
  • linkingHandlingSupport
  • stationID
  • stationName
  • clientID

Missing Keys / Fields

The parser is missing the last three keys:

  • processKey(msg, buffer, "linkingHandlingSupport", 13, 2, position, cb) &&
  • payload: {
    cellID: 1,
    channelID: 1,
    controllerName: "Teste Airbag",
    supplierCode: "ABC",
    openProtocolVersion: "AAAAAAAAAAAAAAAAAAA",
    controllerSoftwareVersion: "BBBBBBBBBBBBBBBBBBB",
    toolSoftwareVersion: "CCCCCCCCCCCCCCCCCCC",
    rbuType: "AS254DFCVFDCVGTREDFGHJKL",
    controllerSerialNumber: "123987ASD6",
    systemType: 3,
    systemSubtype: 2,
    sequenceNumberSupport: 0,
    linkingHandlingSupport: 1
    }

Interestingly, the serializer has all the keys:

  • serializerField(msg, buf, "clientID", "number", 1, position, cb) &&
    serializerKey(msg, buf, 16, 2, position, cb) &&
    serializerField(msg, buf, "stationName", "string", 25, position, cb) &&
    serializerKey(msg, buf, 15, 2, position, cb) &&
    serializerField(msg, buf, "stationID", "string", 10, position, cb) &&
    serializerKey(msg, buf, 14, 2, position, cb) &&
    serializerField(msg, buf, "linkingHandlingSupport", "number", 1, position, cb) &&
    serializerKey(msg, buf, 13, 2, position, cb) &&
    serializerField(msg, buf, "sequenceNumberSupport", "number", 1, position, cb) &&
    serializerKey(msg, buf, 12, 2, position, cb);
  • payload: {
    cellID: 1,
    channelID: 1,
    controllerName: "Teste Airbag",
    supplierCode: "ABC",
    openProtocolVersion: "AAAAAAAAAAAAAAAAAAA",
    controllerSoftwareVersion: "BBBBBBBBBBBBBBBBBBB",
    toolSoftwareVersion: "CCCCCCCCCCCCCCCCCCC",
    rbuType: "AS254DFCVFDCVGTREDFGHJKL",
    controllerSerialNumber: "123987ASD6",
    systemType: 3,
    systemSubtype: 2,
    sequenceNumberSupport: 0,
    linkingHandlingSupport: 1,
    stationID: "AESDR56RDT",
    stationName: "QASWWEDXCVFR562 DERF34EDF",
    clientID: 9
    }

I would expect the parser and serializer to behave as inverses to each other.

Wrong type for stationID

Additionally, the type for stationID is also wrong. The official protocol says it's supposed to be a number, but node-open-protocol tries to interpret it as a string!

ferm10n pushed a commit to RV-Argonaut/node-open-protocol that referenced this issue Mar 24, 2023
@ferm10n ferm10n linked a pull request Mar 24, 2023 that will close this issue
@ferm10n
Copy link
Contributor Author

ferm10n commented Mar 24, 2023

Just realized that the type for stationID is also wrong. The official protocol says it's supposed to be a number, but node-open-protocol tries to interpret it as a string! Updating the issue to be more generic

@ferm10n ferm10n changed the title MID 0002 parser is missing keys for revision 6 MID 0002 revision 6 is incorrectly implemented Mar 24, 2023
@alexmc1510
Copy link

Hello @ferm10n , it seems that you are the only one active member in the project. I have a machine IxB ready in my lab that I would like to use for creating MID0900. I am currently using MID0008 I always receive an error and to be honest I am not able to debug it. Would you be interested on stablishing a kind of collab o working session in order to help me to debug it?

Thanks in advance

@ferm10n
Copy link
Contributor Author

ferm10n commented Apr 14, 2023

I don't have a whole lot of time lately, but I could try to help! I'll reply on your MID900 issue

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 a pull request may close this issue.

2 participants