LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-08-2006, 12:03 AM   #1
logike30
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Rep: Reputation: 0
How do I get the COM port to function?


I am quite new to the linux world. I have myself started on SUSE 10.1. I have been having trouble getting one of my programs which uses the COM port for RS232 communication to function. The program is a windows based program that I have gotten to run using Wine. It doesn't seem to identify the com port and is unable to communicate with the equipment I connect to. Is there something I need to do to get this thing working?


Thanks
 
Old 06-08-2006, 05:21 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Windows and Linux don't give the com ports the same names. The windows to Linux conersion looks like this:
COM1 == /dev/ttyS0
COM2 == /dev/ttyS1
COM3 == /dev/ttyS2
COM4 == /dev/ttyS3

So, check the application configuration. Edit to point to the appropriate /dev/ttySx instead of a COMx port. Even though it's a windows app, it is working through Wine and the Linux kernel to communicate with the com port, so it should work if it uses the Linux port names.
 
Old 06-09-2006, 09:05 PM   #3
logike30
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
I'll give it a try, thanks!
 
Old 06-09-2006, 11:43 PM   #4
gtrawoger
Member
 
Registered: Dec 2005
Location: TO, Ontario, Canada
Distribution: Ubuntu 14.04, CentOS 6.5
Posts: 37

Rep: Reputation: 17
Don't forget to make your ports read/writable. From what I remember they are assigned to root.

I remember trying to hook up my PDA over the serial port and had a couple frustrating hours in there until I figured out to give myself privileges to the access.
 
Old 06-10-2006, 06:02 AM   #5
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Would you mind sharing how you did that. I'm having the same kind of trouble with a perallel port
 
Old 06-10-2006, 08:20 AM   #6
gtrawoger
Member
 
Registered: Dec 2005
Location: TO, Ontario, Canada
Distribution: Ubuntu 14.04, CentOS 6.5
Posts: 37

Rep: Reputation: 17
Sure,

- open a terminal and get to be root.

- type "chmod a+rw /dev/ttyS0" for COM1 (or whatever port you need open.)

If you still have problems, maybe check out this article:

http://www.linuxforums.org/forum/per...llel-port.html

Cheers
 
Old 06-10-2006, 08:42 AM   #7
gtrawoger
Member
 
Registered: Dec 2005
Location: TO, Ontario, Canada
Distribution: Ubuntu 14.04, CentOS 6.5
Posts: 37

Rep: Reputation: 17
Actually, come to think of it, I did it a different way. The above is probably the quickest to get it working.

But what I did (since I am a Linux newbie and used to Windows) I opened konqueror in SUPER-USER mode.
Then I went to the /dev directory, and right clicked on the ttyS0 icon, going to permissions and allowed all access.

Either way should work though.
 
Old 06-10-2006, 04:19 PM   #8
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Thanks for the information!
 
Old 06-11-2006, 05:22 AM   #9
logike30
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
What is a Super-user?

 
Old 06-11-2006, 12:23 PM   #10
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Rep: Reputation: 15
A super user (or username "root") is a user account on most linux/unix/bsd systems that have the permissions to do anything at all, even deleting essential files and things. This is the reason we use super user for doing most config.
 
Old 06-11-2006, 06:11 PM   #11
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
LQwiki: super user
 
Old 06-11-2006, 09:46 PM   #12
gtrawoger
Member
 
Registered: Dec 2005
Location: TO, Ontario, Canada
Distribution: Ubuntu 14.04, CentOS 6.5
Posts: 37

Rep: Reputation: 17
Quote:
Originally Posted by logike30
What is a Super-user?

logike30,

Again, what I did to get the Super-User (root) Konqueror window is simply open a terminal window and login in as root:

# su
Enter Password:

Enter your password, and then type:

konqueror &

A new "Explorer" type window will pop up and you can then go to "/dev/" and change permission in that file browser window. Just be careful what you are doing in there, since you can change your whole system and toast it.

Hope that helped.
 
Old 06-12-2006, 12:37 AM   #13
logike30
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Ahh, superuser = root. Now I know.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I run a function within a function arguement? C/C++ RHLinuxGUY Programming 12 05-19-2006 03:29 PM
Port check function call mrsharky Linux - Networking 4 04-15-2005 12:27 PM
what are the Hexadecimal function and ASCII function in Perl Bassam Programming 1 06-03-2004 02:44 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 02:31 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:32 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