TwinCAT Test Connect probe dials the AmsNetId as an IP on the AMS port, so it always times out on real targets #863
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the #755 read-only Test Connect gate against production press Z35474 on 2026-11-11 (AmsNetId
5.118.56.93.1.1, IP 10.201.23.227, TC3 port 851). The probe returnsOk=False, "Probe timed out after 10s", against a healthy, reachable press. Through the same in-process AMS router the probe's own ADS state read returns Run in 109–189 ms, and symbol upload and scalar reads work.Cause:
TwinCATDriverProbe.ExtractTargetruns a first-phase TCP reachability check before the ADS handshake, and it has two bugs:5.118.56.93, an unrelated public internet host, so every Test Connect sends a connection attempt to a stranger.As a result, Test Connect can't pass against any real TwinCAT runtime.
TwinCATDriverProbeTestsdoesn't catch this, because it uses a local test listener on the "AMS port".Fix: drop the first-phase TCP check, or point it at the local AMS router, and let the bounded ADS ReadState decide reachability. Correct the tests. Then rerun the Z35474 read-only probe gate (the harness and evidence are from #755).
ScadaBridge impact: none (AdminUI Test Connect only).
Done. The probe opens no socket of its own; it uses AdsClient.Connect + ReadStateAsync through the local AMS router, the same path as the driver. Live, read-only on production press Z35474: 'ADS state: Run' in 220 ms (it used to time out after 10 s). A regression test checks that the AmsNetId-derived address is never dialled. Pushed to master in
e857135e..7a27ef1f; full suite green (20 projects, 0 failures, 0 warnings).