Device Name and Permissions
The easiest way to identify your device is to look at the bottom of the /var/log/messages file as you plug your board in:
Among the log messages you should see one that looks like:
FTDI USB Serial Device converter now attached to ttyUSB0
This means that your GATOR Plus+ board is accessible as /dev/ttyUSB0. Specify this file name when configuring your terminal emulator program.
If you get a ‘Permission denied’ message when you try to connect to your board, it means that your user identity does not have read/write permission for the /dev/ttyUSB0 file. Either connect to your board as root or change the permissions on the file:
If, however, the /dev/ttyUSB0 file is not an actual device file but a link to the real device file, the above won’t work and you’ll have to find the name of the real device:
The target of the link (could be something like /dev/tts/USB0) is the actual device file which must be given read/write permission:
This solution is only temporary, until you disconnect your board. The next time you connect your board you will have to change the permissions again. More permanent solutions include:
- Always connect to your board as root (not recommended)
- Add your user identity to the group owner of the device file
- Configure the udev subsystem to set read/write permission for all users when the board is plugged in
To implement the second option, note the group owner of the file when you run the ‘ls -l’ command. You will see a listing like:
crw-rw---- 1 root, uucp 188, 0 May 25 2008 /dev/tts/USB0
The above indicates the device file’s owner is root and the group is uucp. Both owner and group have read/write access, but no other users do. If you add yourself to the uucp group, you will always have read/write access to the device. You can add yourself to the uucp group by editing the /etc/groups file (as root) and adding your user ID to the list of users for that group. Type ‘man 5 group’ for more details.
To implement the third option, you will have to edit the udev rules file, most likely in /etc/udev/rules.d. As root, edit the file named 50-udev.rules and find the line which has ‘ttyUSB’ on it. It may appear something like this:
KERNEL=="ttyUSB[0-9]*",NAME="tts/USB%n",SYMLINK+="%k",GROUP="uucp",MODE="0660"
Change the MODE value from “0660” to “0666” to give all users read/write permission.
|