I have developed a Modbus Server and is listening on port 502.
I have added the INPUT rule for the tcp protocol, port etc.
I have also added sometimes an output rule
Then I have put all in ACCEPT policies. INPUT, FORWARD and OUTPUT…like “iptables -P INPUT ACCEPT” and so on. But it still does not work.
I can establish connection with 502 port when I acces vía USB ECM, iptables works fine when is related to usb ecm interface, but it seems that does not take effect when is related to rmnet0 interface
I have tried with almost 3 WP85 different modules.
I have 2 SIM cards with public and static IP, this lines are working fine in a Sierra Wireless OpenAT Q26 module with a similar Modbus/TCP server. So the problem is not the data connection
WP85 are getting the static IP, and I can send and receive data if I start comunication from WP85. But it is imposible to reach 502 port from outside, only via usb ecm
it is communicating with your server → this is TCP client only.
But you are now holding a TCP server on port 502 on module, so there is chance that the network blocks this port 502, or the IP address is not exposing to public.
BTW, have you tried other port like 80 or 21?
Can your PC ping the module’s pubic IP address?
My TCP Server is running and accepting conncections via USB ECM.
I´ve compared my code with fwupdate and is almost the same, with identical config FLAGS…etc
I have put this rule iptables -I INPUT -j ACCEPT, but there is no way.
I still cannot ping via rmnet0
I´m going to try nc application, it´s pretty interesting