Closed ttichy closed 4 years ago
Turns out that the NetId and the Address have to match? I configured the route on the target to
<Route>
<Name>RemoteClient</Name>
<Address>192.168.0.120</Address>
<NetId>192.168.0.120.1.1</NetId>
<Type>TCP_IP</Type>
<Flags>32</Flags>
</Route>
changed the options accordingly and voilà, it works!
Turns out that the NetId and the Address have to match? I configured the route on the target to
<Route> <Name>RemoteClient</Name> <Address>192.168.0.120</Address> <NetId>192.168.0.120.1.1</NetId> <Type>TCP_IP</Type> <Flags>32</Flags> </Route>
changed the options accordingly and voilà, it works!
Correction - they don't have to match.
Out of ignorance, I have used the same NetId as my local AMS Router. That was apparently confusing the target router.
Now I am connecting to the target TwinCAT with AMSNetIdSourc: 10.0.75.1.1.1
I have my laptop(192.168.0.120) connected over local network to a Win10 PC (192.168.0.208) running TwinCAT 3.
I am trying to do a
readDeviceInfo
as described in the documentation ("Hello Machine") with options set like this:I tried to add the route on the target PC via the Router UI, but it would silently fail (TwinCAT beginner here). So I ended up adding a static route to the StaticRoutes.xml file and it looks like this:
When I run the simple js to execute read the device info, I get { Error: read ECONNRESET at TCP.onread (net.js:622:25) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } or
timeout
Wireshark shows that the laptop (RemoteClient) sends the DeviceInfoRequest, but the target PC promptly closes the connection.
From what I understand, add the route on the target PC essentially authorizes the client to connect. I am guessing that's where my problem lies, but I am unable to solve it.
Any ideas? Thanks!