eeg-smt neuroserver, raspberry pi

Started by thoba, June 26, 2014, 03:23:15 PM

Previous topic - Next topic

thoba

Hello
To go around the problem with the USB-mouse in Windows, I installed Neuroserver on a linux system. Primary on ubuntu but it works also on Raspberry pi.
I started nsd and then eegdriver –d /dev/ttyUSB0
The data stream is running but the output in the eegdriver is  endless repetitive

tb@HP-NB-ubuntu:~$ sudo modeegdriver -d /dev/ttyUSB0
ModEEG Driver v. 0.7.4-Linux
Attempting to connect to nsd at localhost:8336
Connecting to localhost at 127.0.0.1:8336
Recieved error code 0 from placeCode 0.  errstr is <unknown unix:0> and descPlace is connect
Socket connected.
Serial port /dev/ttyUSB0 opened.
Polling at 256 Hertz or 3906 usec
Serial packet sync error -- missed window.
Serial packet sync error -- missed window.
Warning: invalid serial packet ahead!
Serial packet sync error -- missed window.
Warning: invalid serial packet ahead!
Serial packet sync error -- missed window.
Serial packet sync error -- missed window.
Serial packet sync error -- missed window.


Is there a wrong configuration in nsd or eegdriver, or some options to set in /dev/ttyUSB0?
Baud rate 57600, Data Bits 8, Stop bits 1, Parity ? Handshake ?

Does modeegdriver set the options ?


Regards, Thomas

thoba

#1
Hi all
Found solution :-)

Check /dev/ttyUSB0

sudo stty -F /dev/ttyUSB0 -a
speed 57600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke


Problem
icrnl, ixon, echoctl, echoke are on, must be off

Solution
switch off Options icrnl, ixon, echoctl, echoke

Command

sudo stty -F /dev/ttyUSB0 -icrnl -ixon -echoctl -echoke

Result

neuroserver and modeegdriver are working. Tried it with Brainbay

Comment

In my application the interface to eeg-smt is connected to Raspberry pi (battery powered). The modeegdriver runs on raspberry pi with a wlan adapter. The neuroserver can be started from Brainbay in Windows or on raspberry pi.

regards Thomas