Sergio Freire a Ãcrit :
> Duncan and all,
> if i use the kernel driver, besides the "-k" switch in modem_run, what
> else should i do?
> I dont need to run pppoa3 since im using ATM on the kernel or should i
> use it also?
> Currently im using the following script to connect:
> ---------------------------------------------------
> 
> #!/bin/bash
>  
> rmmod uhci-hcd
> umount /proc/bus/usb
> 
> modprobe usbcore
> modprobe uhci-hcd
> modprobe ehci-hcd
> 
> killall adsl-connect
> killall pppoa3
> killall pppd
> sleep 5
> killall -9 adsl-connect
> killall -9 pppoa3
> killall -9 pppd
> modprobe tun
> mount -t usbdevfs none /proc/bus/usb
> echo Loading firmware... Please wait
> /usr/local/sbin/modem_run -m -f /usr/lib/mgmt.o
> /usr/local/sbin/pppoa3 -b -e 1 -m 1 -c -vpi 0 -vci 35
> echo Dialing ...
> /sbin/adsl-start
> route add default ppp0
> echo To stop the connection use adsl-stop...
> echo To start the connection after stop, use adsl-start

The 1.3 release of the usermode driver introduce a new feature that can 
if not properly configured cause a lot of problem : hotplug.

Currently, each time you plug the modem or you load the USB modules or 
whatever (each time the system discover that the modem has been 
connected), the speedtouch-start script is run THREE times (it's a bug 
in hotplug).

To solve the problem of knowing if the firmware has been loaded or not, 
modem_run has been modified to have the following behaviour:

case 1: firmware not loaded
   -> it loads firmware
   -> it waits for synch (30 s approx.)
   -> exit code is 0

case 2: firmware is loaded but no synch
   -> it exits immediately with exit code -1

case 3: firmware is loaded and synch is OK
   -> it exists immediately with exit code 0.

This is achieve using a mutex library (mutex.c) which is implemented 
using IPC semaphore, to ensure that if you run several modem_run at the 
same time, one and only one will load the firmware into the modem.

So, from that, there are two known issues:

- your script (modprobe -r uhci-hcd, modprobe uhci-hcd) doest not take 
care of all the hotplug generates. That's why you got disconnected later 
(maybe the -c option of pppoa3 is not properly used).

- under some circonstance, the mutex stay in memory and still indicate 
that the firmware has been loaded.... where it is not.

I would say that it's not easy to maintain the "state" of the modem 
witch accuracy in user mode since process can be killed (with kill -9) 
and since USB events are difficult to track. Maybe we should find a more 
easier solution with kernel mode driver (even if we still need one for 
usermode driver).

Benoit PAPILLAULT


Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]

        

Reply via email to