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

Fix field encoding of Read File Record Response #2075

Merged

Conversation

justinsg
Copy link
Contributor

@justinsg justinsg commented Mar 4, 2024

The Modbus spec V1.1b3 states the following field order:

  1. Function Code (0x14)
  2. Resp. data Length (in bytes)
  3. Sub-Req. x, File Resp. length (in registers)
  4. Sub-Req. x, Reference Type: 0x6 (fixed)
  5. Sub-Req. x, Record Data
  6. Sub-Req. x+1, ...

Previously, field 4 was before field 3.

The Modbus spec V1.1b3 states the following field order:

1. Function Code (0x14)
2. Resp. data Length (in bytes)
3. Sub-Req. x, File Resp. length (in registers)
4. Sub-Req. x, Reference Type: 0x6 (fixed)
5. Sub-Req. x, Record Data
6. Sub-Req. x+1, ...

Previously, field 4 was before field 4.
@justinsg justinsg force-pushed the fix-read-file-record-response-encoding branch from f1a6eee to cf2e0ed Compare March 4, 2024 04:05
Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

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

The changes are ok, but I have 2 concerns:

  • it is very uncommon for the modbus org to make incompatible changes, so it confuses me.
  • what do we do with all the devices that are on the 1.1 standard?

Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

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

Just checked that change is from 2012, and thus should be in all devices.

@janiversen janiversen merged commit 65a6b9b into pymodbus-dev:dev Mar 4, 2024
1 check passed
@janiversen
Copy link
Collaborator

Thanks.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
@justinsg justinsg deleted the fix-read-file-record-response-encoding branch September 14, 2024 11:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants