Pages

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 http://linmodems.technion.ac.il/pctel-linux/welcome.html:

# cd /usr/src
# wget http://linmodems.technion.ac.il/pctel-linux/pctel-0.9.7-9-rht-12.tar.gz
...
# 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/2.6.37.6/misc/pctel_hw.ko): Invalid module format
FATAL: Error inserting pctel (/lib/modules/2.6.37.6/misc/pctel.ko): Invalid module format

Then check the system logs:

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

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

# uname -r
2.6.37.6

In this case you have to install the packages kernel-huge-smp-2.6.37.6_smp-i686-2 and kernel-modules-smp-2.6.37.6_smp-i686-2, 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