Modbus TCP/IP localhost

13 views (last 30 days)
M on 11 Oct 2018
Answered: M on 14 Nov 2018
I would like to set up a modbus communication using TCP/IP.
In order to test it, I wanted to set the communication between two Matlab sessions on the same computer and set up the communication using local IP address.
To do so, I tested the following:
m = modbus('tcpip', 'localhost');
m = modbus('tcpip', '');
but in both case I get the following error:
Error using modbus (line 96)
Requested transport resource is either in use or does not exist. Unsuccessful open: Connection refused (Connection
Is it related to a configuration that I have not done on my computer or is it impossible to set up such a communication?
Thanks for your help.
M on 14 Nov 2018
This was indeed a firewall issue. Thanks for your help.

Sign in to comment.

Accepted Answer

M on 14 Nov 2018
This was a firewall issue. Ubuntu has a built-in firewall that one can deactivate using this solution:

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by