LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-25-2006, 03:07 AM   #1
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Rep: Reputation: 0
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?

Thanks a lot.
 
Old 05-25-2006, 03:19 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
you can add the module name to /etc/modules
 
Old 05-25-2006, 04:08 AM   #3
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
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.
 
Old 05-25-2006, 04:55 AM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
Do you have an init script in /etc/init.d ?

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.
 
Old 05-25-2006, 10:58 AM   #5
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for your replies...

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

Any idea...?
Thanks
 
Old 05-25-2006, 11:09 AM   #6
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
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.
 
Old 05-25-2006, 11:25 AM   #7
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 05-26-2006, 02:49 AM   #8
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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.

eagle_usb 125220 0
usbhid 38368 0
usbcore 129668 5 eagle_usb,usbhid,ehci_hcd,uhci_hcd

I must say that after modifying that file nothing happened. Is it true that the above file that i've just quoted is called at the boot time?
 
Old 05-26-2006, 03:48 AM   #9
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
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.

First of all tell us what kernel do you have.
 
Old 05-26-2006, 04:02 AM   #10
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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"?
 
Old 05-26-2006, 04:54 AM   #11
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
First go to http://atm.eagle-usb.org/wakka.php?wiki=UeagleAtmDoc
it tells you how to configure the modules.
As for the cmv files goto http://eagle-usb.org/ueagle-atm/non-free/
and download the ueagle-data-1.1.tar.gz

To install the firmware it's pretty easy of just copying the files to the firmware
directory

In my case I created a dir named ueagle-atm in /lib/firmware/

After finish installing, unplug the modem, plug it in and check dmesg if no error occurs then you are ok, else post back.
 
Old 05-26-2006, 05:36 AM   #12
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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.

Again, at http://atm.eagle-usb.org/wakka.php?wiki=UeagleAtmDoc for testing the module, says :
$probe ueagle-atm
which produces
FATAL: module ueagle-atm not found.

Furthermore, at the heading Driver Test, says that there is a directory /lib/modules/`uname -r`/extra, but there isn't.

After, all these i created a directory firmware in th /etc/hotplug and did the same, but nothing happened.

What am i supposed to do now?
 
Old 05-26-2006, 06:40 AM   #13
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
download the file http://download.gna.org/ueagleatm/ueagle-atm-1.3.tar.gz
and do

$ cd ueagle-atm-1.3
$ make

As root

# make install (copied exactly as mentioned to the site)

this should compile the modules
 
Old 05-26-2006, 11:09 AM   #14
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 05-29-2006, 05:16 AM   #15
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
about the connection at boot time I believe you should add the 'eaglectrl -w -d' at one of the init.d
scripts

I don't really know how to do this but do a search in this forum and you'll find enough info on how
to initialize commands at boot time
 
  


Reply

Tags
adsl, modem, sagem


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with eagle-usb driver Sagem 800 martin1il Fedora 2 11-05-2005 06:09 PM
Sagem F@st 800 PE usb adsl modem Geosharp Linux - Hardware 0 02-01-2004 06:25 PM
using sagem 800 adsl usb modem on Mandrake 9.2 Or suse 9.0? Ejg Linux - Newbie 0 01-28-2004 12:39 PM
SAGEM F@st 800-840 adsl modem andy010 Linux - Networking 0 11-20-2003 08:28 PM
Sagem F@ast 800 ADSL modem (USB) in RedHat 9.0 Terenus Linux - Hardware 2 09-19-2003 03:36 PM


All times are GMT -5. The time now is 03:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration