LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2009, 12:19 AM   #1
manjunathgn
LQ Newbie
 
Registered: Aug 2008
Posts: 17

Rep: Reputation: 0
Serial port


Dear All,

I have same problem, I have 4 serial ports in the PC, Now we are running our software and using /dev/ttyS0 to read the GPS input. Due to improper earthing i serial port is burnt. Now can i connect the GPS cable to /dev/ttyS1 and redirect that to /dev/ttyS0.

IS it possible because, i am using the exe version of the software, it that, they have used /dev/ttyS0 only.

Cat the data on /dev/ttyS1, i am receiving the GPS time but i want to redirect that GPS time to /dev/ttyS0. Is it possible?

Is there any alternative?

Kindly do the needfull


Manjunath
 
Old 10-27-2009, 12:41 AM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 219Reputation: 219Reputation: 219
As root:
Code:
cd /dev
rm ttyS0
ln ttyS1 ttyS0
Should work.

Alternately you could do this:
Code:
cd /dev
rm ttyS0
mv ttyS1 ttyS0
Or if you really want to put the smack down:
Code:
cd /dev
rm ttyS0
mknod ttyS0 c 4 65
chown root.dialout ttyS0
chmod 660 ttyS0
You could, of course, set the mode and ownership however you want . . . no idea what distro you are using . . . my example shows the proper Slackware way.
Be sure your circuits are all properly grounded! Of course, your machine has four UARTS . . . so hey . . . you could make nodes of type c all the way up to minor 67!

Good luck!

Last edited by foodown; 10-27-2009 at 01:13 AM.
 
Old 10-28-2009, 04:58 AM   #3
manjunathgn
LQ Newbie
 
Registered: Aug 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks..Will try n get back to you.


Quote:
Originally Posted by foodown View Post
As root:
Code:
cd /dev
rm ttyS0
ln ttyS1 ttyS0
Should work.

Alternately you could do this:
Code:
cd /dev
rm ttyS0
mv ttyS1 ttyS0
Or if you really want to put the smack down:
Code:
cd /dev
rm ttyS0
mknod ttyS0 c 4 65
chown root.dialout ttyS0
chmod 660 ttyS0
You could, of course, set the mode and ownership however you want . . . no idea what distro you are using . . . my example shows the proper Slackware way.
Be sure your circuits are all properly grounded! Of course, your machine has four UARTS . . . so hey . . . you could make nodes of type c all the way up to minor 67!

Good luck!
 
Old 10-28-2009, 05:16 AM   #4
manjunathgn
LQ Newbie
 
Registered: Aug 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks, Will try this n let back to You
 
Old 11-05-2009, 09:18 PM   #5
manjunathgn
LQ Newbie
 
Registered: Aug 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Hi ,
I have checked with

cd /dev
rm ttyS0
ln ttyS1 ttyS0.

This is working fine. But the after rebooting the machine it doesn't work...Again we need to same before running the application software...


Is there any permanent solution to dis?

So tht i can mv or place ttyS1 in place of ttyS0...



Manjunath
 
Old 11-05-2009, 09:30 PM   #6
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 219Reputation: 219Reputation: 219
The third option that I suggested originally should work as a permanent solution.
 
  


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
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Parallel Port & Serial Port device identification helpmeforlinux Linux - Hardware 3 01-02-2007 01:15 AM
timedia 4 port serial port i/o card configuration binu_edl Linux - Hardware 0 03-09-2006 09:39 AM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 09:48 AM


All times are GMT -5. The time now is 10:00 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration