Fixing Linux write permission for /dev/ttyUSB0

kzzkzz
edited August 2016 in OpenBCI_GUI
I've been following the tutorial at
http://docs.openbci.com/tutorials/01-GettingStarted . It went smoothly
until I reached
http://docs.openbci.com/tutorials/01-GettingStarted#getting-started-w-openbci-iv-connect-to-your-openbci-board-from-the-gui-7-press-start-system

At that point, both the dongle and 32-bit board have a solid blue light, and the switch on each is in the position described in the tutorial. After configuration and pressing 'start system', the console says:

OpenBCI_ADS1299: openSerialPort: attempting to open serial port /dev/ttyUSB0
OpenBCI_ADS1299: j
OpenBCI_GUI: initSystem: -- Init 3 --
OpenBCI_GUI: initializeGUI: 1
OpenBCI_GUI: initializeGUI: 2
Gui_Manager: Buttons: 102, 132
ChannelController: createChannelSettingButtons: creating channel setting buttons...
OpenBCI_GUI: initializeGUI: 3
OpenBCI_GUI: initializeGUI: 4
OpenBCI_GUI: initializeGUI: 5
OpenBCI_GUI: initializeGUI: 6
OpenBCI_GUI: initSystem: -- Init 4 --
openBCI: openNewLogFile: opened output file: SavedData/OpenBCI-RAW-2016-01-09_22-29-28.txt
Playground: isMouseInButton: attempting

Notably, I never see "“Initializing communication w/ your OpenBCI board." The help line always says "openBCI: openNewLogFile: opened output file: SavedData/OpenBCI-RAW-2016-01-09_22-29-28.txt".

The device name appears to be the correct one - dmesg says:
[ 1399.490897] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 1399.490998] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
[ 1399.491086] usb 1-1: Detected FT-X
[ 1399.491629] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0


Configuration details:
OpenBCI 32-bit Board Kit (chipKIT™-compatible, purchased in 2014)
OpenBCI processing from GitHub:  cc76d25fc7528657ff8704489792532cf78e9e68 (the latest)
Processing 3.0.1 for 64-bit Linux

I have followed all the advice under troubleshooting. Any ideas?

Comments

  • Resolved: it was a permissions problem.
    % ls -lh /dev/ttyUSB0
    crw-rw---- 1 root dialout 188, 0 Jan  9 22:44 /dev/ttyUSB0

    After adding my user to the dialout group, it works.
  • I used 'sudo usermod -a -G dialout [user]' to add my user to the 'dialout' group, but that still gave me the error message "[Errno 13] Permission denied: '/dev/ttyUSB0' ".

    Then I used 'sudo chmod 666 /dev/ttyUSB0' to add 'rw_' for all users. That did the trick for me, the user.py program is now running correctly.
  • this is how my problem solved was solved :
    With it, you script various things to happen, including setting permissions.

    Run sudoedit /etc/udev/rules.d/50-ttyusb.rules and stick this in there:

    KERNEL=="ttyUSB[0-9]*",NAME="tts/USB%n",SYMLINK+="%k",GROUP="uucp",MODE="0666"
    

    Save, exit and replug and you should be up and running. Setting the permission to 666 allows anybody to write to the device.

  • wjcroftwjcroft Mount Shasta, CA
    On Ubuntu, the simplest way to resolve the permissions problem, is to add yourself to the 'dialout' user group.

    $ ls -l /dev/ttyU*
    crw-rw---- 1 root dialout 188, 0 Jun 12 13:28 /dev/ttyUSB0
    $ sudo adduser yourusername dialout

    For the group change to take effect the first time, you need to log out and back in again.
  • aarohi1510001aarohi1510001 Ghaziabad, Delhi
    What if the GUI recognizes the dongle only once and not anytime thereafter? Even though the blue light appears on both the components but it never says system is up in ubuntu 16.04?
  • Carrie22Carrie22 United States
    Is there a solution for running on windows?? 
Sign In or Register to comment.