Symbolic link for agrsm modules port /dev/ttyAGS3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This note is for those using agrmodem.ko + agrserial.ko modules, which
includes those with the 11c11040 LSI/Agere chipset on High Definition
Audio card.  Successive loading of agrmodem + agrserial  dynamically
creates a port /dev/ttyAGS3 , which is not however used automatically
by the dialer setup utility wvdialconf.
The file below automates creation of a desirable symbolic link:
    /dev/ttySAGR -->  /dev/ttyAGS3
which will be found by wvdialconf.

 Create a file /etc/modprobe.d/agrsm, which can be created with:
 $ sudo gedit /etc/modprobe.d/agrsm
For users of RPM using distros, specifying some file in your
/etc/modprobe.d/  arena will be necessary instead.
But regardless the following lines should be copied/edited in.  The
lines beginning with # are comments only.
Some lines may be undesirable folded in this email. The \  is a
legitimate ending of a  line. The file

# # filename  /etc/modprobe.d/agrsm or equivalent.
# setup agrsm modem with only: "sudo modprobe agrserial"
# with symbolic link creation: /dev/ttySAGR --> /dev/ttyAGR3
# so wvdialconf will detect  /dev/ttySAGR

install agrserial /sbin/modprobe --ignore-install agrmodem ;
/sbin/modprobe --ignore-install agrserial && \
test -e /dev/ttySAGR || ln -s /dev/ttyAGS3 /dev/ttySAGR

# remove symbolic link upon agrserial unloading
remove agrserial /sbin/modprobe -r --ignore-remove agrserial ;
/sbin/modprobe -r --ignore-remove agrmodem && \
{ if test -L /dev/ttySAGR; then rm /dev/ttySAGR; fi } ; true

# agrserial could be additionally added to /etc/modules ,
# to automate bootup  "sudo modprobe agrserial"
# But if autoloading should cause a bootup Crash on some System,
# recovery would require expert usage of a Rescue disk

## setup agrsm modem with only: "sudo modprobe agrmodem"
# install agrmodem /sbin/modprobe --ignore-install agrmodem && \
# /sbin/modprobe --ignore-install agrserial && test -e /dev/ttySAGR ||
ln -s /dev/ttyAGS3 /dev/ttySAGR
## However "sudo modprobe agrserial" is preferred to enable separate testing
## of effects of agrmodem and agrserial loading
### END file

With such a file present, both drivers are loaded with following
outputs to /var/log/messages:
$ sudo modprobe agrserial
 * Hello Agere Driver **
 ttyAGS3 at I/O 0x400 (irq = 3) is a AgereModem
 Loading module Agere Modem Interface driver version 2.1.80.0 (2008-10-31)

With symbolic link created
$ ls -l /dev/ttySAGR
lrwxrwxrwx 1 root root 12 2008-12-31 12:35 /dev/ttySAGR -> /dev/ttyAGS3

Both drivers are removed by:
$ sudo modprobe -r agrserial
 Unloading Agere Modem Interface driver: version 2.1.80.0

With removal of both drivers and the symbolic link
$ ls -l /dev/ttySAGR
ls: cannot access /dev/ttySAGR: No such file or directory

This functionality will presently be  incorporated into  a module
installer package.

MarvS

[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux