Sending triggers to NetStation - Error 10051: "A socket operation was attempted to an unreachable network"

Continuing the discussion from Egi library and python3:

Hi! I am stuck trying to establish a connection between the Psychopy stimulus presentation computer and the EEG recording computer (Mac) running EGI Netstation Acquisition.
I have used the code suggested in GitHub by @gstothart as follows:

##set up connection
from egi import simple as egi
ms_localtime = egi.ms_localtime
ns = egi.Netstation()
ns.connect(‘10.10.10.42’, 53239) → my mac IP address and port address
ns.BeginSession()
ns.sync()
ns.StartRecording()

##send trigger
ns.sync()
ns.SendSimpleTimestampEvent()

##close up NS
ns.StopRecording()
ns.EndSession()

However, I always get Error 10051: “A socket operation was attempted to an unreachable network”.

How can I work it out?

Many thanks

Hi, I have given up on EGI and bought a BrainProducts system instead, sorry I can’t be more help!
George

Can you try to execute the following in the command prompt (assuming Windows) on the stimulus computer:

ping 10.10.10.42

This would verify that your PsychoPy computer at least ‘sees’ the recording computer.

Have you done any special network configuration in addition to just executing the code that you mention? Usually for these computers to interact this way over a local network you need to configure the Ethernet connection explicitly (see this link). This would usually give an ip that looks like ‘192.168.x.x’.

I have no experience with the EGI Netstation so I might also totally be on the wrong track here :slight_smile:

Best,
Christophe

Hello Cristophe,

I am having the exact similar problem and I tried the ping 10.10.10.42 code and it seems that the transmit failes from the stimulus computer to the recording computer. But I do not have ethernet connection so I don’t know if this can create a problem as well. Any suggestion possible?

Thank you in advance,
Ana