Borrar filtros
Borrar filtros

How to solve "Unsuccessful read: tcpip Timeout"

5 visualizaciones (últimos 30 días)
MD
MD el 7 de Mzo. de 2019
Respondida: Pruthvi Muppavarapu el 11 de Mzo. de 2019
Hello, everybody,
I have a Matlab (R2018a) error or a warning I'm desperate for right now. I want to send a message (or command) via TCP/IP to a server and then read the answer again. I do this as follows:
write1= '<Commandxyz/>';
write2 = '<Command123/>';
t = tcpip('172.31.1.1xx', 61xx);
pause(2)
fopen(t);
pause(2)
fprintf(t, write1);
pause(2)
read1=fscanf(t, '%s')
fprintf(t, write2);
pause(2)
read2=fscanf(t, '%s')
pause(2)
fclose(t);
delete(t);
clear t
Sometimes the transfer works but in most cases I get the following warning and an empty array back:
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached.
'tcpip' unable to read all requested data. For more information on possible reasons, see TCPIP Read Warnings.
Does anyone have any idea how I can get this problem solved? I have tried to insert pauses everywhere but that didn't help either.
Thank you very much!

Respuestas (1)

Pruthvi Muppavarapu
Pruthvi Muppavarapu el 11 de Mzo. de 2019
The following link addresses the possible causes of error and a way to resolve them:
Hope this answers your query.

Categorías

Más información sobre Install Products en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by