Giter Club home page Giter Club logo

Comments (6)

SciFiDryer avatar SciFiDryer commented on July 19, 2024

Usually this situation arises when the application is run without privileges to bind to port 502 or another application has already bound itself. You can start the application with the debug argument "java -jar ModbusMechanic.jar -debug" from the ModbusMechanic directory to see verbose debugging information. Another helpful command to run is "netstat -an" to see if anything is listening on port 502. Look for LISTENING on the netstat list under port 502.

If another application has already bound itself to port 502, ModbusMechanic will not be able to start a TCP slave simulator. You may have already tried this but can you connect to your Ethernet or WiFi IP?

Iptables or firewall rules can also cause packets to be dropped. I like to use tcpdump for verifying packet flow.

from modbusmechanic.

Pratched avatar Pratched commented on July 19, 2024

Thanks for your quick response.

So I tried with -debug, of course again with sudo and it just says, that no bytes have been received.
image

I tried (with root privileges) netstat -an | grep 502 respectively netstat -an | grep LISTENING, neither show any significant entrys.

When you say connecting to WiFi or Ethernet IP you mean trying to enter my wifi interface's , i.e. inet 192.168.178.68 in the IP field within ModbusMechanic?

EDIT: The following shows merely the Master's ModbusTCP request but no response:
image

from modbusmechanic.

SciFiDryer avatar SciFiDryer commented on July 19, 2024

I was able to reproduce this exact error and it turns out there was a typo in my code. The simulator slave ID was hardcoded to always be 1 so it was not answering on 3. This is fixed in 06df4d7 and version 2.4 which is now available. Thanks for your feedback and data, it looks like the typo had been overlooked for a while.

from modbusmechanic.

Pratched avatar Pratched commented on July 19, 2024

Ah that is very good to hear. Was thinking to try SlaveID 1, as 3 is needed for my Hardware but good on you figuring this out. Cheers!

However, the version I used to stumble upon this issue came from the .zip file linked to here, respectively this one (v2.4 via this way works great!).
However I went ahead and cloned the entire project to my local machine after your fix today and tried installing or launching it with linuxlauncher.sh. Neither worked (I am running KDE Plasme 5), as it created the respective .desktop when installing, I had to make it executable. But whenever trying to launch it nothing happens.
Not much of a bash semi-professional, but maybe it doesnt find the correct .jar? At least its not in that directory.

from modbusmechanic.

SciFiDryer avatar SciFiDryer commented on July 19, 2024

Not sure I follow on the link. The link from the other website just links to the most recent release - it would have been 2.3 yesterday. As soon as 2.4 was posted it would be 2.4.

If you are cloning the project as opposed to launching the binary from the jar, the binaries will need to be built. I build them with the NetBeans IDE. When NetBeans builds the binaries, they go to the dist subdirectory, so this could be why. If the project is cloned but not built no jar file will exist.

from modbusmechanic.

Pratched avatar Pratched commented on July 19, 2024

Yeah didnt explain that to well, doesnt matter however.

Thanks for clearing things up. Everything works well!

from modbusmechanic.

Related Issues (19)

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.