[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Driver for Lucent modem



Short question: Where from can I download precompiled driver for
                Lucent (Agere Systems) modem for Debian Etch?
 
Please forward reply to my private email: dmjuraj-gzap@yahoo.com.au
 
Long description:
 
WARNING: Don't do this at home!
 
I have problem configuring my modem within etch.
I have Lucent modem that worked with 2.4 kernel in sarge.
 
$ lspci
00:13.0 Communication controller: Agere Systems 56k WinModem (rev 01)
$ lspci -n
00:13.0 0780: 11c1:0440 (rev 01)
 
Driver that I used does not compile now.
After searching I found ltmodem-2.6.alk-8.tar.bz2
Docs with packages say it is not enough to install linux-headers-2.6-686
but I have to install whole kernel source and compile. So I did.
 
I untared source:
ln -s /usr/src/linux-source-2.6.18 /usr/src/linux-2.6.18
cd /usr/src/linux-2.6.18
cp /boot/config-2.6.18-4-686 .config
make bzImage
make modules
 
I thing produced kernel should be same as one that is installed (since
I used unmodified configuration) so I did not install this kernel.
Now to compile modem driver.
After untaring driver when I compiled it there was error!
 
$ make -k
make -C /usr/src/linux-2.6.18 SUBDIRS=/home/juraj/tmp/source/ltmodem-2.6-alk-8 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.18'   CC [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/lt_modem.o
/home/juraj/tmp/source/ltmodem-2.6-alk-8/lt_modem.c:123: error: expected ?)? before string constant
/home/juraj/tmp/source/ltmodem-2.6-alk-8/lt_modem.c:125: error: expected ?)? before string constant
/home/juraj/tmp/source/ltmodem-2.6-alk-8/lt_modem.c:130: error: expected ?)? before string constant
make[2]: *** [/home/juraj/tmp/source/ltmodem-2.6-alk-8/lt_modem.o] Error 1
  CC [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/serial.o
/home/juraj/tmp/source/ltmodem-2.6-alk-8/serial.c:735: error: unknown field ?devfs_name? specified in initializer
make[2]: *** [/home/juraj/tmp/source/ltmodem-2.6-alk-8/serial.o] Error 1
make[2]: Target `__build' not remade because of errors.
make[1]: *** [_module_/home/juraj/tmp/source/ltmodem-2.6-alk-8] Error 2
make[1]: Target `modules' not remade because of errors.
make[1]: Leaving directory `/usr/src/linux-source-2.6.18'
make: *** [module] Error 2
 
Relevant code from lt_modem.c is here:
120: static int vendor_id = 0;
121: static int device_id = 0;
122:
123: MODULE_PARM(vendor_id, "i");
124: MODULE_PARM_DESC(vendor_id, "Vendor ID of the Lucent Modem e.g. vendor_id=0x11c1");
125: MODULE_PARM(device_id, "i");
126: MODULE_PARM_DESC(device_id, "Device ID of the Lucent Modem e.g. device_id=0x0440");
127:
128: static int Forced[4] = {-1,-1,-1,0};
129:
130: MODULE_PARM(Forced, "4i");
131: MODULE_PARM_DESC(Forced, "Forced Irq,BaseAddress,ComAddress[,NoDetect] of the Lucent Modem e.g. Forced=3,0x130,0x2f8");
 
After little reading kernel source I decided to replace offending lines with new ones:
123: MODULE_PARM(vendor_id, "i");
125: MODULE_PARM(device_id, "i");
130: MODULE_PARM(Forced, "4i");
for:
123: module_param(vendor_id, int, 0);
125: module_param(device_id, int, 0);
130: module_param_array(Forced, int, NULL, 0);
 
Note that I do not really know what am I doing here and this
does not solve problem (read later) but it compile now with no error :)
 
I also changed serial.c file to make it compileable:
 
728: static struct uart_driver lt_serial_reg = {
729:  .owner   = THIS_MODULE,
730:  .driver_name  = "ltserial",
731: #ifdef LT_USE_OLD_NAMES
732: // .devfs_name  = "tts/LT",
733:  .dev_name  = "ttyLT",
734: #else
735: // .devfs_name  = "tts/LTM",
736:  .dev_name  = "ttyLTM",
737: #endif
738:  .major   = 62,
739:  .minor   = 64,
740:  .nr   = 1,
741:  .cons   = 0,
742: };
 
I did commented out lines 732 and 735 after checking in kernel's file
  /usr/src/linux-source-2.6.18/include/linux/serial_core.h
that struct uart_driver indeed does not have member named devfs_name!
After that:
$ make
make -C /usr/src/linux-2.6.18 SUBDIRS=/home/juraj/tmp/source/ltmodem-2.6-alk-8 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.18'
  CC [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/lt_modem.o
  CC [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/serial.o
  LD [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/ltmodem.o
  LD [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/ltserial.o
  Building modules, stage 2.
  MODPOST
  CC      /home/juraj/tmp/source/ltmodem-2.6-alk-8/ltmodem.mod.o
  LD [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/ltmodem.ko
  CC      /home/juraj/tmp/source/ltmodem-2.6-alk-8/ltserial.mod.o
  LD [M]  /home/juraj/tmp/source/ltmodem-2.6-alk-8/ltserial.ko
make[1]: Leaving directory `/usr/src/linux-source-2.6.18'
 
Now module compile without any error reported.
Me very happy!
 
Following docs further I did:
copy ltmodem.ko and ltserial.ko into folder
/lib/modules/2.6.18-4.686/other
that I created.
Also added ltserial to /etc/modules.
 
Now to configure udev here is part of doc:
    UDEV setup
We'll add new udev rule. Copy ltmodem.rules from this directory
to /etc/udev/udev.rules/. You may want to fix group owner if your distro
is not Debian. Just make sure that GROUP parameter matches group owner
of /dev/ttyS0 (ls -l /dev/ttyS0 is your friend).
==== DOC ENDS HERE ===
 
ltmodem.rules has only one line (except comment)
KERNEL="ttyLTM[0-9]", NAME="%k", MODE="0660", GROUP="dialout", SYMLINK="modem"
 
On my system /etc/udev/udev.rules is file not directory so I inserted
that one at the end of udev.rules file and also copied
whole file ltmodem.rules to directory /etc/udev figuring that system
will pick which one it likes!
 
At this point I rebootet machine with great expectations.
# ll /dev/ttyL*
crw-rw---- 1 root dialout 62, 64 2007-04-18 17:07 /dev/ttyLTM0
Great = devices is created!
# ll /dev/modem
ls: /dev/modem: No such file or directory
 
No link created :( But no big deal
ln -s /dev/ttyLTM0 /dev/modem
solves the problem
 
After that testing modem with minicom.
# minicom
 
And that is all. Computer is frozen. No keyboard, no mouse responses.
Even power button does not react when I wanted to turn it off.
I had to reach switch at back of the case (never used this one before)
to shut down computer.
 
End of story.
 
Every time I wanted to use minicom computer freeze.
I tried manually load and unload driver and it reports
no error.
 
So big question is: How to enable modem?
 
Morale: Kids do not play with kernel. Use ball instead!
 
Juraj

Send instant messages to your online friends http://au.messenger.yahoo.com


Reply to: