Using oscP5 over the internet

edited January 2018 in Library Questions

Hello all, I'm currently trying to figure out how to use the ocsP5 module to communicate over the internet. I have made 2 simple client and server sketches which act as a simple shared drawing canvas. I'm not posting the code in this thread to avoid cluttering, as each one is about 70 lines even after I removed all the unessential code. They can be found here:

Server: https://pastebin.com/NgsRaLJP
Client: https://pastebin.com/L4UqD7Uw

Now the curious thing is that my code works when both are run simultaneously on my computer and the server-ip in the client is set to '127.0.0.1'. Now when I replace that with my actual IP (IPV6) and run both on the same computer a strange effect happens - the server can draw on itself and the client, while the client can only draw on itself. If I export the client to my Android phone and run it off a separate network from the server, neither client nor server can draw on each other. I have triple-checked that the server-listening-port is portforwarded through my router and that the client, when ran on Android, has the 'CHANGE WIFI MULTICAST STATE' permission enabled.

What am I doing terribly wrong? Thanks in advance!

Answers

  • Not sure why this got moved to the 'Android Mode' category - using Android was only a method of testing.

  • edited January 2018

    If I export the client to my Android phone and run it off a separate network from the server, neither client nor server can draw on each other

    Can you elaborate about your network? Like you have more than one router? Or you are trying to access your android device's IP provided by your phone company? Another test would be to run your android device (or another laptop/PC) under the same network as running both under the same wifi network. Another check to do is to use IPV4 instead of 6.... just to try to figure out if the issue is related to this setting (Not experience here working with IPV6)

    Btw, what OS are you working on?

    Kf

  • Thanks for the reply! So my network only has one router - the reason I'm exporting the client to my Android phone is so that I can use my phone's data as another network. That way I can test my code without, well, getting another router. Now the server does not know the client's IP - the server's IP is hard-coded into the client which connects to said server in setup().

    I'll run the test on the same network tomorrow (it's a tad bit late here) but thank you for the idea. Also, I'm using processing 3.3.4 on Windows 7.

    Thanks again for the reply!

Sign In or Register to comment.