Hi John
I have a similar problem with BT Openworld under Linux, but a friend of mine
about 20 miles away ( => different exchange etc.) does not. He is running
an almost indentical configuration (also RedHat 7.2) and almost never gets
disconnected. Unlike me, however, he has a brand new machine.
My personal guess is that is not BT, but is more likely your USB chipset. I
use an old PC for my Linux ADSL machine and it has an old Intel chipset in
(with 82371SB USB chip). This apparently has a lot of problems. In time I
hope to swap to a new USB card and hopefully this will solve my them but for
now I can live with it.
In the meantime, I had to solve exactly your problem. My solution works
with RedHat 7.2, hopefully it will make enough sense for you to convert it
to FreeBSD 4.5 ....
I use a CRON script to ping yahoo every 10 minutes. If I get no reply then
I kill the modem and shut down the USB system then restart everything. This
has worked perfectly for months now, sometimes restarting the USB several
times a day. I should really extend the "check_adsl" script to also try
other places such as BBC.CO.UK if Yahoo fails just in case Yahoo is down.
At the moment it relies on Yahoo being on-line, which is a little dodgy.
Hopefully the logs below will help....
Best regards,
Roger
----------------------------------------------------------------------
[root@philip roger]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOME=/
# run-parts
*/10 * * * * root run-parts /etc/cron.tenminutes
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
[root@philip roger]# cat /etc/cron.tenminutes/check_adsl
#!/bin/sh
# Check connection to Yahoo
# If it returns zero then we are OK
# If it fails then stop and then restart the modem
if ping -c 1 yahoo.com > /dev/null ; then
logger -id CRON check of ADSL reports OK
else
logger -isd CRON check of ADSL link failed - restarting...
# This is a real hammer to crack a nut, but the modem just doesn't
# seem to cleanly restart otherwise.....
# "stusb stop" kills all the pppd and modem_run processes
# "stusb start" then restarts the modem drivers and logs us back in.
stusb stop
stusb start
fi
[root@philip roger]# which stusb
/usr/sbin/stusb
[root@philip roger]# cat /usr/sbin/stusb
#!/bin/bash
#
# stusb
#
# this will start and stop the Alcatel SpeedTouch USB ADSL adapter
# this script is based on the two scripts provided by Johan Dijoux
#
# [EMAIL PROTECTED]
# Mon Sep 3 2001
#
RETVAL=0
prog="stusb"
if [ ! -e /usr/lib/speedtouch/mgmt.o ]
then echo 'You need the microcode from the Alcatel driver';
echo 'RTFM and then';
echo 'place it under /usr/lib/speedtouch/mgmt.o';
exit 1;
fi
case "$1" in
start)
route del default
modprobe n_hdlc >& /tmp/pppd.log
modprobe ppp_synctty &> /tmp/pppd.log
modem_run -v 2 -f /usr/lib/speedtouch/mgmt.o -m
pppd call adsl &> /tmp/pppd.log &
;;
stop)
killall modem_run
killall pppd
killall noip
killall pppoa3
killall -9 modem_run
killall -9 pppd
killall -9 noip
killall -9 pppoa3
rm -f /var/run/ppp*
rmmod usb-uhci
sleep 2
modprobe usb-uhci
sleep 2
;;
*)
echo $"Usage: $0 {start|stop}"
RETVAL=1
esac
exit $RETVAL
[root@philip roger]#
----------------------------------------------------------------------
-----Original Message-----
From: John Cordner [mailto:[EMAIL PROTECTED]]
Sent: 31 May 2002 12:45
To: [EMAIL PROTECTED]
Subject: [speedtouch] Odd modem_run behaviour with FreeBSD 4.5
Hi
Just thought I'd run this by the list to see if any one has suggestions.
I've recently installed the speedtouch modem on a FreeBSD 4.5 box with the
1.1rc2 drivers. The modem connects fine and all is well, except (and I'm
sure this is down to my ISP) I get "frequent" disconnections. By frequent I
mean about once a day, but for ADSL I guess that's frequent. I've noticed
this with BT Openworld even under Linux using Alcatel (kernel) drivers so
I'm fairly sure it a BT thing.
However, that's not the problem - the problem comes when I try to reconnect.
If I do
killall modem_run
killall ppp
followed by
usr/local/sbin/modem_run -v 2 -f /usr/local/libdata/mgmt.o
reconnection fails. It doesn't seem to matter how many times I repeat the
above command (with and without a -m option) or how long I leave it; I issue
the command and it just seems to hang.
If I now pull the USB cable from the machine and wait a couple of seconds
and reconnect the cable and then re-issue the above command all works fine
again. I could live with, except this box is my server and is in a not too
readily accessible place, so having to physically access it to
disconnect/reconnect the cable is a pain.
Does anyone have any ideas about this. Obviously the state of something is
not being re-set properly, but I'm not sure what. I'm really not sure if
this is a problem with the speedtouch drivers or something to do with USB on
FreeBSD.
Thanks
John
I've included some log output below (sorry - it's a bit long):
# usbdevs -v
Controller /dev/usb0:
addr 1: self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev
0x0100
port 1 powered
port 2 addr 2: power 500 mA, config 1, Speed Touch USB (0x4061),
ALCATEL(0x06b9), rev 0x0000
# cat /var/log/modem_run.log
May 31 01:47:59 pippin modem_run[3321]: modem_run version 1.1rc2 started by
root uid 0
May 31 01:47:59 pippin modem_run[3321]: Found ALCATEL SpeedTouch USB modem
May 31 01:47:59 pippin modem_run[3321]: Best offset 6463 with probability
100
May 31 01:47:59 pippin modem_run[3321]: Best offset 526179 with probability
100
May 31 01:48:01 pippin modem_run[3321]: BLOCK1 : 991 bytes uploaded :
OK
May 31 01:48:01 pippin modem_run[3321]: Downloaded in 5.997000 ms
<snipped chunks>...
May 31 01:48:02 pippin modem_run[3321]: BLOCK2 : 511 bytes downloaded :
OK
May 31 01:48:02 pippin modem_run[3321]: Downloaded in 377.486000 ms
<snipped chunks>...
May 31 01:48:04 pippin modem_run[3321]: BLOCK3 : 526187 bytes uploaded :
OK
May 31 01:48:04 pippin modem_run[3321]: Downloaded in 2709.046000 ms
May 31 01:48:04 pippin modem_run[3321]: BLOCK4 : 511 bytes downloaded :
OK
May 31 01:48:04 pippin modem_run[3321]: Downloaded in 57.657000 ms.
<snipped chunks>...
May 31 01:48:05 pippin modem_run[3321]: Modem reference : 3EC18607GAAB02
May 31 01:48:05 pippin modem_run[3321]: modem_start_synchro :
May 31 01:48:05 pippin modem_run[3321]: 00 00
..
May 31 01:48:23 pippin modem_run[3322]: Received interrupt, len = 6
May 31 01:48:23 pippin modem_run[3322]: a1 00 01 00 00 00
......
May 31 01:48:23 pippin modem_run[3321]: ADSL synchronization has been
obtained
May 31 01:48:23 pippin modem_run[3321]: Modem State
May 31 01:48:23 pippin modem_run[3321]: c0 12 0007 :
May 31 01:48:23 pippin modem_run[3321]: 20
May 31 01:48:23 pippin modem_run[3321]: c0 12 000b :
May 31 01:48:23 pippin modem_run[3321]: 00 00 40 02 00 00 20 01
..@... .
May 31 01:48:23 pippin modem_run[3321]: c0 12 000d :
May 31 01:48:23 pippin modem_run[3321]: 0d 00 00 ea
....
May 31 01:48:23 pippin modem_run[3321]: c0 01 000e :
May 31 01:48:23 pippin modem_run[3321]: 00
.
May 31 01:48:23 pippin modem_run[3321]: c0 01 000f :
May 31 01:48:23 pippin modem_run[3321]: 00
.
May 31 01:48:23 pippin modem_run[3321]: ADSL line is up (576 kbit/s down |
288 kbit/s up)
/* modem connection dies here :(
have a few attempts with /usr/local/sbin/modem_run -v 2 -f
/usr/local/libdata/mgmt.o
output of /var/log/modem_run.log continues */
May 31 10:26:36 pippin modem_run[4054]: modem_run version 1.1rc2 started by
root uid 0
May 31 10:26:37 pippin modem_run[4054]: BLOCK0
May 31 10:26:37 pippin last message repeated 9 times
May 31 10:27:49 pippin modem_run[4073]: modem_run version 1.1rc2 started by
root uid 0
May 31 10:27:49 pippin modem_run[4073]: Found ALCATEL SpeedTouch USB modem
May 31 10:27:49 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:49 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:49 pippin modem_run[4073]: BLOCK0
May 31 10:27:49 pippin modem_run[4073]: Retrying to upload microcode (#0)
May 31 10:27:49 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:49 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:49 pippin modem_run[4073]: BLOCK0
May 31 10:27:49 pippin modem_run[4073]: Retrying to upload microcode (#1)
May 31 10:27:49 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:49 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:49 pippin modem_run[4073]: BLOCK0
May 31 10:27:49 pippin modem_run[4073]: Retrying to upload microcode (#2)
May 31 10:27:49 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:49 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:49 pippin modem_run[4073]: BLOCK0
May 31 10:27:49 pippin modem_run[4073]: Retrying to upload microcode (#3)
May 31 10:27:49 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:50 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:50 pippin modem_run[4073]: BLOCK0
May 31 10:27:50 pippin modem_run[4073]: Retrying to upload microcode (#4)
May 31 10:27:50 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:50 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:50 pippin modem_run[4073]: BLOCK0
May 31 10:27:50 pippin modem_run[4073]: Retrying to upload microcode (#5)
May 31 10:27:50 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:50 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:50 pippin modem_run[4073]: BLOCK0
May 31 10:27:50 pippin modem_run[4073]: Retrying to upload microcode (#6)
May 31 10:27:50 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:50 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:50 pippin modem_run[4073]: BLOCK0
May 31 10:27:50 pippin modem_run[4073]: Retrying to upload microcode (#7)
May 31 10:27:50 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:50 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:50 pippin modem_run[4073]: BLOCK0
May 31 10:27:50 pippin modem_run[4073]: Retrying to upload microcode (#8)
May 31 10:27:50 pippin modem_run[4073]: Best offset 6463 with probability
100
May 31 10:27:50 pippin modem_run[4073]: Best offset 526179 with probability
100
May 31 10:27:50 pippin modem_run[4073]: BLOCK0
May 31 10:27:50 pippin modem_run[4073]: Retrying to upload microcode (#9)
/* after serveral attempts of
usr/local/sbin/modem_run -v 2 -f /usr/local/libdata/mgmt.o
give up and pull USB cable from back of box
wait 10 seconds and reconnect USB cable
try modem_run command again
Success!! */
May 31 10:30:40 pippin modem_run[4087]: modem_run version 1.1rc2 started by
root uid 0
May 31 10:30:40 pippin modem_run[4087]: Found ALCATEL SpeedTouch USB modem
May 31 10:30:40 pippin modem_run[4087]: Best offset 6463 with probability
100
May 31 10:30:40 pippin modem_run[4087]: Best offset 526179 with probability
100
May 31 10:30:42 pippin modem_run[4087]: BLOCK1 : 991 bytes uploaded :
OK
May 31 10:30:42 pippin modem_run[4087]: Downloaded in 6.000000 ms
<snipped chunks>...
May 31 10:30:43 pippin modem_run[4087]: BLOCK2 : 511 bytes downloaded :
OK
May 31 10:30:43 pippin modem_run[4087]: Downloaded in 353.401000 ms
<snipped chunks>...
May 31 10:30:45 pippin modem_run[4087]: BLOCK3 : 526187 bytes uploaded :
OK
May 31 10:30:45 pippin modem_run[4087]: Downloaded in 2704.942000 ms
May 31 10:30:45 pippin modem_run[4087]: BLOCK4 : 511 bytes downloaded :
OK
May 31 10:30:45 pippin modem_run[4087]: Downloaded in 56.529000 ms.
<snipped chunks>...
May 31 10:30:46 pippin modem_run[4087]: Modem reference : 3EC18607GAAB02
May 31 10:30:46 pippin modem_run[4087]: modem_start_synchro :
May 31 10:30:46 pippin modem_run[4087]: 00 00
..
May 31 10:31:00 pippin modem_run[4088]: Received interrupt, len = 6
May 31 10:31:00 pippin modem_run[4088]: a1 00 01 00 00 00
......
May 31 10:31:00 pippin modem_run[4087]: ADSL synchronization has been
obtained
May 31 10:31:00 pippin modem_run[4087]: Modem State
May 31 10:31:00 pippin modem_run[4087]: c0 12 0007 :
May 31 10:31:00 pippin modem_run[4087]: 20
May 31 10:31:00 pippin modem_run[4087]: c0 12 000b :
May 31 10:31:00 pippin modem_run[4087]: 00 00 40 02 00 00 20 01
..@... .
May 31 10:31:00 pippin modem_run[4087]: c0 12 000d :
May 31 10:31:00 pippin modem_run[4087]: 0d 00 00 ea
....
May 31 10:31:00 pippin modem_run[4087]: c0 01 000e :
May 31 10:31:00 pippin modem_run[4087]: 00
.
May 31 10:31:00 pippin modem_run[4087]: c0 01 000f :
May 31 10:31:00 pippin modem_run[4087]: 00
.
May 31 10:31:00 pippin modem_run[4087]: ADSL line is up (576 kbit/s down |
288 kbit/s up)
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire :
mailto:[EMAIL PROTECTED]?subject=unsubscribe
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe