Skip to content

Server Examples Not Working #2648

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

Closed
eric-silk opened this issue Apr 23, 2025 · 2 comments
Closed

Server Examples Not Working #2648

eric-silk opened this issue Apr 23, 2025 · 2 comments

Comments

@eric-silk
Copy link

Hi there! Currently trying to communicate with some Typhoon HIL realtime digital simulators using Modbus. I've been able to do so with a ModbusTCPClient (with the server on the HIL device), but am unable to receive a connection from the HIL device as a server (with the HIL device running a TCP Client).

This has happened both using custom code and the included examples in commit 28eb319 on dev.

Operating system: Kubuntu 24.04
Python Version: 3.12.3
Hardware setup: A laptop with a USB Ethernet adapter connected via a switch to several Typhoon HIL 404's. The relevant configuration:

Image

I'm able to start the server (I have tried both server_async.py and server_sync.py) with the --host argument not set and set to 192.168.11.125, both as a normal user and as root. In both cases, the Typhoon HIL attempts to connect with a TCP SYN that goes unanswered by the server on my laptop. There are also occasional ARP messages sent by the HIL that are responded to by my laptop, and pinging the running HIL device from the laptop produces a response (i.e. they can definitely "see" one another on the network).

Running a client example while the server example(s) are running (both on the laptop) produces output as expected.

Is there any reason I'm not seeing that a server would simply ignore a connection request from a client?

@eric-silk
Copy link
Author

Resolved it. The default firewall in (K)Ubuntu appears to deny incoming connections by default. Disabling ufw allows me to connect as expected. Not an issue with the library, but perhaps consider a note in the example docs about firewalls for the ignorant like myself?

@janiversen
Copy link
Collaborator

pull requests are welcome.

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