Giter VIP home page Giter VIP logo

Comments (9)

jisotalo avatar jisotalo commented on September 25, 2024

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.

hbTecAG avatar hbTecAG commented on September 25, 2024

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.

jisotalo avatar jisotalo commented on September 25, 2024

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.

hbTecAG avatar hbTecAG commented on September 25, 2024

Sure:

image
image

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.

jisotalo avatar jisotalo commented on September 25, 2024

Sorry.. I mean localTcpPort, not ads port. The ADS port is required as you are using Raspberry Pi without AMS router.

from ads-client.

hbTecAG avatar hbTecAG commented on September 25, 2024

same result:

image

from ads-client.

jisotalo avatar jisotalo commented on September 25, 2024

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.

hbTecAG avatar hbTecAG commented on September 25, 2024

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.

jisotalo avatar jisotalo commented on September 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.