Skip to content

Modbus difference raw and without and how to access registers #726

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

Open
Fappio97 opened this issue Jan 6, 2025 · 0 comments
Open

Modbus difference raw and without and how to access registers #726

Fappio97 opened this issue Jan 6, 2025 · 0 comments
Labels

Comments

@Fappio97
Copy link

Fappio97 commented Jan 6, 2025

When parsing a packet containing nested Modbus packets, the results differ depending on whether the raw option is enabled or not.

As shown in the image below, I have a PCAP file that contains a single packet with multiple nested Modbus packets. When running the operation without including raw data, the packets are correctly separated. However, when the raw option is enabled, the separation fails.

Capture

Question 2: How can I access registers when the include_raw option is enabled in PyShark? With include_raw=False, accessing all registers is straightforward, as described issues 475 However, when include_raw=True, each register is separated, and it becomes impossible to access them without encountering an exception, as shown below.

include_raw=False version

Capture2

include_raw=True version

Capture3 Capture4

Apologies for the different image formats. I initially tried to include the code, but it kept getting cut off, so I replaced it with screenshots

@Fappio97 Fappio97 added the bug label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant