Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
transmiting data between 2 PC's, via____TCP/IP

Subject: transmiting data between 2 PC's, via____TCP/IP

From: Jose

Date: 11 May, 2009 15:56:02

Message: 1 of 2

Hello everyone,
i am trying to transmit data between two computers via TCP/IP, following the next link:

http://www.mathworks.com/support/solutions/en/data/1-OUCYT/

chaning the respectives IP adress and ports:

In machine B i receive this message:

Warning: A timeout occurred before the Terminator was reached.

ans =

     ''

-----this the code:

machine A




%% Define computer-specific variables
% Modify these values to be those of your first computer:
ipA = '10.66.38.225'; portA = 8080;
% Modify these values to be those of your second computer:
ipB = '10.66.38.226'; portB = 8081;

%% Create UDP Object
udpA = udp(ipB,portB,'LocalPort',portA);

%% Connect to UDP Object
fopen(udpA)

fprintf(udpA,'This is test message number one.')
fprintf(udpA,'This is test message number two.')
fprintf(udpA,'doremifasolatido')

%% Clean Up Machine A
fclose(udpA)
delete(udpA)
clear ipA portA ipB portB udpA



machine B

%% Define computer-specific variables
% Modify these values to be those of your first computer:
ipA = '10.66.38.225'; portA = 8080;
% Modify these values to be those of your second computer:
ipB = '10.66.38.226'; portB = 8081;

%% Create UDP Object
udpB = udp(ipA,portA,'LocalPort',portB);

%% Connect to UDP Object

%set(udpB,'Timeout',80)

fopen(udpB)
fscanf(udpB)

%% Clean Up Machine B
fclose(udpB)
delete(udpB)
clear ipA portA ipB portB udpB notes

Anyone can help me to solve it?

cheers, Jose

Subject: transmiting data between 2 PC's, via____TCP/IP

From: Jose

Date: 11 May, 2009 16:21:02

Message: 2 of 2

"Jose " <jose.l.vega@gmail.com> wrote in message <gu9hqi$slr$1@fred.mathworks.com>...
> Hello everyone,
> i am trying to transmit data between two computers via TCP/IP, following the next link:
>
> http://www.mathworks.com/support/solutions/en/data/1-OUCYT/
>
> chaning the respectives IP adress and ports:
>
> In machine B i receive this message:
>
> Warning: A timeout occurred before the Terminator was reached.
>
> ans =
>
> ''
>
> -----this the code:
>
> machine A
>
>
>
>
> %% Define computer-specific variables
> % Modify these values to be those of your first computer:
> ipA = '10.66.38.225'; portA = 8080;
> % Modify these values to be those of your second computer:
> ipB = '10.66.38.226'; portB = 8081;
>
> %% Create UDP Object
> udpA = udp(ipB,portB,'LocalPort',portA);
>
> %% Connect to UDP Object
> fopen(udpA)
>
> fprintf(udpA,'This is test message number one.')
> fprintf(udpA,'This is test message number two.')
> fprintf(udpA,'doremifasolatido')
>
> %% Clean Up Machine A
> fclose(udpA)
> delete(udpA)
> clear ipA portA ipB portB udpA
>
>
>
> machine B
>
> %% Define computer-specific variables
> % Modify these values to be those of your first computer:
> ipA = '10.66.38.225'; portA = 8080;
> % Modify these values to be those of your second computer:
> ipB = '10.66.38.226'; portB = 8081;
>
> %% Create UDP Object
> udpB = udp(ipA,portA,'LocalPort',portB);
>
> %% Connect to UDP Object
>
> %set(udpB,'Timeout',80)
>
> fopen(udpB)
> fscanf(udpB)
>
> %% Clean Up Machine B
> fclose(udpB)
> delete(udpB)
> clear ipA portA ipB portB udpB notes
>
> Anyone can help me to solve it?
>
> cheers, Jose

Ok, I solved the problem, i connect the ethernet wire directly from a computer to the another, and now it is working.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us