Thread Subject: how to 'listen' in matlab by tcp ip

Subject: how to 'listen' in matlab by tcp ip

From: dong doudou

Date: 19 Jun, 2008 13:56:02

Message: 1 of 6

I have a a client that sends data every 1 second.I want to
monitor this data uing matlab and TCP/IP .
But unfortunetly Matlab doesn't have "listen"
function.so MATLAB can't play the rule of a server
What can I do for this problem?
All suggestion welcomed!!!!!!

Subject: how to 'listen' in matlab by tcp ip

From: hassan.slim

Date: 19 Jun, 2008 14:18:58

Message: 2 of 6

On Jun 19, 3:56 pm, "dong doudou" <dodo.d...@163.com> wrote:
> I have a a client that sends data every 1 second.I want to
> monitor this data uing matlab and TCP/IP .
> But unfortunetly Matlab doesn't have "listen"
> function.so MATLAB can't play the rule of a server
> What can I do for this problem?
> All suggestion welcomed!!!!!!

Matlab can't act as a server in TCP/IP connection, it only acts as a
client. but u can use a toolbox provided by Matlab central file
exchange under the name of 'TCP/UDP/IP Toolbox 2.0.6'.

u can find it in this link.
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=345&objectType=file

It works fine for my case
I hope it will help u!!

Regards,
Has

Subject: how to 'listen' in matlab by tcp ip

From: dong doudou

Date: 19 Jun, 2008 14:37:01

Message: 3 of 6

thanks very much and for your patience, i will try it.


"hassan.slim" <skymoon.h2s@googlemail.com> wrote in message
<c7c8563c-0f1c-44d1-ba16-
f21ddb9bf09e@m3g2000hsc.googlegroups.com>...
> On Jun 19, 3:56 pm, "dong doudou" <dodo.d...@163.com>
wrote:
> > I have a a client that sends data every 1 second.I want
to
> > monitor this data uing matlab and TCP/IP .
> > But unfortunetly Matlab doesn't have "listen"
> > function.so MATLAB can't play the rule of a server
> > What can I do for this problem?
> > All suggestion welcomed!!!!!!
>
> Matlab can't act as a server in TCP/IP connection, it
only acts as a
> client. but u can use a toolbox provided by Matlab
central file
> exchange under the name of 'TCP/UDP/IP Toolbox 2.0.6'.
>
> u can find it in this link.
>
http://www.mathworks.com/matlabcentral/fileexchange/loadFile
.do?objectId=345&objectType=file
>
> It works fine for my case
> I hope it will help u!!
>
> Regards,
> Has

Subject: how to 'listen' in matlab by tcp ip

From: Dave Bell

Date: 19 Jun, 2008 19:36:06

Message: 4 of 6

hassan.slim wrote:
> On Jun 19, 3:56 pm, "dong doudou" <dodo.d...@163.com> wrote:
>> I have a a client that sends data every 1 second.I want to
>> monitor this data uing matlab and TCP/IP .
>> But unfortunetly Matlab doesn't have "listen"
>> function.so MATLAB can't play the rule of a server
>> What can I do for this problem?
>> All suggestion welcomed!!!!!!
>
> Matlab can't act as a server in TCP/IP connection, it only acts as a
> client. but u can use a toolbox provided by Matlab central file
> exchange under the name of 'TCP/UDP/IP Toolbox 2.0.6'.
>
> u can find it in this link.
> http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=345&objectType=file
>
> It works fine for my case
> I hope it will help u!!
>
> Regards,
> Has
We needed server capability, and were also surprised to find it was
unavailable.
(This was for a Matlab-to-Matlab connections on separate machines in a
cluster.)
I did try a couple of approaches from the file exchange and in Java, but
neither seemed to be a complete implementation for what we needed.
I finally ended up creating a "bent pipe" server in another program
(LabVIEW in this case), letting both Matlabs connect to separate ports
on the comm server, which would then pass data through.
Inelegant, but it worked...

Dave

Subject: how to 'listen' in matlab by tcp ip

From: Luke

Date: 6 Nov, 2008 05:43:02

Message: 5 of 6

Dave Bell <dbell@TheSPAMFREEBells.net> wrote in message <0zy6k.3661$cW3.1100@nlpi064.nbdc.sbc.com>...
> hassan.slim wrote:
> > On Jun 19, 3:56 pm, "dong doudou" <dodo.d...@163.com> wrote:
> >> I have a a client that sends data every 1 second.I want to
> >> monitor this data uing matlab and TCP/IP .
> >> But unfortunetly Matlab doesn't have "listen"
> >> function.so MATLAB can't play the rule of a server
> >> What can I do for this problem?
> >> All suggestion welcomed!!!!!!
> >
> > Matlab can't act as a server in TCP/IP connection, it only acts as a
> > client. but u can use a toolbox provided by Matlab central file
> > exchange under the name of 'TCP/UDP/IP Toolbox 2.0.6'.
> >
> > u can find it in this link.
> > http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=345&objectType=file
> >
> > It works fine for my case
> > I hope it will help u!!
> >
> > Regards,
> > Has
> We needed server capability, and were also surprised to find it was
> unavailable.
> (This was for a Matlab-to-Matlab connections on separate machines in a
> cluster.)
> I did try a couple of approaches from the file exchange and in Java, but
> neither seemed to be a complete implementation for what we needed.
> I finally ended up creating a "bent pipe" server in another program
> (LabVIEW in this case), letting both Matlabs connect to separate ports
> on the comm server, which would then pass data through.
> Inelegant, but it worked...
>
> Dave
what about echotcpip ? That starts a server in Matlab.

Subject: how to 'listen' in matlab by tcp ip

From: Ankit Desai

Date: 6 Nov, 2008 21:29:01

Message: 6 of 6

"Luke " <nowhere@nowhere.com> wrote in message <geu056$p8o$1@fred.mathworks.com>...
> Dave Bell <dbell@TheSPAMFREEBells.net> wrote in message <0zy6k.3661$cW3.1100@nlpi064.nbdc.sbc.com>...
> > hassan.slim wrote:
> > > On Jun 19, 3:56 pm, "dong doudou" <dodo.d...@163.com> wrote:
> > >> I have a a client that sends data every 1 second.I want to
> > >> monitor this data uing matlab and TCP/IP .
> > >> But unfortunetly Matlab doesn't have "listen"
> > >> function.so MATLAB can't play the rule of a server
> > >> What can I do for this problem?
> > >> All suggestion welcomed!!!!!!
> > >
> > > Matlab can't act as a server in TCP/IP connection, it only acts as a
> > > client. but u can use a toolbox provided by Matlab central file
> > > exchange under the name of 'TCP/UDP/IP Toolbox 2.0.6'.
> > >
> > > u can find it in this link.
> > > http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=345&objectType=file
> > >
> > > It works fine for my case
> > > I hope it will help u!!
> > >
> > > Regards,
> > > Has
> > We needed server capability, and were also surprised to find it was
> > unavailable.
> > (This was for a Matlab-to-Matlab connections on separate machines in a
> > cluster.)
> > I did try a couple of approaches from the file exchange and in Java, but
> > neither seemed to be a complete implementation for what we needed.
> > I finally ended up creating a "bent pipe" server in another program
> > (LabVIEW in this case), letting both Matlabs connect to separate ports
> > on the comm server, which would then pass data through.
> > Inelegant, but it worked...
> >
> > Dave
> what about echotcpip ? That starts a server in Matlab.

You can try udp for MATLAB to MATLAB communication.

A udp port binding will get data from one machine to other.

Create a udp object, on one machine, with remote port RXXX and local port LXXX and create another udp object, on second machine, with remote port LXXX and local port RXXX.

-Ankit

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
udp Ankit Desai 6 Nov, 2008 16:30:24
tcpip dong doudou 19 Jun, 2008 10:02:40
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com