Fixing Linux write permission for /dev/ttyUSB0
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?
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
% 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.
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.
With it, you script various things to happen, including setting permissions.
Run
sudoedit /etc/udev/rules.d/50-ttyusb.rulesand stick this in there:Save, exit and replug and you should be up and running. Setting the permission to 666 allows anybody to write to the device.