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

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

Open
Hofsmo opened this issue Jul 26, 2022 · 0 comments

Comments

@Hofsmo
Copy link

Hofsmo commented Jul 26, 2022

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?

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

No branches or pull requests

1 participant