Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection problem Ubuntu #8

Open
alexarje opened this issue Jan 8, 2018 · 2 comments
Open

Connection problem Ubuntu #8

alexarje opened this issue Jan 8, 2018 · 2 comments

Comments

@alexarje
Copy link

alexarje commented Jan 8, 2018

So when I try to run python3 myo_to_osc.py on Ubuntu 17.10, I get the following error:

available BT adapter: /dev/ttyACM0
Traceback (most recent call last):
File "/home/alexanje/.local/lib/python3.6/site-packages/serial/serialposix.py", line 265, in > open
> self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
PermissionError: [Errno 13] Permission denied: '/dev/ttyACM0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "myo_to_osc.py", line 60, in
> m = Myo() # scan for USB bluetooth adapter and start the serial connection automatically
File "/home/alexanje/github/myo-to-osc/myo/init.py", line 58, in init
> self.bt = BT(tty, baudrate=115200)
File "/home/alexanje/github/myo-to-osc/myo/bluetooth.py", line 70, in init
> self.ser = serial.Serial(port=tty, baudrate=baudrate, dsrdtr=1)
File "/home/alexanje/.local/lib/python3.6/site-packages/serial/serialutil.py", line 240, in > init
> self.open()
File "/home/alexanje/.local/lib/python3.6/site-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/ttyACM0: [Errno 13] > Permission denied: '/dev/ttyACM0'

Turns out to be a permission problem. There are some non-ideal solutions here. To be able to continue testing, I opted for doing sudo chmod 666 /dev/ttyACM0 for now, but this will have to be done every time the dongle is inserted.

@alexarje
Copy link
Author

alexarje commented Jan 8, 2018

Doing the above works, though, so now I am connected!

screenshot from 2018-01-08 13-58-02

@cpmpercussion
Copy link
Owner

Interesting - I haven't checked the permissions of serial ports in Ubuntu, but looking at that SO thread suggests that such serial ports are part of the group dialout, so if you added yourself to that group you would have RW access to /dev/ttyACM0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants