I have a robot from which I can send data to my C++ program over UDP on the LAN.
Now I want to send those same data (live) to Mathematica to have a live Graphical Representation of my sensor values.
Is it possible?
When I try to instantiate a Socket using the network loopback adapter (no matter what port I use) I get the below error:
In[6]:= socket = SocketConnect["127.0.0.1:8996"]
During evaluation of In[6]:= SocketConnect::connrefused: Connection refused by host 127.0.0.1, port 8996, during SocketConnect[127.0.0.1:8996]. >>
Out[6]= $Failed
or
In[8]:= socket = SocketConnect["192.168.1.77:8996"]
During evaluation of In[8]:= SocketConnect::connrefused: Connection refused by host 192.168.1.77, port 8996, during SocketConnect[192.168.1.77:8996]. >>
Out[8]= $Failed
UDP itself is a very simple networking protocol, but if I cannot even get a socket to read from then I am not sure what to do with the SocketConnect[] function. It seems to work fine to connect to website on port 80 so why can’t I get a socket object locally? By the way I tried to turn off Norton just to make sure that was not interfering with the code but the result was exactly the same so my AV has nothing to do with the issue.
Please help, some code samples would be nice as there is literally nothing in terms of Code Sample or Tutorial, not even in the form of a community contributed UDP Networking example.
Thank you.