Comments (9)
In my tests and experience, the 48898 TCP port is the only one that is required.
It's important to understand that the 48898 is the port that the PLC/TwinCAT router is listening to. However the ads-client itself uses next available/random TCP port to connect from, unless set excplicitly to port with localTcpPort
setting, as you have.
So if you set localTcpPort
to like 34567, and you connect to target PLC's port 48898, you need to allow communication from docker 34567 -> PLC 48898. If you don't set localTcpPort
, you need to allow all communication from docker -> PLC 48898.
Hope this message makes any sense.
from ads-client.
Hi,
Thanks for your Answer. This make sense, but it didn't work.
if i route the Port 48898/tcp (-p 48898:48898
) in to the Container, it doesn't work.
Maybe it is different what the -p
Parameter does in comparison to --network host
Parameter..
Interestingly, the node-red-contrib-ads node works without port forwarding (Nor 48898). The connection is established as soon as the route is entered on the PLC.
Is there a difference in the connection in the Lib?
from ads-client.
Interesting. What happens if you set localAdsPort and localAddress empty?
Of course these are totally different libraries. Could you share all the settings from both?
from ads-client.
Sure:
IP's are not the same, only an example how it works.
If i set localAdsPort and localAddress empty, it doesn't work. It also doesn't work in --network host
mode..
If i only leave localAddress empty, it works. Seems to be the localAdsPort is required..?
from ads-client.
Sorry.. I mean localTcpPort, not ads port. The ADS port is required as you are using Raspberry Pi without AMS router.
from ads-client.
same result:
from ads-client.
So both localAddress and localTcpPort are now empty?`
EADDRNOTAVAIL means that it can't start a connection from local interface 10.1.47.50.
https://www.google.com/search?q=eaddrnotavail+site:stackoverflow.com
from ads-client.
if both are empty, it seems to work!
Maybe, docker has a problem when localAddress is set, because of every container has it own ip.. ?
if these feelds are empty, it works, even without any port routing.
Great!
Maybe you can add this in your description..?
Thanks alot!
from ads-client.
Glad to hear! :)
The localAddress can be empty almost always. Only reason I can image is that you have many interfaces (like ethernet, wifi, etc) and you need to provide manually which one to use.
So the problem indeed was that it tried to connect using 10.1.47.50 however the was no such interface in your docker container.
I'll see if I could add this info somewhere in FAQ!
from ads-client.
Related Issues (20)
- Get events/alarms/messages from TcEventLogger HOT 3
- write variable type BOOL HOT 1
- ads-client+vite+vanillajs it's possible? HOT 5
- Subcribe to variable without PLC port 301 HOT 1
- Version 2 - Missing features from v1 HOT 9
- Version 2 - Adding support for SymbolInfo and DataType extended flags
- Version 2 - Making sure 1.4.2 and 1.4.3 updates are merged HOT 2
- Version 2 - Pull requests
- Version 2 - README
- Version 2 - MIGRATION HOT 1
- Version 2 - Documentation
- Version 2 - Finalizing types HOT 1
- Version 2 - Finalizing testing
- Version 2 - Reconnecting and handling subscriptions during reconnection and symbol version change HOT 1
- Time datatype HOT 2
- Question about subscriptions HOT 2
- Version 2 — publish pre-release version HOT 2
- (v2) TypeError in `onAdsCommandReceived` HOT 5
- Version 2 - Testing with TwinCAT 2 & TwinCAT 3 hardware
- Test with Twincat2 failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ads-client.