Receiving data by TCP or UDP is not working
4 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm trying to establish a TCP/IP or UDP/IP connection to a Muse headband and it's not working. I've already tried turning off my Firewall. Muse Direct states that through UDP via the I.P. 127.0.0.1 and port 7000 the headband is sending data. In theory by running the following code I'm able to receive the data, but it states "Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period." Can anybody guide me or tell me what I'm doing wrong?
echoudp('on',7000)
u = udp('127.0.0.1',7000);
fopen(u)
a = fread(u,1); %It has a 1 to just check if I'm receiving data
2 个评论
Guillaume
2018-11-12
@Gal, it's unlikely that it's exactly the same issue, so please start your own questions giving as many details as possible about your problem. The more details you give (code, error messages, what you've tried, etc.) the more likely we can solve your issue.
In the above question, the problem is obvious, 127.0.0.1 is always the address of the local host, so Fernando was listening to himself instead of his hardware.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!