psychopy.org | Reference | Downloads | Github

EGI netstation connect problem?

Hello,

I’m trying to use Psychopy egi library to send behavioral data to the machine with netstation. I already have the code setup, and as I am trying to test it out, it gives me an error at ns.BeginSession(), self._socket.write( message ).

I’m assuming first that my ns.connect(IP address, port number) was not entered correctly. So just to double check, is it correct to insert the IPv4 address of the machine with net station? And for the port, I found three Open TCP Port 9877, 9878, and 9879 using the Port Scan feature in Network Utility. I tried putting all three ports, but all returned error.

So, I wasn’t sure which port number I should be using, or what the differences were. Any help/pointer would be appreciated!

Also, is there any detailed tutorial/basics about sending signals from psychophysics testing machine to the netstation machine?

You need to provide the actual error messages.

Hello Michael,

Oops, yes. Below is the error I get:

File "/Users/abc/Documents/PsychoPy/cfv/cfv_egi.py", line 281, in ns.BeginSession() 

File "/Users/abc/Documents/PsychoPy/cfv/egi/simple.py", line 799, in   BeginSession self._socket.write( message ) 

File "/Users/abc/Documents/PsychoPy/cfv/egi/socket_wrapper.py", line 58, in write self._connection.write( data )
AttributeError: Socket instance has no attribute '_connection' 6.9777 WARNING 

When I change the port to another one with a server, it gives me the below:

Traceback (most recent call last): File    
"/Users/abc/Documents/PsychoPy/cfv/cfv_egi.py", line 281, in   
ns.BeginSession() 

File "/Users/abc/Documents/PsychoPy/cfv/egi/simple.py", line 804, in BeginSession return self.GetServerResponse() 

File "/Users/abc/Documents/PsychoPy/cfv/egi/simple.py", line 783, in GetServerResponse 
raise Eggog( "unexpected character code returned from server: '%s'" % (code, ) ) 
egi.simple.Eggog: unexpected character code returned from server: 'R'