LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-06-2006, 05:56 PM   #1
Dave_Busa
LQ Newbie
 
Registered: Jan 2006
Distribution: Red Hat ES
Posts: 9

Rep: Reputation: 0
Permanent Link for my Modem connected to a Serial Port


I have Red Hat Fedora with Gnome. To use my external modem to get on the Internet I must type:
ln -s /dev/ttyS0 /dev/modem
I have to type this each day to get on line. What do I need to do to add this link only once and be done with it?
 
Old 01-07-2006, 10:56 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Find out major & minor of ttys0: ls -l /dev/ttyS0
Should result in something like:
crw-rw---- 1 root dialout 4, 64 Mar 14 2002 /dev/ttyS0

The "4, 64" is the major (4) and minor (64) of the device. The "c" in the first position lets you know it is a character (a/k/a raw) device.

Any device name with the same properties will access the same device. You make a device name with the "mknod" command.

mknod /dev/modem c 4 64

The "c" tells it to make a character device and the "4 64" specify the major and minor respectively. That way its no longer a symbolic link but an actual device reference of its own. Note you may also need to change ownership and permissions with the chown and chmod commands to make it look like your /dev/ttySO entry.

Unfortunately I don't do dial up on Linux and am not sure you won't have the same problem. It appears something is deleting your /dev/modem symbolic link and there is no guarantee it wouldn't also delete /dev/modem if it were a character device. Anyway figure its worth a try.

P.S. It might be a good candiate for scripting since it appears to always work. You could write a short script that first does the ln then does the dialout command you're using. That way you'd still only have to type one command.

Last edited by MensaWater; 01-07-2006 at 10:58 AM.
 
  


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
RH doesn't detect my Serial modem connected to a PCI Serial card ricky_ds Linux - Hardware 1 08-17-2006 02:37 PM
Zoom Serial Port Modem jennirh9 Linux - Hardware 1 08-18-2004 12:06 AM
Finding serial port for my modem psyklops Linux - General 1 11-30-2002 08:12 AM
Which serial port modem to buy? R2RO Linux - General 5 08-08-2002 02:07 PM
Modem programming and serial port Drickx Linux - Networking 2 04-24-2002 09:24 AM

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

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