Skip to content

Received data with tinyPDC too long when receiving PMU data from another PC #38

@Hofsmo

Description

@Hofsmo

Hi,
I am having trouble hosting a PMU on one PC and sending it to tinyPDC on another PC.

I have a script that sends PMU data. I can receive this data using the example script tinyPDC.py, if I have the two scripts on the same PC. However, when I try to have the scripts on two different PCs it does not work anymore. After having received the first frame, the script stops.

To debug a bit I changed the get method of the Pdc class to print both the bytes received and the total frame size. It seems that in the first iteration in tinyPDC.py the get method works nicely. However, in the next iterations the get method receives 224 or 336 bytes, while the total frame size is 112. I managed to bypass this problem by splitting the received data into chunks of the total frame size. However, I am a bit confused why this problem happens, since it does not happen when the scripts are on the same pc. The PMU Connection Tester also manage to receive the data nicely.

Have anyone else experienced something similar and does my fix seem reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions