Matlab UDP Recieve Error
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I'm running FlightGear simulation software and output some variable data through UDP on the loopback address 127.0.0.1, port 1234. Using the SocketTest application I can see the data being received however I would like to do this through Matlab which is running on the same PC.
I've read through the following example: https://uk.mathworks.com/matlabcentral/answers/10234-recieving-udp-from-iphone
I try to run the following:
while(1)
u = udp('localhost',1234,'localport',1234);
u.InputBufferSize = 1000;
u.DatagramReceivedFcn = @localReadDatagram;
fopen(u);
end
My issue is that I always get the error: "Unsuccessful open: Address already in use: Cannot bind ", can anyone help?
Thanks, Joe
0 件のコメント
採用された回答
Walter Roberson
2016 年 10 月 31 日
You should probably use a different localport unless the receiving software insists that the transmitting port be 1234 . localport is the port number that data is transmitted from.
4 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Hardware Discovery and Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!