LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2006, 11:08 PM   #1
joegumbo
Member
 
Registered: Sep 2006
Distribution: MX-16 Modified using TDE
Posts: 239

Rep: Reputation: 32
/dev/ttyUSB0 permissions


Hi,

I'm trying to sync my Palm in Slackware 10.2. I "think" I have most issues worked out. (I've installed Pilot-Link and JPilot.) The hang up seems to be on my permissions. When I try to connect through ttyUSB0, I get a message in console "Permission Denied." I tried logging in as root, chmod +x /dev/ttyUSB0, then opening another console tab and starting JPilot...I still get "Permission Denied."

Thanks,
_Joe
 
Old 10-05-2006, 11:13 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
+x = execute
+w = write
+r = read
 
Old 10-06-2006, 09:09 AM   #3
joegumbo
Member
 
Registered: Sep 2006
Distribution: MX-16 Modified using TDE
Posts: 239

Original Poster
Rep: Reputation: 32
When I use +r, I get "No such file or directory." But, when I press the "Sync" button on my palm pilot, I receive the following output:

root@localhost:~# !34
tail -f /var/log/messages
Oct 7 10:01:29 localhost kernel: usb.c: registered new driver serial
Oct 7 10:01:29 localhost kernel: usbserial.c: USB Serial support registered for Generic
Oct 7 10:01:29 localhost kernel: usbserial.c: USB Serial Driver core v1.4
Oct 7 10:01:29 localhost kernel: usbserial.c: USB Serial support registered for Handspring Visor / Treo / Palm 4.0 / Clié 4.x
Oct 7 10:01:29 localhost kernel: usbserial.c: Handspring Visor / Treo / Palm 4.0 / Clié 4.x converter detected
Oct 7 10:01:29 localhost kernel: usbserial.c: Handspring Visor / Treo / Palm 4.0 / Clié 4.x converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
Oct 7 10:01:29 localhost kernel: usbserial.c: Handspring Visor / Treo / Palm 4.0 / Clié 4.x converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
Oct 7 10:01:29 localhost kernel: usbserial.c: USB Serial support registered for Sony Clié 3.5
Oct 7 10:01:29 localhost kernel: usbserial.c: USB Serial support registered for Sony Clié 5.0
Oct 7 10:01:29 localhost kernel: visor.c: USB HandSpring Visor, Palm m50x, Treo, Sony Clié driver v1.7

I admit I'm lost here. In other distros, I simply used /dev/ttyUSB0 or /dev/ttyUSB1 or /dev/ttyUSBwhatever and everything worked just fine. I've tried every possible combo I can think of with this, and I still cannot get this to link with either JPilot or KPilot.

-Joe
 
Old 10-06-2006, 09:25 AM   #4
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
As root run chmod 666 /dev/ttyUSB0 and/or ttyUSB1. If your using a 2.6 kernel with udev you should make a rule to do this during detection. And, if you need, I could post mine for you to use as a model.
 
1 members found this post helpful.
Old 10-06-2006, 10:46 AM   #5
joegumbo
Member
 
Registered: Sep 2006
Distribution: MX-16 Modified using TDE
Posts: 239

Original Poster
Rep: Reputation: 32
Hi dracolich!

That absolutely did it. I can sync now.

Thank you!
-Joe




Hi gbonhevi!

I didn't know about +r and +w. I'll make a note of it.

Thanks,
-Joe
 
Old 10-06-2006, 07:56 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
In case anyone ends here, the letters are actually a "wrap" for the numbers, they do the same thing.
1 = +x = execute
2 = +w = write
4 = +r = read

3 = 1 + 2 = +xw = execute + write
5 = 1 + 4 = +xr = execute + read
6 = 4 + 2 = +wr = write + read
7 = 1 + 2 + 4 = +xwr = execute + write + read

I guess you get the point

And if you are not on the subjects of permission, you may wonder why a 6 three times?
The first number belongs to the user owning the file, the second to the group the file belongs to, and the third to other users.
So with chmod 666 /dev/ttyUSB0 you gave that file read and write permissions to everyone, the owner, the group and other users.

What you did, was to give that file write and read permissions which is what the program needs to be able to sync with your Palm.

Last edited by gbonvehi; 10-06-2006 at 07:58 PM.
 
Old 03-11-2013, 05:23 PM   #7
neil bradshaw
LQ Newbie
 
Registered: Mar 2013
Location: Harare, Zimbabwe, Africa
Distribution: Ubuntu 12.10
Posts: 1

Rep: Reputation: Disabled
USB to serial in UBUNTU

I just went though the process and wrote a procedure as I went. So all the information is all in one place if you need to find it.
I am using Ubuntu 12.10 and needed to use a Mercer USB to serial device which uses the common prolific PL2303 chip-set for USB to serial conversion - (it won't work on windows machines for more than five minutes before windows decides to change the driver and then it won't work anymore - can't un-install or go back, windows some how gets fixated on not making it work any more!)

Neils USB to serial procedure in Ubuntu

linking the serial to the USB didn't work for me --- sudo ln -s /dev/ttyUSB0 /dev/ttyS0


To get prolific USB to serial working on Ubuntu
1. plug in (Ubuntu seemed to have the driver already?? so no work here and it wasn't me either)
2. term->dmseg and check the prolific is OK on dev/ttyUSB0 and I quote from my term:
[40147.546268] USB Serial support registered for pl2303
[40147.546297] pl2303 2-1.1:1.0: pl2303 converter detected
[40147.548045] usb 2-1.1: pl2303 converter now attached to ttyUSB0
3. you don't have access to the ports unless you are super user so change the permissions from the term line read below:

---- sudo chmod 666 /dev/ttyUSB0

(Permissions explanation attributed to "gbonvehi")

BEGINING of explanation:

In case anyone ends here, the letters are actually a "wrap" for the numbers, they do the same thing.
1 = +x = execute
2 = +w = write
4 = +r = read

3 = 1 + 2 = +xw = execute + write
5 = 1 + 4 = +xr = execute + read
6 = 4 + 2 = +wr = write + read
7 = 1 + 2 + 4 = +xwr = execute + write + read

I guess you get the point

And if you are not on the subjects of permission, you may wonder why a 6 three times?
The first number belongs to the user owning the file, the second to the group the file belongs to, and the third to other users.
So with chmod 666 /dev/ttyUSB0 you gave that file read and write permissions to everyone, the owner, the group and other users.

What you did, was to give that file write and read permissions which is what the program needs.

END of explanation

4. Go to dash and run 'serial port terminal' if you have it - download from the software center if not
5. error "Cannot open /dev/ttyS0: Permission denied"
6. ignore this as we aren't opening the serial port but the USB port
7. mouse over top bar on the whole PC screen and see the menus for serial port terminal
8. configuration>port>/dev/ttyUSB0
9. configuration>save as default so it remembers the change as normal default setting!!

Or use Moserial
1.follow above steps
2.then run Moserial instead of serial port term
3.set ttyUSB0 at the bottom of the tty list!
4.put a small screw in between pins 2 and 3 of the converter to do a loop back test
5.now change the settings and un-tick the hardware handshake as the data can't be received with out the handshake normally and with one screw only the transmit and receive pins are bridged!
6. send "hello world" send>
7. i hope that your received hello world in the receive box!!

If you want to you can now also access the serial port through virtualbox with a virtual winxp installation. Virtualbox is free so install it and then run it and install windows XP inside it this part is the easy bit and well documented on the web.....

1. Close down winXP image so you can change the settings for winXP image in the Virtualbox settings
2. Virtualbox settings for configuring the winXP go >Settings>USB port>
Set the port mode to Host device then go path>/dev/ttyUSB0
This maps the USB port of the Ubuntu to the com port 1 of the winXP image! Cool!

3. Run the winXP image by pressing the green arrow or double clicking the image
4. in winXP start>all programs>accessories>communications>hyperterminal put in dummy area code and start an new project choose COM1 and don't use hardware flow control (set it to none since a pin2-3 loop-back test does not have hardware flow control pins) put the screw back between pins 2 and 3 of the USB to serial converter (pins 2 and 3 are the transmit and receive so they can't be shorted out)
Type something and the characters will appear in the terminal (the echo chars locally settings is not ticked normally so this means the loop-back test worked – confirm this by removing the screw and typing again – the text won't print as you type so there it working!)

Regards

Neil Bradshaw

Last edited by neil bradshaw; 03-11-2013 at 06:05 PM. Reason: Added virtualbox winXP image serial link through to the Ubuntu Host machine
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing data from /dev/ttyUSB0 RVDowning Mandriva 1 06-29-2006 08:06 PM
Automatically set permissions on /dev/ttyUSB0 MicahCarrick Linux - Software 1 03-22-2006 08:20 AM
/dev/ttyUSB0 and permissions mrsolo Linux - Software 1 11-14-2004 03:24 PM
serial to USB, trying to read from /dev/ttyUSB0 in C code newguy21 Programming 1 09-29-2004 01:11 PM
/dev/ttyUSB0 js72 Linux - Networking 1 01-05-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration