Skip to content

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

Open
@Fappio97

Description

@Fappio97

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions