Here you can download the recompiled version of ScenePlayer including some additional externals (see README.txt for the list), together with a simple example of communication between a computer and a mobile phone.

http://www.csc.kth.se/~dubus/Android/NetTest.zip

In this example, the phone sends some accelerometer data to a [tcpserver] in the patch running on the computer, and uses values received from the computer to control a [osc~].

Regards,
Gaël


On 3/6/12 11:52 AM, berenger recoules wrote:


2012/2/29 Gaël Dubus <dubus@kth.se>

Hi,
I am facing kind of the same problem with ScenePlayer on Android.

For some time ago, I wanted to make another phone application communicate with ScenePlayer. My idea was to inject the data into ScenePlayer via localhost using networking utilities of Pd. For this purpose, I recompiled ScenePlayer including externals from the mrpeach library, then I tried several configurations in order to test the different network protocols between the phone and my computer. 

My conclusion is that there is only one way to have a working bidirectional data exchange: [tcpclient] on the phone and [tcpserver] on the computer. In all the other configurations (simple [netsend]/[netreceive] or [tcpsend]/[tcpreceive] for example) it was possible to send data from phone to computer but not from computer to phone. When I tried to invert the working configuration (putting a [tcpserver] on the phone), the following happened: the [tcpclient] on the computer seemed to be connected (outlet 2 was set to 1) but could not send (nor receive) any data to the phone.

Unfortunately, this does not enable me to have a direct connection between an external mobile application and ScenePlayer as I had hoped. I gave up momentarily with the idea of using network utilities, but I think that this is a question of interest for people working with Pd on Android: is there a reason for incoming TCP and UDP streams to be blocked?

Could you share you recompiled version of the ScenePlayer  with mrpeach ? I would like to see if I could reproduce your observations, and establish communication between two phones.

Cheers

Bérenger


 

Cheers
-- 
Gaël Dubus
Ph. D. student at KTH, Speech, Music and Hearing
Lindstedtsv. 24
S-10044	 Stockholm (Sweden)
Mobile:  	+46(0)76 096 3411
Office:		+46(0)8 790 7577
Fax:	 	+46(0)8 790 7854