iicsys / pypmu

pyPMU - Python implementation of the IEEE C37.118 synchrophasor standard
BSD 3-Clause "New" or "Revised" License
62 stars 46 forks source link

Error getting Splitter to work #34

Closed hrvojej closed 2 years ago

hrvojej commented 2 years ago

Hi, we have 2 PMU connected on openPDC and openHistorian and everything is working fine. I wanted to use your package for sending data to server.

While using

from synchrophasor.splitter import StreamSplitter

sp = StreamSplitter(source_ip="127.0.0.1", source_port=1410, listen_ip="127.0.0.1", listen_port=1502)
sp.run()

I'm getting error:

2021-11-18 04:48:46,339 ERROR [1] - Error while connecting to (192.168.100.214:4712)
2021-11-18 04:48:46,340 ERROR [WinError 10061] No connection could be made because the target machine actively refused it
Traceback (most recent call last):
  File "iripmu.py", line 4, in <module>
    sp.run()
  File "C:\pypmu\synchrophasor\splitter.py", line 29, in run
    self.source_header = self.pdc.get_header()
  File "C:\pypmu\synchrophasor\pdc.py", line 82, in get_header
    self.pmu_socket.sendall(get_header.convert2bytes())
OSError: [WinError 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

Wireshark is properly getting synchrophasor protocol data on source_ip:source_port , I've put corresponding destination IP and port logged by wireshark in call to StreamSplitter.

I've tried different other versions of Python but no luck.

hrvojej commented 2 years ago

I had my openPDC and openHistorian services running. After shutting them down I was able to connect to my PMU.