Bienvenue sur eagle-usb

EagleDev

DevEagleUsbATM

PagePrincipale :: DerniersChangements :: DerniersCommentaires :: ParametresUtilisateur :: Vous êtes 18-97-14-88.crawl.commoncrawl.org
Proposition to use the usbatm library in order we can merge the driver in the kernel tree.

This is only intended to work with kernel-2.6.x : no compatibility with kernel-2.4.x is to be expected in the short term... It has been tested with kernel >= 2.6.10

You can find version 1.0 (and previews) at http://castet.matthieu.free.fr/eagle/release
Please subscribe to the development mailing-list of ueagle-atm to provide feedback



WARNING this page is a bit obsolete, see Atm:UeagleAtmDoc (interwiki) & Atm:UeagleATMsvn (interwiki)



In order to use it, you need cvs version of usb-atm ( cvs -d:ext:anoncvs@cvs.infradead.org:/home/cvs co usbatm)

the firmware file are named eagleI.fw, eagleII.fw, eagleIII.fw. You can find them in user/data directory or regenerate it with mk_fw.

the dsp is named by default DSP.bin, you can pass as a module option the name.
The dsp should be generated with bnm2dsp. (a default dsp is in user/data)

the cmv is named by default CMV.bin, you can change the name with a module option. (a default cmv is in user/data for free degroupe). It should be generated with buildcmv.

All encapsulation supported by the kernel work : pppoa, pppoe and routed-ip.
Currently, there is no support for dhcp in routed-ip mode, but it is not too difficult to add one if it is really needed.

In a future the module options could be changed by editing /sys/module/eagle_usb/parameters/.

The iso mode isn't actually supported in usb_atm, but there is a pending patch.

In bulk mode, some controller (VIA, ...) could have problem with high speed, it should be resolved by using iso mode.

There is currently no way to control the driver from userspace, but it should be done via sysfs.

Sometimes the stat info are strange (in particular the attenuation).


Any comment, review are welcome : FeedBackEagleUsbATM
It could be also interesting that people having bad quality line (frequent reboot) could test it.
A more clear documentation is being prepared for configuration of ueagle-atm driver

If you previously used a self-defined interface name in modprobe.conf (eg: "options eagle-usb if_name=eagle_usb"), remove or comment this line as it is not supported.


Install at a glance


WARNING this page is a bit obsolete, see Atm:UeagleAtmDoc (interwiki) & Atm:UeagleATMsvn (interwiki)

Here are the commands to get it to work (with minimal explanation), in $HOME/ueagleusbatm_dev/ (for example)

mkdir -p $HOME/ueagleusbatm_dev/
cd $HOME/ueagleusbatm_dev/

# connected to internet, download latest version
cvs -d:ext:anoncvs@cvs.infradead.org:/home/cvs co usbatm # download latest cvs version for usbatm : creates a directory usbatm/
wget http://castet.matthieu.free.fr/eagle/iso.patch # download iso patch for usbatm
wget http://castet.matthieu.free.fr/eagle/ueagle-pre4.tar.gz # download latest version of ueagleatm driver

# info :you may need to uninstall eagle-usb driver before continuing

# compile usbatm
cd usbatm
patch < ../iso.patch # apply the patch
make all # compile
make install # install as root (you have to log in as root or use sudo) depmod -ae is automatically run

# compile ueagleatm driver
cd $HOME/ueagleusbatm_dev/
tar zxvf ueagle-pre4.tar.gz # uncompress ueagleatm driver
cd ueagle-pre4
rm usbatm.h ; ln -s ../usbatm/usbatm.h # create required link to compile ueagleatm driver
make all # compile
make install # install the driver as root
cp CMV.bin DSP.bin eagleI.fw eagleII.fw eagleIII.fw /usr/lib/hotplug/firmware/ # copy required files where needed (see config below)

tail -f /var/log/messages # in a first terminal window to check the result of following commands
modprobe atm # load the module atm
modprobe usbatm ; modprobe ueagle-atm # may be required if your modem was not plugged in

Common errors / diag

modules are not installed at the appropriate location
For Mandrake users with kernel-2.6-2.6.11-7mdk, the modules may be installed in
/lib/modules/2.6.11-7mdkcustom/extra/testatm.ko
/lib/modules/2.6.11-7mdkcustom/extra/usbatm.ko
/lib/modules/2.6.11-7mdkcustom/extra/ueagle-atm.ko
=> remove custom from the line in /usr/src/linux/Makefile
EXTRAVERSION = -7mdkcustom


unknown symbol at loading usbatm module
In /var/log/messages, it may appear :
kernel: usbatm: Unknown symbol shutdown_atm_dev
kernel: usbatm: Unknown symbol atm_dev_register
kernel: usbatm: Unknown symbol atm_charge

Verify that the atm module is loaded with lsmod | grep atm. You should obtain :
usbatm 17936 0
atm 34552 1 usbatm
usbcore 102264 3 usbatm,uhci-hcd
=> If not then do modprobe atm, /var/log/messages will show :
kernel: NET: Registered protocol family 8
kernel: NET: Registered protocol family 20

unknown symbol at loading eagle-usb module
In /var/log/messages, it may appear :
kernel: eagle-usb: Unknown symbol release_firmware
kernel: eagle-usb: Unknown symbol request_firmware
=> firmware_class module must be loaded. With lsmod|grep -iE "usb|atm|firm" you should obtain :
ueagle-atm 19900 0
firmware_class 7072 1 ueagle-atm
usbatm 19152 1 ueagle-atm
atm 34744 1 usbatm
usbhid 42176 0
usbcore 101432 5 ueagle-atm,usbatm,usbhid,uhci-hcd

firmware not available
At plugging the modem, if you obtain :
kernel: usb 1-2: new full speed USB device using uhci_hcd and address 5
kernel: [UEAGLE-USB] eagleIII.fw : Firmware not available
kernel: ueagle-atm: probe of 1-2:1.0 failed with error -2
=> try to debug hotplug ;-) maybe the firmware is not correctly loaded by firmware_class :-(
  • in /etc/hotplug/firmware.agent put a line with DEBUG=yes export DEBUG (uncomment the existing one)
  • service hotplug restart # to take it into account (/var/log/messages should show at least usb being detected...)
  • modprobe ueagle-atm module_dbg_mask=0xFF # to enable debugging in ueagle-atm driver (modinfo ueagle-atm shows you other parameters...)

  • # info : see below for configuration of several types of access, be it routed ip, pppoa, pppoe


    For free dégroupé



    required packages
    Debian : atm-tools atm-dev
    Mandrakelinux : linux-atm liblinux-atm1
    In Cooker : linux-atm-2.4.1-7mdk liblinux-atm1-2.4.1-7mdk
    You need to load the cvs usbatm library before loading the driver (or install it)

    connection
    For free degroupe (routed ip), once the module is loaded, you need to do :

    sudo atmarp -c 0
    sudo ifconfig atm0 $MYIP netmask 255.255.255.0 mtu 1500
    sudo atmarp -s $MYGWIP 0.8.36 null
    sudo route add default gw $MYGWIP

    where $MYIP is your ip and $MYGWIP our ip with 254 for the last byte.



    For pppd users


    Tested on Mandrakelinux cooker.
    Required package : ppp-pppoatm-2.4.3-4mdk

    - modprobe usbatm

    - modprobe eagle-usb

    - after few seconds, eaglestat should display "Driver version ueagle", "Modem is operational"

    - example of config files : (based on the documentation of the link below)

    ========= /etc/ppp/peers/ppp_usbatm =========
    lock
    ipparam ppp0
    noipdefault
    noauth
    default-asyncmap
    defaultroute
    hide-password
    noaccomp
    noccp
    nobsdcomp
    nodeflate
    nopcomp
    novj novjccomp
    lcp-echo-interval 20
    lcp-echo-failure 3
    sync
    maxfail 0
    persist
    user "0000000000@freeadsl"
    plugin /usr/lib/pppd/2.4.3/pppoatm.so 8.35
    =========================================

    You may have to change the absolute path of pppoatm.so to match your distrib

    ========= /etc/ppp/chap-secrets =========
    # Secrets for authentication using CHAP
    # client server secret IP addresses
    "0000000000@freeadsl" * "abcdefg" *
    =========================================


    - start the connexion with "pppd call ppp_usbatm"


    There are several tutorials that describe how to use it for other configurations (ppp, bridged ethernet, ...) on the net
    http://www.andesi.org/index.php?node=93

    http://lea-linux.org/hardware/free_degroupe.html [fr] Free dégroupé
    http://lea-linux.org/hardware/speedtouch2.html [fr] PPPoE (see the end)

    show stats
    cat /proc/driver/ueagle-atm/*

    pppoe
    packet br2684ctl for debian is need.
    You need a kernel with RFC 1483/2684 Bridged protocols enabled

    Once the modem is running.

    load br2684 module :
    # modprobe br2684

    then you need to create an ethernet interface with br2684ctl
    In most of case (only one atm interface) you need to run :
    # br2684ctl -c 0 -e x vpi.vci

    If x=0 then it is LLC encapsulation
    if x=1 then it is VC mux encapsulation

    vpi/vci value are given by your provider.
    For example in france
    # br2684ctl -c 0 -b -a 8.35
    br2684ctl[18144]: Interface "nas0" created sucessfully
    br2684ctl[18144]: Communicating over ATM 0.8.35, encapsulation: LLC
    br2684ctl[18144]: Interface configured

    Then you need to configure the interface : assign an IP address and netmask (you can also assign a Ethernet MAC address if necessary)
    # ifconfig nas0 192.168.2.1 netmask 255.255.255.0


    Now you can use the "nas0" ethernet interface. You could for example run adsl-start for starting rp-pppoe.

    routed ip

    You need a kernel with Classical IP over ATM enabled

    Once the modem is running.

    First you should check that the atmarpd daemon is running.
    If not you should try to start it with /etc/init.d/atm start

    If it still don't work use atmarpd -b

    Create the specified an IP interface with :
    # atmarp -c 0

    # ifconfig atm0 # should show
    atm0      Lien encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
              [PAS INDICATEURS]  MTU:9180  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 lg file transmission:100
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

    Then you need to configure the atm interface with ifconfig. You need to use the adress IP given by your provider.
    For example :
    # ifconfig atm0 $MYIP netmask 255.255.255.0 mtu 1500

    Then you need to configure the atm arp daemon, for that you need the adress IP of your gateway.
    If you want a LLC encapsulation then run
    # sudo atmarp -s $MYGWIP vpi.vci
    or if you want VC mux encapsualtion
    # sudo atmarp -s $MYGWIP vpi.vci null

    vpi/vci value are given by your provider.

    Finaly you need to add a default route to your gateway
    # sudo route add default gw $MYGWIP

    Now everything should work (you need to configure your dns in /etc/resolv.conf)
    DHCP isn't curently supported even if there was a patch that add it for 2.6.8 kernel (don't work anymore with recent kernel)


    pppoa
    you need ppp package on debian
    your kernel need to support :
    PPP (point-to-point protocol) support
    PPP support for async serial ports
    PPP support for sync tty ports
    PPP Deflate compression
    PPP BSD-Compress compression
    PPP over ATM

    Then assuming the modem is runing, you need to configure ppp.
    load pppoatm
    # modprobe pppoatm

    For example it could be

    # example configuration for the kernel space PPP over ATM driver
    #
    # See the manual page pppd(8) for information on all the options.

    # MUST CHANGE: replace myusername@realm with the PPP login name given to
    # your by your provider.
    # There should be a matching entry with the password in /etc/ppp/pap-secrets
    # and/or /etc/ppp/chap-secrets.
    user "myusername@realm"

    # Load the PPPoA plugin.
    plugin pppoatm.so

    # VP.VC pair used by your ISP.
    8.35

    # Enable this option if your ISP uses PPPoA with LLC encapsulation.
    #llc-encaps

    # Assumes that your IP address is allocated dynamically by the ISP.
    noipdefault
    # Try to get the name server addresses from the ISP.
    usepeerdns
    # Use this connection as the default route.
    defaultroute

    # Makes pppd "dial again" when the connection is lost.
    persist

    # Do not ask the remote to authenticate.
    noauth



    Once the configuration is ok, you need to run
    # pppd user myusername@realm
    Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]