sunspec / pysunspec2

SunSpec Python library for interfacing with SunSpec devices.
Apache License 2.0
57 stars 21 forks source link

Problems in connection TCP #60

Open yuvalfro opened 2 years ago

yuvalfro commented 2 years ago

Hi, I get a lot of connection errors when I try to read\write fields. I used tcpdump to investigate it and I see that the sunspec client is the one that initiates the disconnection. Here some lines from the tcpdump logs:

08:49:03.109412 IP DEVICE_IP > SUNSPEC_CLIENT_IP: Flags [P.], seq 4040936281:4040936298, ack 2089094857, win 1901, options [nop,nop,TS val 1574374142 ecr 602893784], length 17: HTTP: HTTP/1.0 200 OK 08:49:03.109763 IP SUNSPEC_CLIENT_IP > DEVICE_IP: Flags [.], ack 17, win 22, options [nop,nop,TS val 602893846 ecr 1574374142], length 0 08:49:03.117102 IP DEVICE_IP > SUNSPEC_CLIENT_IP: Flags [P.], seq 17:139, ack 1, win 1901, options [nop,nop,TS val 1574374152 ecr 602893846], length 122: HTTP 08:49:03.117672 IP SUNSPEC_CLIENT_IP > DEVICE_IP: Flags [.], ack 139, win 22, options [nop,nop,TS val 602893846 ecr 1574374152], length 0 08:49:03.117913 IP DEVICE_IP > SUNSPEC_CLIENT_IP: Flags [P.], seq 139:144, ack 1, win 1901, options [nop,nop,TS val 1574374152 ecr 602893846], length 5: HTTP 08:49:03.118478 IP SUNSPEC_CLIENT_IP > DEVICE_IP: Flags [.], ack 144, win 22, options [nop,nop,TS val 602893847 ecr 1574374152], length 0 08:49:03.118594 IP SUNSPEC_CLIENT_IP > DEVICE_IP: Flags [F.], seq 1, ack 144, win 22, options [nop,nop,TS val 602893847 ecr 1574374152], length 0

I also used modbus poll to check that my system is fine, and I didn't have any problems.

This problem happened before? Any ideas how to solve it? Is there something in the creation of the client that I'm missing and causing this problem? I would appreciate any idea\help....

EDIT: I'm running this on Linux computer. Is there a plan to support and check Linux? I must use pysunspec2 because I need to check maps 701-713.

Thanks