How to install Smartlink modem driver on Fedora Core 6

Text Link Ads

First, download the latest Smartlink modem driver from here

(1) comment out line 46 in file /slmodem-2.9.11-xx/drivers/amrmo_init.c
/* #include */
(2) comment out line 14 in file /ungrab-winmodem/ungrab-winmodem.c
/* #include */
This is needed in order for drivers to compile.

(3) add as a single line to /etc/modprobe.conf
/* for automation/autoloading of slmodemd */
install slamr modprobe --ignore-install ungrab-winmodem ; modprobe
--ignore-install slamr; test -e /dev/slamr0 || (/bin/mknod -m 660
/dev/slamr0 c 242 0 2>/dev/null && chgrp uucp /dev/slamr0)

(4) for successful autoloading of slmodemd do the following
[root@localhost ~]# cp /slmodem-2.9.X/scripts/slmodemd /etc/rc.d/init.d/
[root@localhost ~]# cd /etc/rc.d/init.d/
[root@localhost init.d]# chmod +x slmodemd

add the lines modprobe ungrab-winmodem, and modrobe slamr

/* start() procedure from slmodemd script /etc/rc.d/init.d/slmodemd
start() {
modprobe ungrab-winmodem
modprobe slamr
echo -n "Starting SmartLink Modem driver for $SLMODEMD_DEVICE: "
$prog /dev/null 2>/dev/null \
--country=$SLMODEMD_COUNTRY $SLMODEMD_OPTS /dev/$SLMODEMD_DEVICE &
RETVAL=$?
[ $RETVAL -eq 0 ] && success $"$prog startup" || failure $"$prog startup"
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
/*** rest of slmodemd file missing ***/

Now we make use of command chkconfig. It takes care of symbolic links automatically.


[root@localhost init.d]# chkconfig --help
chkconfig version 1.3.20 - Copyright (C) 1997-2000 Red
Hat, Inc. This may be freely redistributed under the terms of the GNU Public License.
usage: chkconfig --list [name]
chkconfig --add
chkconfig --del
chkconfig [--level ]


[root@localhost init.d]# head -8 slmodemd
#!/bin/sh
#
# slmodemd: Starts the SmartLink Modem Daemon
#
# chkconfig: 345 90 10
# description: This is the user space part of the
SmartLink Modem driver
# processname: slmodemd
# config: /etc/sysconfig/slmodem
[root@localhost init.d]#

The chkconfig line & description line must go into every script that is to go under the control of chkconfig. The description line seems pretty self-explanatory. the chkconfig line:

# chkconfig: 345 90 10
345 ---> run levels at which to start service
90 ----> priority for start scripts
10 ----> priority for kill scripts


[root@localhost init.d]# chkconfig slmodemd --add
[root@localhost init.d]# chkconfig slmodemd on
[root@localhost init.d]# cd ..
[root@localhost rc.d]# for i in 0 1 2 3 4 5 6
> do
> ls rc$i.d/*slmodemd*
> done
rc0.d/K10slmodemd
rc1.d/K10slmodemd
rc2.d/S90slmodemd
rc3.d/S90slmodemd
rc4.d/S90slmodemd
rc5.d/S90slmodemd
rc6.d/K10slmodemd
[root@localhost rc.d]#

[root@localhost rc.d]# chkconfig slmodemd --list
slmodemd 0:off 1:off 2:on 3:on 4:on
5:on 6:off
[root@localhost rc.d]#

HOW compilation of slmodem-2.9.X/ looks like and ungrab-winmodem

[olivares@localhost Downloads]$ tar -zxvf slmodem-2.9.11-20061021.tar.gz

[olivares@localhost Downloads]$ cd slmodem-2.9.11-20061021

[olivares@localhost slmodem-2.9.11-20061021]$ make
make -C modem all
make[1]: Entering directory
`/home/olivares/Downloads/slmodem-2.9.11-20061021/modem'
make[1]: Leaving directory
`/home/olivares/Downloads/slmodem-2.9.11-20061021/modem'
make -C drivers
KERNEL_DIR=/lib/modules/2.6.18-1.2798.fc6/build
make[1]: Entering directory
`/home/olivares/Downloads/slmodem-2.9.11-20061021/drivers'
cc -I/lib/modules/2.6.18-1.2798.fc6/build/include -o
kernel-ver kernel-ver.c
make all KERNEL_VER=2.6.18-1.2798.fc6
make[2]: Entering directory
`/home/olivares/Downloads/slmodem../drivers'
make modules -C /lib/modules/2.6.18-1.2798.fc6/build
SUBDIRS=/home/olivares/Downloads/slmodem../drivers
make[3]: Entering directory
`/usr/src/kernels/2.6.18-1.2798.fc6-i686'
Building modules, stage 2.
MODPOST ....
/* deleted */

[olivares@localhost slmodem-2.9.11-20061021]$ su
Password:

[root@localhost slmodem-2.9.11-20061021]# make install
make -C modem all
make[1]: Entering directory
`/home/olivares/Downloads/slmodem-2.9.11-20061021/modem'
make[1]: Leaving directory
`/home/olivares/Downloads/slmodem-2.9.11-20061021/modem'
make -C drivers
KERNEL_DIR=/lib/modules/2.6.18-1.2798.fc6/build
make[1]: Entering directory
`/home/olivares/../slmodem-2.9.11-20061021/drivers'
cc -I/lib/modules/2.6.18-1.2798.fc6/build/include -o
kernel-ver kernel-ver.c
make all KERNEL_VER=2.6.18-1.2798.fc6
make[2]: Entering directory
....
/* deleted */

[root@localhost slmodem-2.9.11-20061021]#

[root@localhost slmodem-2.9.11-20061021]# cd ..
[root@localhost Downloads]# tar -zxvf
ungrab-winmodem.tar.gz
ungrab-winmodem/
ungrab-winmodem/Makefile
ungrab-winmodem/ungrab-winmodem.c
ungrab-winmodem/Readme.txt

[root@localhost Downloads]# cd ungrab-winmodem

[root@localhost ungrab-winmodem]# make
make modules -C /lib/modules/2.6.18-1.2798.fc6/build
SUBDIRS=/home/olivares/Downloads/ungrab-winmodem
make[1]: Entering directory
`/usr/src/kernels/2.6.18-1.2798.fc6-i686'
CC [M]
/home/olivares/../ungrab-winmodem/ungrab-winmodem.o
Building modules, stage 2.
MODPOST
CC
/home/olivares/../ungrab-winmodem/ungrab-winmodem.mod.o
LD [M]
/home/olivares/../ungrab-winmodem/ungrab-winmodem.ko
make[1]: Leaving directory
`/usr/src/kernels/2.6.18-1.2798.fc6-i686''

[root@localhost ungrab-winmodem]# make install
make modules -C /lib/modules/2.6.18-1.2798.fc6/build
SUBDIRS=/home/olivares/Downloads/ungrab-winmodem
make[1]: Entering directory
`/usr/src/kernels/2.6.18-1.2798.fc6-i686'
Building modules, stage 2.
MODPOST
make[1]: Leaving directory
`/usr/src/kernels/2.6.18-1.2798.fc6-i686'
install -D -m 644 ungrab-winmodem.ko
/lib/modules/2.6.18-1.2798.fc6/extra/ungrab-winmodem.ko
/sbin/depmod -a
[root@localhost ungrab-winmodem]#


[olivares@localhost slmodem-2.9.11-20061021]$ su -
Password:
[root@localhost ~]# modprobe ungrab-winmodem
[root@localhost ~]# modprobe slamr
[root@localhost ~]# slmodemd -c USA /dev/slamr0
SmartLink Soft Modem: version 2.9.11 Nov 6 2006
17:04:30
symbolic link `/dev/ttySL0' -> `/dev/pts/2' created.
modem `slamr0' created. TTY is `/dev/pts/2'
Use `/dev/ttySL0' as modem device, Ctrl+C for
termination.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s