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

Supports connecting to multiple devices using the same UDP port 2222 #7

Open
kenghuaku opened this issue Jul 26, 2023 · 2 comments
Open

Comments

@kenghuaku
Copy link

I understand that different devices can operate by separating them with UDP ports, and I have tested it. However, some poorly implemented devices or adapters might not accept ports other than '2222'. I have tried connecting to multiple PLCs, and they all use the port 2222, they probably distinguish which device's packet it is after receiving it, as shown in the following screenshot:
image
image
image
image

PLC: 10.10.11.16
Device1: 10.10.11.72
Device2: 10.10.11.73

@gisellevonbingen
Copy link
Owner

This is not possible with ENIPSimpleClient. It's a really simple class to test ENIP,
If you use multiple devices as one port, you need to write a new UDPServer class...
For now, i dont' have any plan to implement it in this project.

@gisellevonbingen
Copy link
Owner

gisellevonbingen commented Aug 9, 2023

UDPClient is no tell Identification.
Only return IPEndPoint.

var remoteEP = new IPEndPoint(IPAddress.Any, 0);
var bytes = udpClient.Receive(ref remoteEP);

So.,..The only way to distinguish them is seems to be the IPAddress.

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