You are not logged in.

#1 2010-09-14 15:50:08

lesto
Member
Registered: 2010-07-13
Posts: 115

Using Serial as user

Hello!
I need to read and write some data by serial. That was fine until last update (after at least 4 or 5 weeks), then the java GUI won't run in sudo mode. Ok, maybe it's a security issue, but in normal user mode i can't use the serial.
I've found some guide, but they give different groups to user... what's the best (or at least working) way?

Offline

#2 2010-09-14 16:30:28

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: Using Serial as user

When I've had to access the serial port, I've had to put my user in the TTY group. It's been about 4 month since I used it, so I don't know if it's changed in the meantime.


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#3 2010-09-14 17:55:43

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: Using Serial as user

isn't working... maybe is something about UDEV? because it'a a fake serial, it use USB and FTDI chip

Offline

#4 2010-09-14 18:26:37

ak-89
Member
From: Finland
Registered: 2008-08-26
Posts: 86
Website

Re: Using Serial as user

Check what are the permissions and owner group for that USB serial device file(probably /dev/ttyUSBxx). If the group is root or group is something else and has no needed permission, you have to fiddle with udev configs.

Offline

#5 2010-09-14 18:37:23

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: Using Serial as user

i don't have /dev/ttyUSBxx but /dev/bus/usb/001/001 and so on (/dev/bus/usb/002/001 ...) are all in root group, owned by root, rw for root user and group, r for others...

Offline

#6 2010-09-14 19:15:24

ak-89
Member
From: Finland
Registered: 2008-08-26
Posts: 86
Website

Re: Using Serial as user

I have usb to serial converter and udev makes /dev/ttyUSB0 device node(or symlink, I haven't checked which) automatically and sets it permissions and owner group. You probably have to make a udev rule for your usb-serial device, I have never made udev rules so I can't help more.

Last edited by ak-89 (2010-09-14 19:16:35)

Offline

#7 2010-09-14 19:39:33

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: Using Serial as user

you can copy your rule here please?
you can find the rules in some file in /etc/udev/rules.d/
i've got 75-cd-aliases-generator.rules.optional      75-persistent-net-generator.rules.optional  99-gpsd-usb.rules...
the rule is similar to
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyUSB%n"

Offline

#8 2010-09-14 19:43:10

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: Using Serial as user

ok, the code above works, but I've to be uucp group, thank everybody

Offline

#9 2010-09-14 19:52:29

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: Using Serial as user

Since I'm not in the mood to do important things, I did some googl'ing for you.

Does this help? http://forums.fedoraforum.org/showthread.php?t=91864

Offline

#10 2010-09-14 23:25:07

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: Using Serial as user

I prefer be in uucp group rather than set 0666 permission to USB, but thank you for help.

ah for who follow this "instruction": remember to do "sudo udevadm control --reload-rules"
a system reboot may still be necessary

Offline

Board footer

Powered by FluxBB