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

Modbus TCP Protocol identifier should be 0 #507

Closed
metapsychologe opened this issue Dec 8, 2019 · 3 comments · Fixed by #509
Closed

Modbus TCP Protocol identifier should be 0 #507

metapsychologe opened this issue Dec 8, 2019 · 3 comments · Fixed by #509

Comments

@metapsychologe
Copy link
Contributor

if (rsp[2] != 0x0 && rsp[3] != 0x0) {

shouldn't there be an || instead of an &&?

@JoelStienlet
Copy link

I think it should be || indeed. According to a documentation: "Protocol Identifier (2 bytes): This field is always 0 for Modbus services and other values are reserved for future extensions.". That means that both should be at zero. And the code as it is now accepts the packet if at least one byte is zero.

@karlp
Copy link
Contributor

karlp commented Oct 3, 2022

should this go in quirks to allow other protocols?

@stephane
Copy link
Owner

stephane commented Oct 3, 2022

The gate to quirks is now open (see recent commits :)

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.

4 participants