oscP5 library, sending data with network

Can you describe your setup please and the data flow that you envision happening between your different devices?

If you are getting your data from a server, via an url, then you can use loadStrings(). If you are working with computers in a local network and one computer is always feeding the data, then you can set that computer as a server by setting a local server and then stick to loadStrings() (Untested). Now, if this is done between android devices, this approach might not work. Instead, I will stick to oscP5 or websockets.

Some other topics I found online:

https://forum.processing.org/two/discussion/9090/processing-and-android-how-to-transfer-pictures

Android->PC UDP communication - Processing 2.x and 3.x Forum

If you use oscP5, notice there is a limit on the size of data on a transaction. Hence, you will need to break your file into pieces and send them one by one and stitch them together at the other end. The oscP5 also has an option to establish a TCP connection, which it would be more reliable than using the default UDP protocol. Notice I have not tested the oscP5 TCP version in android, so take my comment with a grain of salt. From what I read, suing a TCP is more convenient as the TCP should be able to handle the breaking up of the packages into the right size for you. Again, this is untested and hopefully somebody in the community can share their experiences here.

Found some other relevant posts:

Server & Client

Server->client reply

They are not a final solution unfortunately. Hopefully all these post will help with putting together a simple example.

Kf

2 Likes