LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-06-2012, 02:27 AM   #1
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 306

Rep: Reputation: 47
Modem name changed from ttyS2 to ttyS1 after reboot


I just set up a hylafax server in my slackware 14.0 wifi router. But the modem name is not consistent as following:

It was like (dmesg):
Code:
[ 4496.706205] 0.0: ttyS2 at I/O 0x3e8 (irq = 5) is a 16550A
But after system reboot, it changed to:
Code:
[   13.029704] 0.0: ttyS1 at I/O 0x33f8 (irq = 4) is a 16550A
If I unplugged the modem and plugged it again, it returned back to ttyS2.

As I need to start the auto answer by adding the exact modem name into inittab, it now became a headache.

Any suggestion?
 
Old 12-06-2012, 03:22 AM   #2
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 306

Original Poster
Rep: Reputation: 47
After some googling, I solved my own question:

I added a rule file at /etc/udev/rules.d/80-persistent-modem.rules
Code:
ATTRS{card_id}=="0x0034", ATTRS{manf_id}=="0x0101", SYMLINK+="3commodem"
Testing the result:
udevadm control --reload-rules
udevadm test -a -p $(udevadm info -q path -n /dev/ttyS1)


The variable is based on the following command result:
udevadm info --name=/dev/ttyS1 --attribute-walk

Code:
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0/tty/ttyS1':
    KERNEL=="ttyS1"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0':
    KERNELS=="0.0"
    SUBSYSTEMS=="pcmcia"
    DRIVERS=="serial_cs"
    ATTRS{function}=="0x00"
    ATTRS{pm_state}=="on"
    ATTRS{func_id}=="0x02"
    ATTRS{manf_id}=="0x0101"
    ATTRS{card_id}=="0x0034"
    ATTRS{prod_id1}=="3Com"
    ATTRS{prod_id2}=="3CXM/3CCM556"
    ATTRS{prod_id3}=="Megahertz 56K Cell/Telephony Modem"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:02:00.0':
    KERNELS=="0000:02:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="yenta_cardbus"
    ATTRS{vendor}=="0x1180"
    ATTRS{device}=="0x0476"
    ATTRS{subsystem_vendor}=="0x1014"
    ATTRS{subsystem_device}=="0x0532"
    ATTRS{class}=="0x060700"
    ATTRS{irq}=="11"
    ATTRS{local_cpus}=="1"
    ATTRS{local_cpulist}=="0"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{enable}=="2"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0':
    KERNELS=="0000:00:1e.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{vendor}=="0x8086"
    ATTRS{device}=="0x2448"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{class}=="0x060400"
    ATTRS{irq}=="0"
    ATTRS{local_cpus}=="1"
    ATTRS{local_cpulist}=="0"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{enable}=="1"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}=="1"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
reference: http://wiki.debian.org/udev
 
  


Reply

Tags
hylafax, modem name



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
after reboot computer time is changed powah Linux - General 2 03-16-2009 12:40 PM
pc name changed after regular reboot Lord of the Board Linux - Newbie 2 10-01-2006 03:24 PM
modem on ttyS1 ?? skguha Linux - Newbie 6 08-18-2005 07:08 PM
No init on /dev/ttyS2 (modem) gamfa Amigo 0 01-24-2005 08:52 PM
route settings get changed after reboot brynjarh Linux - Newbie 1 07-08-2004 01:03 PM

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

All times are GMT -5. The time now is 05:46 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
Open Source Consulting | Domain Registration