Pages

Sunday, April 3, 2011

Toshiba Satellite Pro 4600 internal modem

My Toshiba Satellite Pro 4600 has a internal modem which I want to use. I found the software slmodem, it contains the driver and the daemon slmodemd which allows you to communicate with your modem. To setup the software download and compile it:

# cd /usr/src
# wget http://linmodems.technion.ac.il/packages/smartlink/slmodem-2.9.11-20100718.tar.gz
# tar xfz slmodem-2.9.11-20100718.tar.gz
# cd slmodem-2.9.11-20100718
# make && make install

The steps above will compile the driver (slamr.ko) and the daemon (/usr/sbin/slmodem). After successful installation try to load the driver and look for kernel messages:

# modprobe slamr
# dmesg
...
slamr: SmartLink AMRMO modem.
slamr: probe 8086:2446 ICH card...
slamr 0000:00:1f.6: PCI INT B -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
slamr 0000:00:1f.6: setting latency timer to 64
slamr: mc97 codec is SIL27
slamr: slamr0 is ICH card.

These messages indicates that the driver was loaded including support for alsa. Check if the slamr devices were created. If not, create them like the following. One device per modem. If you only have on modem, create only /dev/slamr0:

# mknod -m 600 /dev/slamr0 c 242 0
# mknod -m 600 /dev/slamr1 c 242 1
# mknod -m 600 /dev/slamr2 c 242 2
# mknod -m 600 /dev/slamr3 c 242 3

Now try to start the slmodemd daemon:

# slmodemd --country=GERMANY /dev/slamr0
symbolic link `/dev/ttySL0' -> `/dev/pts/0' created.
modem `slamr0' created. TTY is `/dev/pts/0'
Use `/dev/ttySL0' as modem device, Ctrl+C for termination.

slmodemd will use now /dev/slamr0 and provide you with a new terminal device /dev/ttySL0. You can use now /dev/ttySL0 as a normal terminal device, just like /dev/ttyS0 (1st serial line) or /dev/ttyS1 (2nd serial line). I personally prefer /dev/modem, so just link it:

# cd /dev
# ln -s ttySL0 modem

Now I can use minicom, ppp etc with my internal modem. For booting up my system I have written a small script (slmodem provides some scripts already in the sources, but I prefer my own):

#!/bin/bash

echo "Starting slmodemd:  slmodemd --country=GERMANY /dev/slamr0"

# stop slmodemd
if [[ `pgrep -x slmodemd` ]]; then
  kill -9 `pgrep -x slmodemd`
fi

# un/re-load module
if [[ `lsmod | grep slamr | awk 'BEGIN {FS=" "} {print $1}'` != "" ]]; then
  rmmod slamr
fi
modprobe slamr

# create devices
cd /dev
for dev in 0 1 2 3; do
  if [[ ! -c /dev/slamr$dev ]]; then
    mknod -m 600 /dev/slamr$dev c 242 $dev
  fi
done

# start slmodemd
(slmodemd --country=GERMANY /dev/slamr0 > /dev/null 2>&1) &

# create modem link
cd /dev
if [[ ! -h modem ]]; then
  ln -s ttySL0 modem
fi

Links:
http://linmodems.technion.ac.il/

No comments:

Post a Comment