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

PDC stuck on requesting header message #44

Open
MauritsMolberg opened this issue Jan 23, 2024 · 2 comments
Open

PDC stuck on requesting header message #44

MauritsMolberg opened this issue Jan 23, 2024 · 2 comments

Comments

@MauritsMolberg
Copy link

MauritsMolberg commented Jan 23, 2024

I know this issue has been brought up in other threads, but they have been regarding PMU data sent by other programs, and no solution has been found.

I am trying to send PMU data from one of the example PMU scripts to tinyPDC, and tinyPDC never moves on from requesting PMU header. This is printed from tinyPMU:

2024-01-23 18:25:55,261 INFO [7734] - PMU configuration changed.
2024-01-23 18:25:55,261 INFO [7734] - PMU header changed.
2024-01-23 18:25:55,261 INFO [7734] - Waiting for connection on 192.168.0.6:1410
2024-01-23 18:26:03,771 INFO [7734] - Waiting for connection on 192.168.0.6:1410
2024-01-23 18:26:04,512 INFO [7734] - Connection from 192.168.0.6:61719
2024-01-23 18:26:04,512 WARNING [7734] - Received unknown message <- (192.168.0.6:61719)

and this is printed from tinyPDC:

2024-01-23 18:25:57,979 INFO [7] - PDC successfully connected to PMU (192.168.0.6:1410)
2024-01-23 18:25:57,979 INFO [7] - Requesting header message from PMU (192.168.0.6:1410)

The result is the same when any of the three PMU scripts is sending, and when the scripts are both running on a single computer and on two different computers. If I comment out the header = pdc.get_header() line, the same issue happens when requesting config frame.

Through debugging I've found that the program gets stuck when running the socket.recv() function in the get() function on line 129 of pdc.py.
bilde

The "Received unknown message" warning always appears after the PDC has requested something, so could there be an issue with the command frame? Or am I doing something wrong?

@sstevan
Copy link
Contributor

sstevan commented Feb 15, 2024

Hello @MauritsMolberg,
I have just checked, tinyPDC and tinyPMU should work on the same host immediately, out of the box.
Please see below.

Screenshot 2024-02-15 at 14 42 14

Maybe you should print/debug bytes coming from tinyPDC, maybe a type of the frame is not correctly recognized.

@MauritsMolberg
Copy link
Author

Hi, and thanks for the reply.

That is very strange. I get the same results as in the original post when running the scrips out of the box, and it is the same when I run it on another machine or try to send data between machines.

I unfortunately do not have the time or skills to debug using the bytes in the frames, but I was able to get it to work using this fork, which is good enough for my project. You could take a look there if you are interested in seeing what the differences that make it work could be.

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

2 participants