Command line interface¶
This interface is useful to debug, test connections and features. It can be used for start acquisition or simply connect to an existing one, stream markers, and storage data.
[3]:
$ openbci_cli -h
usage: openbci_cli [-h] {serial,wifi,stream,marker} ...
Command line interface for OpenBCI-Stream
optional arguments:
-h, --help show this help message and exit
Endpoint:
{serial,wifi,stream,marker}
serial Endpoint using Serial protocol
wifi Endpoint using WiFi module
stream Real-time transmission packages debugger
marker Real-time markers streamer
OpenBCI-Stream is software package developed by GCPDS
Endpoints¶
There are 4 endpoints: serial
, wifi
, stream
and marker
serial
and wifi
¶
The difference between serial
and wifi
are the options --port
and --ip
respectively, the first is used to select the serial port and the second is used for select the IP of the WiFi module. Additionally, we can use the option --output
for specifying a file to write the acquired data in format hdf5
and --command
to send commands based on the SDK documentation.
[1]:
$ openbci_cli serial -h
usage: openbci_cli [-h] {serial,wifi,stream,marker} ...
Command line interface for OpenBCI-Stream
optional arguments:
-h, --help show this help message and exit
Endpoint:
{serial,wifi,stream,marker}
serial Endpoint using Serial protocol
wifi Endpoint using WiFi module
stream Real-time transmission packages debugger
marker Real-time markers streamer
OpenBCI-Stream is software package developed by GCPDS
For example if we wan to start a stream from serial device in port /dev/ttyUSB0
with daisy module attached, streaming 250 samples per second:
[ ]:
$ openbci_cli serial --port /dev/ttyUSB0 --daisy --streaming_package_size 250
or start a stream from wifi device in IP 192.168.1.113
in marker mode without daisy module, streaming 2000 samples per second:
[ ]:
$ openbci_cli wifi --ip 192.168.1.113 -s 1000 -c ~4
the option ~4
according to the SDK is for configure the sample rate in 1000 samples per second, SAMPLE_RATE_2KSPS
is valid too:
[ ]:
$ openbci_cli wifi --ip 192.168.1.113 -s 1000 -c SAMPLE_RATE_2KSPS
stream
¶
With this option, we access to a real-time debugger to view the streaming status. We can use the option --output
for specifying a file to write the acquired data in format hdf5
.
[ ]:
$ openbci_cli stream -h
marker
¶
With this option, we enter into an interactive terminal to create and stream markers.
[ ]:
$ openbci_cli marker
[ ]:
>>>
Remote host¶
All interfaces and commands here explained can be executed from a remote host with the option --host
:
[ ]:
$ openbci_cli serial --host 192.168.1.113 --port /dev/ttyUSB0 --daisy --streaming_package_size 250
[ ]:
$ openbci_cli stream -h --host 192.168.1.113
[ ]:
$ openbci_cli marker --host 192.168.1.113