OpenBCI_Python user.py: access Bluetooth on Ganglion
Greetings! I recently received my Ganglion board and I am facing some problems.
I tried to access the Ganglion from the user.py file, but when I run it I get the following error message:
OSError: Cannot find OpenBCI port
The setting for the port was on auto.
Afterwards I found the bluetooth port address which is the following: /dev/bus/usb/002/004
I used user.py with -p=/dev/bus/usb/002/004
and I got another error this time:
File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/bus/usb/002/004: [Errno 13] Permission denied: '/dev/bus/usb/002/004'
I can connect to the Ganglion normally when using the OpenBCI_GUI so I'm guessing the problem is that Python can't access the Bluetooth correctly for some reason.
I tried running user.py from Windows 10 and it couldn't find the Bluetooth so I switched to Ubuntu to find the proper address but still the error persists.
The CSR driver was installed in Windows.
I am sorry for the long post.
Thanks in advance for any help!
Comments
but I get the message "Warning: Dropped 1 packets" when I type something. I'm sorry that I ask this in a different question, but how can I alter
the bluetooth adapter settings in Ubuntu? I can't seem to find something.
Thanks again!
I decided to abandon that plan for now, and switched to the node.js library.
I managed (with the help of a friend) to communicate with the board using the node.js library, and to send the data to a python script via the nanomsg library, which in turn uses the nnpy library to get the data from the node.js server.
The data is sent through tcp/ip .
If anyone would like to get the code, I'd me more than glad to send it!
Thanks again for all the help!
I have already tested the hci0/hci1 and the bluetooth is the hci1 device, which is the one I configured.
The values displayed (with "echo" or "cat") are 9 & 10.
I'll try some lower values and will send feedback!