Sunday, November 6, 2011

PCTel Inc HSP MicroModem 56 with Slackware

Yesterday I got an old PCI Modem card, something with pctel anything. I was wondering if I could get it to run, so I did some research on the Internet and found the pctel software for Linux. The disapointment was that i will only compile on 32bit machines. Anyway, I setup my old Athlon 800MHz desktop with the pctel card and installed the current Slackware release (13.37). Then I donwloaded the driver from

# cd /usr/src
# wget
# tar xf pctel-0.9.7-9-rht-12.tar.gz
# cd pctel-0.9.7-9-rht-12/src

And installed it:

# ./configure -auto
detecting your modem...found. Your modem is a pct789 type modem.
# make
# make install

Then I loaded the driver and checked the system logs:

# modprobe pctel
# dmesg
[  413.713914] pctel_hw(155): PCTel hardware driver version 0.9.7-9-rht-9 for PCT789
[  413.732268] pctel(481): pctel v0.1 loaded
[  413.732343] pctel_pci(753): device 134d:7892 is grabbed by driver serial: try to release
[  413.762381] pctel_hw 0000:00:0a.0: AMD756: dev [134d:7892], router PIRQ 3 get IRQ 12
[  413.762396] pctel_hw 0000:00:0a.0: found PCI INT A -> IRQ 12
[  413.762440] pctel_pci(238): PCTel device[0000:00:0a.0](0x50) found 134d:7892 (rev 02), iobase=0xdc00, irq=12.
[  413.762453] pctel_pci(628): Setup PCI port: port 0xdc00, irq 12, type 0, membase   (null), ops   (null)
[  413.762480] ttyS_PCTEL0 at I/O 0xdc00 (irq = 12) is a PCTel

The log above shows the device to use: /dev/ttys_PCTEL0
You can use this device now with any software like minicom.
Now check with lspci:

# lspci -vn
00:0a.0 0703: 134d:7892 (rev 02) (prog-if 00 [Generic])
        Subsystem: 134d:0001
        Flags: medium devsel, IRQ 12
        I/O ports at dc00 [size=64]
        Capabilities: [40] Power Management version 2
        Kernel driver in use: pctel_hw
        Kernel modules: pctel

The output shows that the PCI card is controlled by the pctel module and is ready to use now.

If you installed the driver and get an error while loading the driver like:

# modprobe pctel
WARNING: Error inserting pctel_hw (/lib/modules/ Invalid module format
FATAL: Error inserting pctel (/lib/modules/ Invalid module format

Then check the system logs:

# dmesg
[ 2862.819296] linmodem: version magic ' SMP mod_unload 686 ' should be ' mod_unload 486 '
[ 2879.444270] pctel_hw: version magic ' SMP mod_unload 686 ' should be ' mod_unload 486 '

It shows that the module was build for, but your current running kernel Check with uname:

# uname -r

In this case you have to install the packages kernel-huge-smp- and kernel-modules-smp-, reconfigure lilo and reboot. If necassary rebuild the module (like above) and then load the module again which should work now. Also make sure that the module is in the right modules path:

# ls -lah /lib/modules/`uname -r`/misc/
-rw-r--r-- 1 root root  16K Nov  6 12:59 linmodem.ko
-rw-r--r-- 1 root root  17K Nov  6 12:59 pctel.ko
-rw-r--r-- 1 root root 1.1M Nov  6 12:59 pctel_hw.ko

If everything is right (kernel version and modules path) then you should have no problem to load and use the pctel driver


  1. Hi Karellen,
    I would be interested to get those pctel modules.
    I indeed tried to compile them as you did in your post. But modprobe pctel keeps telling «Error inserting pctel module - Invalid format». I am running puppy linux slacko 53 which is build from slackware. According to another puppy linux forum member who also tried to compile the pctel module, whit the same result, there could be some «mismatch among the kernel source, gcc compiler and the operating puppy, even though the kernel number is the same for all» .
    As pctel pci modem users is very few, I doubt we could an answer about a fix on this compiling difficulty.

    So would you mind attach those modules to a mail to me?

    Here is my mail

    Many thanks for any answer !

    Cheers, Charlie

  2. The message you get 'invalid format' seems to be a mismatch between your current running kernel and your actual kernel sources. I ran into the same error (see above). Could you give me the exact output from:
    # modprobe pctel
    # dmesg
    # uname -r

  3. Hi again Karellen,
    thanks for your answer!
    here are the outputs

    #uname -r

    # modprobe pctel
    WARNING: Error inserting pctel_hw (/lib/modules/ Invalid module format
    FATAL: Error inserting pctel (/lib/modules/ Invalid module format

    I could not post dmesg output as it is longer than 4096 signs.
    Note that the pctel pci card is not mounted on this machine where the compile takes place. I use this machine for compile as it has more possibilities than the others.

    Is there another way to send you dmesg output?

    Cheers, Charlie

  4. For the dmesg output try:

    # dmesg | grep -i invalid

    But as I already said, you are running the wrong kernel. You are using, try installing and boot it. After that you shouldn't have any problems.

  5. Thanks Karellen,
    I believe my system being already running smp (htop displays both processors cpu load). The kernel has been compiled for smp.

    Both packages kernel-huge-smp- and kernel-modules-smp-, have been installed.

    Are present:

    But still

    # uname -r


    # dmesg | grep -i invalid

    does not return any comment


  6. Your system has both kernels installed: and Obviously you're running (that is what uname -r told you). But you need to boot the kernel. Otherwise you won't be able to load the pctel modules because they were build for the kernel. As long as you don't get the following:

    # uname -r

    You will not be able to use the current build pctel modules. Go to /boot, look for something like vmlinuz- and link it to vmlinuz (I have no Slackware available here so I can't give you the right name for sure. I'll check out tonight and let you know.). Then run lilo and reboot your system. After that you should have the right kernel running and be able to use the pctel modules.

  7. Hi Charlie,

    I have checked my machine. And I hope I can help now a little more. These are my current installed kernel packages:

    # ls /var/log/packages/kernel-*

    Except for the kernel-firmware package I have only installed the smp packages. Under /lib/modules I have only the directory for smp:

    # ls /lib/modules/

    When I check now my bootable kernels under /boot I found the following:

    # cd /boot
    # ls -l vmlinuz*
    ... vmlinuz -> vmlinuz-huge-smp-
    ... vmlinuz-huge-smp-

    I have only one kernel to boot, in this case vmlinuz-huge-smp- vmlinuz is just a symbolic link to it. When I take a look at /etc/lilo.conf I can see the following:

    # cat /etc/lilo.conf
    image = /boot/vmlinuz
    root = /dev/sda2
    label = Linux

    Try to change your system that it looks like mine and it should be OK. In case that you have to change lilo.conf, run lilo to reinstall the boot loader:

    # lilo
    Added Linux *

    Then reboot your machine and run 'uname -r'. It finally should show you the kernel running. Btw. when I installed the pctel drivers, all modules were placed under /lib/modules/

    # ls /lib/modules/
    linmodem.ko pctel.ko pctel_hw.ko

    When I installed the driver the first time I had a very similar issue like you. But I also was running kernel-generic- because my machine has only a 800Mhz single core CPU (no need for smp). If the above does not help then I am out of ideas, sorry. Let me know if it worked for you or even not.

  8. Hi Karellen,
    good to read your last post !
    many thanks for it !

    Sorry if answering only now !
    Good news ! Now it works!

    In the meanwhile, I managed to get kernel actually working as you suggested it.
    As already told earlier, I am using Puppy Linux Slacko 53.
    As far as I knox, there is no Lilo on Puppy, but Grub instead.
    Another specificity of Puppy is to run from personal save files. That method is called "Frugal instal". That is a usefull way of using PuppyLinux, using one kernel install with customized program and dependencies installations, and so do I.
    Each (one at a time) personal file needs to be mounted to work with the vmlinuz which is outside the personal file.

    In my first attempts to get smp running, the two
    kernel-modules-smp- and
    kernel-huge-smp- files
    have been installed in the personal file.
    In it is a /boot folder with vmlinuz-k.26.37.6-smp present and a vmlinuz symlink to it as you told.
    # uname -r could'nt answer anything else but as the running vmlinuz was the generic one located outside the personal file. The one inside the personal file could'nt be booted.

    To solve that:
    There is a second way to run Puppy: = the "Full" installation; no more personal file; just one file containing the personal datas and the booting stuff (/boot/vmlinuz etc...).
    installing the above two files got the /boot folder whit vmlinuz-k.26.37.6-smp present in it and vmlinuz symlink to it.

    Now booting on it gave what follows:

    # uname -r
    Then compiling the pctel modules gave pctel.ko, pctel_hw.ko and linmodem.ko placed in /lib/modules/k.
    Then I did:

    # depmod
    # modprobe pctel

    No more error message .... looks good !

    Then , installing again all that on the machine featured with a pci pctel modem card the reproduced above messages

    # dmesg | grep -i pctel
    [ 718.344683] pctel_hw: module license 'GPL linked with proprietary libraries' taints kernel.
    [ 718.411336] pctel_hw(155): PCTel hardware driver version 0.9.7-9-rht-9 for PCT789
    [ 718.441761] pctel(481): pctel v0.1 loaded
    [ 718.441831] pctel_pci(753): device 134d:7891 is grabbed by driver serial: try to release
    [ 718.469610] pctel_hw 0000:02:09.0: PCI->APIC IRQ transform: INT A -> IRQ 18
    [ 718.469636] pctel_pci(238): PCTel device[0000:02:09.0](0x48) found 134d:7891 (rev 02), iobase=0x1040, irq=18.
    [ 718.469648] pctel_pci(628): Setup PCI port: port 0x1040, irq 18, type 0, membase (null), ops (null)
    [ 718.469671] ttyS_PCTEL0 at I/O 0x1040 (irq = 18) is a PCTel
    # ^C
    # lsmod | grep -i pctel
    pctel 8272 0
    pctel_hw 1035374 1 pctel
    linmodem 18928 1 pctel

    A fax could even be sent using efax-gtk .

    So many thanks again !! :-)