Gentoo Wiki ArchivesGentoo Wiki


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc
This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

Smart Link Modem
Developer: Smart Link Ltd.
Package: net-dialup/slmodem
Category: net-dialup
License: Smart-Link



The slmodem package available through portage is a driver for 56K Smart Link chip based modems. To quote the README:

Supported Hardware

HAMR5600 based AMR/CNR/MDC/ACR modem cards on the following Southbridge chips:
- Intel ICH0,ICH2, ICH3, ICH4
- Via 686A, 686B, 8231, 8233
- SiS 630
- ALI 1535.
SmartPCI56/561/562/563 based PCI modem cards.
SmartUSB56 based USB modem.

Identifying Modem & Driver Type

First, determine if the modem you have requires this package or something different. The guys at the linmodem support page who maintain this package, have a script available for download on their site, scanModem. Go to the site and on the main page search for scanModem (usually Ctrl+F) and download the gzipped file. Navigate to the directory you saved it in and:

$ gunzip scanModem.gz
$ chmod u+x scanModem
$ ./scanModem

This creates a new directory where you are named Modem and fills it with information and the data it found out. The file with the modem information is ModemData.txt so:

$ cd Modem
$ nano -w ModemData.txt
Note: I opened the file in nano, a simple text editor, but you are free to open it in your favourite editor, GUI or otherwise.

Here is a dump of the relevant portions of the file:

File: Section of ModemData.txt
Providing detail for device at  00:08.0
  with vendor-ID:device-ID
Class 0703: 10b9:5457   Modem: ALi Corporation M5457 AC'97 Modem Controller (prog-if 00 [Generic])
  SubSystem 1025:102b  Acer Incorporated [ALI] Unknown device 102b
	Flags: bus master, medium devsel, latency 64, IRQ 10
 Checking for IRQ 10 sharing with modem.
      XT-PIC  ohci1394, ohci_hcd:usb1, ohci_hcd:usb2, nvidia

                  -----PCI_IDs-------                    --CompilerVer- 
    Feature List:  Primary  Subsystem Distr  KernelVer   kernel default  CPU
 ./scanModem test 10b9:5457 1025:102b gentoo 2.6.16-suspend2-r8  4.1.1 4.1.1    i686

 Rebooting from Microsoft windows into Linux may be necessary to activate this modem.
 The ungrab-winmodem + Smartlink slamr drivers are needed for this SIL27 codec modem.
Note: It is worth mentioning that most of the files created by scanModem are relevant and if you run into any problems not covered here, they are a good starting point.

This file should mention which drivers are necessary as here:

"The ungrab-winmodem + Smartlink slamr drivers are needed for this SIL27 codec modem."

Once you have established the type of modem you have and driver needed, you are free to start the installation.

Installing slmodem

Warning: This information is only tested and relevant to a 2.6 Linux kernel. I have no idea how it works on a 2.4 kernel.

Using slamr/slusb

This section if for using the slamr/slusb drivers. If you are using the ALSA drivers, please skip ahead to that section.

Basic Install

First, ensure that you tell Portage not to compile with ALSA enabled for this package so add net-dialup/slmodem -alsa to /etc/portage/package.use. If you are using a usb modem, also add usb. For help on this refer to the FAQ USE Flags|Gentoo Wiki guide on USE flags]]. After that, emerge the package:

# emerge -av slmodem

Ensure the package is being compiled with -alsa like this before saying yes.

After a successful compile, try one of the following commands (slusb for the USB Modems):

# modprobe slamr
# modprobe slusb

Check the output of dmesg for a line similar to:

"device 10b9:5457 is grabbed by driver serial"

This can be done easily with:

 dmesg | grep grabbed 

If there is no such message, double-check that the module has recognized and works for your specific modem, by looking for the following in your dmesg output:

slamr: module license 'Smart Link Ltd.' taints kernel.
slamr: SmartLink AMRMO modem.
slamr: probe 10b9:5457 SL1800 card...
ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [LNKG] -> GSI 10 (level, low) -> IRQ 10
slamr: mc97 codec is SIL27
slamr: slamr0 is SL1800 card.

If something similar appears, you have succesfully set up your modem. Please continue to the configuration section, skipping out the next section on ungrab-winmodem.

If you do have a message indicating that the device is grabbed by a different driver, the next section on ungrab-winmodem is necessary.

Using ungrab-winmodem

If you received the message that another driver has already grabbed your modem, most likely the standard Linux serial driver has identified it as a standard modem. This is a problem with the current drivers and the information has already been passed upstream to the kernel coders.

Until the kernel drivers are updated, the solution is to make the drivers release the modem, so that the slamr/slusb modules can grab and use it successfully. A module called ungrab-winmodem is provided with the ebuild to facilitate this. Run these commands to unload slamr/slusb and load the ungrab-winmodem module:

# modprobe -r slamr
# modprobe -r slusb
# modprobe ungrab-winmodem

Check your dmesg output again for a message similar to:

device 10b9:5457 is grabbed by driver serial: try to release

If this does appear, try again with modprobe slamr or modprobe slusb to load the relevant module. And then check dmesg again, for the successful identification message as detailed earlier. If it does load correctly, add ungrab-winmodem to /etc/modules.autoload.d/kernel-2.6, and proceed to the configuration section.

If ungrab-winmodem failed in the first place and you got a segmentation fault in return when running modprobe or it failed to return, check your dmesg for something along the lines of:

general protection fault: 0000 [#1]
Modules linked in: ungrab_winmodem

cat /proc/modules will probably also say Loading for ungrab_winmodem. In this case, make a note of the VendorID:DeviceID (here 10b9:5457) and refer to the Segmentation Fault section in Troubleshooting later on.


If you managed to get your modem working successfully this far, it is time to configure the file that the init script refers to when starting the daemon. Open it in your favourite editor:

# nano -w /etc/conf.d/slmodem

The file should look like this if compiled correctly:

File: /etc/conf.d/slmodem
# Config file for /etc/init.d/slmodemd

# the group should be kept in sync with:
# /etc/devfs.d/slmodem (devfs)
# /etc/udev/rules.d/55-slmodem.rules (udev)

# The following symlink will be created if uncommented

# Raise priority to reduce modem dropouts

# ALSA Options:

# The following sets the ALSA (alsasound) init script to
# be a dependency of the slmodem one. It does also provides
# ALSA support.
# MODULE=alsa

# The modem hardware slot
# use "modem:0", "modem:1", etc.
# usually modem:1 is used
# HW_SLOT=modem:1


# MODULE=slamr
# or
# MODULE=slusb

Modify the file as appropriate, normally changing the COUNTRY setting and uncommenting which module you use under Non-ALSA OPTIONS. For a full list of countries, use slmodemd --countrylist. Save the changes and exit, and move on to the Testing section later on.

Using ALSA drivers

This section is for using the ALSA based drivers. If you plan to use slamr/slusb drivers, please go back to the section on Using slamr/slusb.

Basic Install

For this section, I am using snd-intel8x0m for an Intel ICH4 modem. Please replace with the driver module you are using instead. For help on ALSA, please refer to Gentoo Linux Documentation - ALSA Guide.

First, ensure that you have the alsa USE flag set. It may already be set globally if you are using an ALSA based system. If not, edit /etc/portage/package.use and add net-dialup/slmodem alsa. For help on USE flags, refer to the FAQ USE Flags|Gentoo Wiki guide on USE flags]].

Also, edit /etc/make.conf and add SUPPORT_ALSA=1. Next fire up your kernel configuration editor:

# cd /usr/src/linux
# make menuconfig
Note: menuconfig is the menu based configuration editor and xconfig is X based.

For more information on kernel recompilation refer to Gentoo Linux Documentation - Upgrading the kernel or the Gentoo Installation Handbook for configuring the kernel when installing.

Add the following option as a module:

Linux Kernel Configuration: Modules for ALSA modem
Device Drivers --->
 Sound --->
  Advanced Linux Sound Architechture --->
   PCI Devices --->

Enable your modem driver (one of the following):

    [M]Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL)
    [M]ATI IXP Modem
    [M]VIA 82C686A/B, 8233 based Modems

I chose the Intel driver, to compile to snd-intel8x0m. After saving your configuratin changes, run make && make modules_install. This should build the module you selected and install them.

Note: If you are using alsa-driver instead of ALSA compiled into the kernel, you have to add intel-8x0m to the ALSA_CARDS in make.conf and re-emerge alsa-driver.

Next add an entry to /etc/modprobe.d/alsa:

alias snd-card-1 snd-intel8x0m
options snd cards_limit=2
Note: Make sure that the number of sound cards limit is set correctly.

Afterwards run update-modules.

After a reboot, aplay -l should display the following output:

card 1: Modem [Intel 82801DB-ICH4 Modem], device 0: Intel ICH - Modem [Intel 82801DB-ICH4 Modem - Modem]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

The modem has been set up through ALSA, please proceed to Configuration.


Next you have to set the configuration file that the Gentoo init script utilizes. It is stored as /etc/conf.d/slmodem.

With the alsa USE flag set, the file should look like this:

File: /etc/conf.d/slmodem
# Config file for /etc/init.d/slmodemd

# the group should be kept in sync with:
# /etc/devfs.d/slmodem (devfs)
# /etc/udev/rules.d/55-slmodem.rules (udev)

# The following symlink will be created if uncommented

# Raise priority to reduce modem dropouts

# ALSA Options:

# The following sets the ALSA (alsasound) init script to
# be a dependency of the slmodem one. It does also provides
# ALSA support.

# The modem hardware slot
# use "modem:0", "modem:1", etc.
# usually modem:1 is used


# MODULE=slamr
# or
# MODULE=slusb

Check that the ALSA module and HW_SLOT sections are uncommented, and change the country setting as appropriate. For a full list of countries, use slmodemd --countrylist.

Starting & Set-up

With all configuration changes set properly, we can now start the init script to check if it works:

# /etc/init.d/slmodem start
* Starting slmodemd for /dev/ttySL0 ... [ ok ]

This script loads the relevant modules if not using ALSA (if you are, ALSA will load them) and starts the slmodemd daemon. Add it to the default runlevel:

# rc-update add slmodem default

This should completely set-up your modem ready to use whenever. Test it out with a dialer.


ungrab-winmodem: Segmentation Fault

If you received a segmentation fault when you tried to modprobe ungrab-winmodem you will need to reboot to remove the module from memory (Forcing removal does not work). Make sure you have not of the VendorID:DeviceID pair as you will need it. Check your dmesg output or /var/log/messages if you need to find it again.

Next, navigate to the package repository at linmodems support page and get ungrab-winmodem.tar.gz, the source code for the module. Extract it and open ungrab-winmodem.c.

The fastest way to fix this is to add an entry to the static structure corresponding to your modem. This is done in the format 0xVendorID, 0xDeviceID, for example for my ALi 5457 (10b9:5457) mentioned earlier:

Code: Section of ungrab-winmodem.c
static struct pci_device_id softmodem_pci_tbl [] __devinitdata = {
	/* 163c:3052 */
	/* 10a5:3052 */
	/* 10b9:5459 */
	/* 10b9:5457 */
	/* 10b9:545a */
	/* 2000:2800 */
	/* 2003:8800 */
	/* pctel HSP1688 */
	{ 0x134d, 0x2189, PCI_ANY_ID, PCI_ANY_ID },
	/* phillips pci modem */
	{ 0x1131, 0x3400, PCI_ANY_ID, PCI_ANY_ID },
	/*ALi M5457 - 10b9:5457*/
	{ 0x10b9, 0x5457, PCI_ANY_ID, PCI_ANY_ID },

Add the entry, don't forget the comma and save and exit. Compile and install the modules by running make && make install. Remember that every time the slmodem package is compiled from portage, you will have to recompile your patched module. After running update-modules, you should be able to succesfully load ungrab-winmodem, refer to the section under installing slmodem for help.

Known Issues

Some versions have been known to have issues with the /dev/ttySL0 device. Use the created /dev/modem symlink created by the init script instead.
Requires the option Carrier_Check = No in the config file.
Error code 10. Some providers need PPPD started before sending a login prompt, so it's needed to edit wvdial.conf and add the folowing line after "Moden Type" directive:
File: /etc/wvdial.conf
Stupid mode = 1
New PPPD = yes

External Links

Retrieved from ""

Last modified: Sun, 14 Sep 2008 02:47:00 +1000 Hits: 15,511

Created by, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.