Remote connection fails (OSC TCP/IP)

213 views
Skip to first unread message

JJ M

unread,
Oct 26, 2020, 10:06:02 AM10/26/20
to Bonsai Users

Dear Bonsai users,

I intend to use Bonsai to read in raw socket info (data from a physiological recording program with remote connection capability) and write it to file for later processing, but any connection is ended prematurely. I’m using the OSC package for TCP/IP communication. Using the PuTTY client, I can confirm that my recording program establishes a remote connection and sends data. However, receiving data with Bonsai fails. It seems that a connection is initially established but prematurely closed. The “Receive message” node from OSC package requires an address to be specified (“/number”). Do I need to specify the data structure of the incoming data stream here for successful readout?

Gonçalo Lopes

unread,
Oct 26, 2020, 8:55:49 PM10/26/20
to JJ M, Bonsai Users
Hi Jo,

The OSC package requires packets to use the Open Sound Control protocol in their packet data. You can read more about it here:

If it's tricky to conform your raw data packets to this structure, there are other ways but for now they would involve writing C# scripts (not too long).

Let us know if this helps or otherwise maybe give us a bit more context on the data structure constraints from your side?

On Mon, 26 Oct 2020 at 14:06, JJ M <jo...@posteo.de> wrote:

Dear Bonsai users,

I intend to use Bonsai to read in raw socket info (data from a physiological recording program with remote connection capability) and write it to file for later processing, but any connection is ended prematurely. I’m using the OSC package for TCP/IP communication. Using the PuTTY client, I can confirm that my recording program establishes a remote connection and sends data. However, receiving data with Bonsai fails. It seems that a connection is initially established but prematurely closed. The “Receive message” node from OSC package requires an address to be specified (“/number”). Do I need to specify the data structure of the incoming data stream here for successful readout?

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/a162ed0e-cccd-4a8a-9ca2-7903e7832fe4n%40googlegroups.com.

Soh Kohatsu

unread,
Apr 26, 2022, 3:14:11 AM4/26/22
to Bonsai Users
Dear Gonçalo and Bonsai users,

I am also having difficulty in getting data read over socket (UDP).

Using the OSC package, I confirmed a successful socket connection between Bonsai and a behavior recording program (data source), however, Bonsai fails to read incoming data because the data does not conform to OSC protocol (I get an error message "An OSC packet must contain either a message or a bundle. parameter name: buffer").

In my case, it is not feasible to change the shape of the data sent out, so I need to deal with this issue on Bonsai-side. Could any of you provide more information on the C# scripts Gonçalo mentioned above? The data I need to make Bonsai read is strings that consist of a fixed number of numbers separated by commas.

I would also appreciate any inputs on other options that do not involve C# script because I have little experience in C# programming (and am only familiar with python).

Thanks in advance,



2020年10月27日火曜日 9:55:49 UTC+9 goncaloclopes:
Reply all
Reply to author
Forward
0 new messages