Alternative server to access Muse 2 EEG headset's OSC data stream in web applications
usage: osc-to-ws.py [-h] [--udp-port UDP_PORT] [--ws-port WS_PORT]
[--stats-interval STATS_INTERVAL] [--debug]
[--forward-ports FORWARD_PORTS [FORWARD_PORTS ...]]
UDP to WebSocket Bridge for 16-bit Float Streams
options:
-h, --help show this help message and exit
--udp-port UDP_PORT UDP port to listen on (default: 12345)
--ws-port WS_PORT WebSocket port to serve on (default: 8080)
--stats-interval STATS_INTERVAL
Statistics reporting interval in seconds (default: 10)
--debug Enable debug logging
--forward-ports FORWARD_PORTS [FORWARD_PORTS ...]
Should we forward UDP data to other ports (comma-separated
list)?
For example, if your OSC stream is being send to port 5392 from the Muse mobile app, and you want to serve it via websocket at port 8080, you do the following
python osc-to-ws.py --udp-port 5392 --ws-port 8080
In addition, you can also forward the UDP stream to additional ports where Muselab or other applications can read it.
python osc-to-ws.py --udp-port 5392 --ws-port 8080 --forward-ports 5393 5394