MATLAB: Might fopen fail on a tcpip object (127.0.0.1)

fopenInstrument Control Toolboxtcpip

t = tcpip('127.0.0.1', 9300); fopen(t); produced the error message
Unsuccessful open: Connection refused: connect

Best Answer

Several possibilities:
  1. Your firewall / antivirus is blocking the connection
  2. There is nothing listening on port 9300
  3. the connection you're trying to establish is meant to be the server , in which case you need t = tcpip(tcpip('127.0.0.1', 9300, 'NetworkRole', 'server')
  4. something else...