Load eagle-usb module at boot time (for Sagem ADSL Modem 800/840)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Load eagle-usb module at boot time (for Sagem ADSL Modem 800/840)
Hello,
i 've just managed to successfully install Sagem ADSL Modem 800/840 on my Ubuntu Dapper.
Now, i want to configure it starting the eagle-usb module at boot time. I' ve already run the eagleconfig and checked that option, but it doesn't work.
Does anyone know about this?
P.S : I have noticed that when i run startadsl, this takes a while. Will the boot time be affected?
As for the boot time it won't be affected much, only 2 seconds.
When things start up at boot and might take time to initialize,
the kernel itself will put them in the background and give priority
to other processes.
I have modified my one to only load if the eagle-usb module is loaded from hotplug. This saves a long boot delay.
Mine is for gentoo so it's not much use for debian.
I added eagle-usb to /etc/modules, but it didn't work.
Furthermore, giving
$lsmod | grep -E 'eagle|usb'
i take the following lines either short after the boot, either after adding the eagle-usb to the /etc/modules.
I want to say, so, that by adding the module to that file, it doesn't matter at all.
eagle_usb 125220 0
usbhid 38368 0
usbcore 129668 5 eagle_usb,usbhid,ehci_hcd,uhci_hcd
You'll find the module already loads if you are using hotplug..
You could modify hotplug's eagle-usb file to include startadsl or fctStartAdsl.
startadsl includes error codes, fctStartAdsl doesn't.
This will also keep it away from the standard boot process sequence, but be aware it will connect before your firewall is loaded..
If you don't have a boot file in /etc/init.d/ for eagle-usb, you can download the deb package from debian mirrors and copy it.
There is a file-script named eagle-usb in the /etc/init.d.
But, is this the file that you are saying to modify?
How can i modify that file to include startadsl or fctStartAdsl?
Will be alright to have a line added "startadsl" or "fctStartAdsl" ?
Thanks for the patience.
I'm back,
i searched and i found the directory /etc/hotplug/usb, which contains only one file named eagle-usb.
I am quoting it after modifying it as you told me.
Code:
#!/bin/bash
# $Id: eu_dsp,v 1.15 2005/03/28 21:36:14 Tux Exp $
# Copyright (C) 2003-2005 Olivier Borowski
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Goal :
# This script handles the ADI ADSL Modem USB driver after firmware
# uploading. It loads the DSP code as needed by the modem.
# It create a script /var/run/usb/%proc%bus%usb%002%005 in order
# for the ADSL connexion to be stopped and module to be unloaded.
# It should only be run by hotplug.
# Params (given by hotplug) :
# $DEVICE ex: /proc/bus/usb/002/005
# $DEVPATH ex: /devices/pci0000:00/0000:00:02.0/usb1/1-2/1-2:1.2
# $REMOVER ex: /var/run/usb/%proc%bus%usb%001%006
# note: only kernels 2.5+ provide $DEVPATH
# note: some distribs like SuSE9.1 does not provide $REMOVER param
# the following line will be replaced by the absolute path of setvars
. /etc/eagle-usb/setvars
# this script should only be called by hotplug (giving the $DEVICE param)
if [ -z "$DEVICE" ] ; then
doInUtf8 echo "$NO_PARAM_MSG" | logger
doInUtf8 echo -e "$NO_PARAM_MSG"
exit
fi
# this script is called multiple times by hotplug, so we try to
# send DSP only one time
SEND_DSP="false"
if [ -z "$DEVPATH" ] ; then
# kernel 2.4
SEND_DSP="true"
else
# kernel 2.5+
LAST_CHARS=`echo $DEVPATH | sed -e "s/.*\-.[^:]*//1"`
if [ "x$LAST_CHARS" = "x:1.0" ] ; then
SEND_DSP="true"
fi
fi
if [ $SEND_DSP = "true" ] ; then
if ! eaglestat | grep -q "$SEND_DSP_STR" ; then
SEND_DSP="false"
fi
fi
if [ $SEND_DSP = "true" ] ; then
# small delay to prevent a bug
sleep 1s
# script called when the modem will be unplugged
if [ -z "$REMOVER" ] ; then
REMOVER="/var/run/usb/`echo $DEVICE | sed 's/\//%/g'`"
fi
mkdir -p `dirname $REMOVER`
echo "#!/bin/sh" > $REMOVER
echo "${SBIN_DIR}/fctStopAdsl" >> $REMOVER
echo "rmmod $MODULE_STR" >> $REMOVER
chmod u+x $REMOVER
# load DSP & options
eaglectrl -d 2>&1 | logger
fi
fctStartAdsl
Moreover notice the output of the command $lsmod | grep -E 'eagle|usb', sortly after the boot.
can you describe what you did from the beggining?I mean what drivers did you install?
I suppose you took them from http://www.eagle-usb.org/
what is your kernel version? I don't know what kernel ubuntu dapper runs
so do a:
uname -r
and it will tell you the kernel version you are running.
Kernels later that 2.6.10 include the drivers for the sagem modem.
If it's already compiled like a module you just need the cmv firmware file to start it.
I believe that it's better to take it from the beggining.
I have 2.6.15-23-386.
As mentioned in many forums, the drivers that have been included in dapper's distribution have to be updated.
So, i uninstalled them and installed the eagle-usb-2.3.3.tar.bz2, which i took from http://www.eagle-usb.org/ .
Where can i find the "cmv firmware"?
I did all these but i have problems.
First of all, at http://atm.eagle-usb.org/wakka.php?wiki=UeagleAtmDoc says that in debian there is a directory /etc/hotplug/firmware, but in my distribution there isn't.
So, as you said i copied the files into the /lib/firmware/ueagle-atm directory, after creating it.
Then, i unplugged the modem and replug it and in dmseg all seemed to be ok.
Hello,
that finally worked very good, given modprobe -f ueagle-atm.
But, the problem is still there.The connection doesn't start at boot time...Moreover the modem doesn't being initiallised at boot, and waits for eaglectrl -d.
Thanks a lot, again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.