Donate Share

Conexant USB ADSL Modem in Linux

Subscribe

Free ADSL Versatel (Belgium) + Fedora Core 2

  1. 2004-08-31 14:06:17 UTC
    Hi everybody

    I am glad to post that I was able to make an E-Tech USB modem work with my Fedora Core 2 with a kernel 2.6.6 for Free ADSL Versatel in Belgium:

    The specifications for Free ADSL Versatel (Belgium) are:

    --- Protocol mode = PPP over ATM
    --- VPI = 8
    --- VCI = 35

    You also need a username (like 'vt123456@versadsl.be') and a password, that you get when subscribing on <http://www.versatel.be>.

    1. It is a long way: First, you have to rebuild the kernel (2.6.6) for enabling some extra modules. But before recompiling, after getting the sources of the kernel with "yum install kernel-sourcecode", you will also have to apply a patch to the source.

    Here are more details for the operations you have to perform:

    1.a) Make a copy of the kernel source in some directory of yours:

    $ cp -rd --parents /usr/src/linux-2.6.6-<extra_version> /home/<user>/<some_path>
    $ cd /home/<user>/<some_path>/
    $ mv linux-2.6.6-<extra_version> linux-2.6.6-custom
    $ cd linux-2.6.6-custom

    1.b) edit the file Makefile there and change the variable EXTRAVERSION at the top to:

    EXTRAVERSION = -custom

    1.c) enable the following modules with "make gconfig", "make xconfig" or "make menuconfig" (m means enable as module, y means include in the kernel itself):
    -------------------------------------------------------------------------------
    # CONFIG_ATM (Networking support > Networking support net > ATM)
    CONFIG_ATM=m
    CONFIG_ATM_CLIP=m
    CONFIG_ATM_CLIP_NO_ICMP=y
    CONFIG_ATM_LANE=m
    CONFIG_ATM_MPOA=m
    CONFIG_ATM_BR2684=m
    CONFIG_ATM_BR2684_IPFILTER=y

    # ATM drivers (Device drivers > Networking support > Network device support > ATM drivers)
    CONFIG_ATM_TCP=m
    CONFIG_ATM_LANAI=m
    CONFIG_ATM_ENI=m
    # CONFIG_ATM_ENI_DEBUG is not set
    # CONFIG_ATM_ENI_TUNE_BURST is not set
    CONFIG_ATM_FIRESTREAM=m
    CONFIG_ATM_ZATM=m
    # CONFIG_ATM_ZATM_DEBUG is not set
    CONFIG_ATM_NICSTAR=m
    CONFIG_ATM_NICSTAR_USE_SUNI=y
    CONFIG_ATM_NICSTAR_USE_IDT77105=y
    CONFIG_ATM_IDT77252=m
    # CONFIG_ATM_IDT77252_DEBUG is not set
    # CONFIG_ATM_IDT77252_RCV_ALL is not set
    CONFIG_ATM_IDT77252_USE_SUNI=y
    CONFIG_ATM_AMBASSADOR=m
    # CONFIG_ATM_AMBASSADOR_DEBUG is not set
    CONFIG_ATM_HORIZON=m
    # CONFIG_ATM_HORIZON_DEBUG is not set
    CONFIG_ATM_IA=m
    # CONFIG_ATM_IA_DEBUG is not set
    CONFIG_ATM_FORE200E_MAYBE=m
    # CONFIG_ATM_FORE200E_PCA is not set
    CONFIG_ATM_HE=m
    CONFIG_ATM_HE_USE_SUNI=y

    # PPP (Device drivers > Networking support > Network device support > PPP)
    CONFIG_PPPOATM=m

    # USB (Device Drivers > USB support > Alcatel Speedtouch USB)
    CONFIG_USB_SPEEDTOUCH=m
    -------------------------------------------------------------------------------

    1.d) apply a patch to the file drivers/usb/misc/speedtch.c; you can find that patch on the site of Francesco Zuliani: <http://www.zullinux.it/linux/patch-2.6.6_20040517_accessrunner.gz>; save that file in the /tmp directory.

    $ cd /home/<user>/<some_path>/linux-2.6.6-custom
    $ gunzip -c /tmp/patch-2.6.6_20040517_accessrunner.gz | patch -p1

    shortly stated: this patch extends the capabilities of the speedtch.c driver so it works with a lot of other USB modems, and also with the E-Tech USB v2 modem (VendorID=0572 and ProductID=cb00);

    1.e) compile the kernel and the modules with make:

    $ make all

    1.f) install the new kernel and the new modules (as root):

    # make install

    You will have to wait some time for the steps 1.e) and 1.f);

    1.g) reboot the system with the new customised kernel, check your system and cycle through steps 1.c) to 1.f); next commands (as root) should succeed without error:

    # /sbin/modprobe pppoatm
    # /sbin/modprobe speedtch

    2. You have to install linux-atm. It doesn't belong to the Fedora distribution. You can follow this link: http://sourceforge.net/projects/accessrunner, get the file linux-atm-2.4.1-1.i386.rpm and install it with the command rpm (as root):

    # rpm -ivh linux-atm-2.4.1-1.i386.rpm

    3. You have to install the packages libusb and libusb-devel. This is easy with yum (as root):

    # yum install libusb libusb-devel

    4. The ppp package of Fedora doesn't include the plugin called pppoatm.so. So you have to download the rpm package ppp-2.4.0-2.i386.rpm that includes that plugin at <http://rpm.pbone.net/index.php3/stat/4/idpl/1102275/com/ppp-2.4.0-2.i386.rpm.html>. ONCE DOWNLOADED, you will have to remove the own ppp package and replace it with the non-Fedora ppp package. This step is critical because you will be a short moment without ppp software.

    Before installing the package, you can check that it contains the pppoatm.so plugin by issuing:

    $ rpm -qlp ppp-2.4.0-2.i386.rpm | grep pppoatm.so

    if the plugin is present, you will see where it lives from the output of the command above, otherwise no output will be shown and you will have to find some other ppp package that does contain the plugin;

    4.a) so, if pppoatm.so is available in the alternate ppp package, remove the current ppp package:

    # rpm -e --nodeps ppp

    4.b) install the alternative ppp package:

    # rpm -ivh --nodeps ppp-2.4.0-2.i386.rpm

    4.c) by the way, if you are using the yum package management system, don't forget to add a line in the [main] section of the /etc/yum.conf file:
    -------------------------------------------------------------------------------
    exclude=ppp
    -------------------------------------------------------------------------------
    this will prevent yum from erasing your alternative package ppp during some future update. If you are using up2date, you will have to perform some similar operation for achieving this goal.

    5. Up to now, we only have prepared the system, but did not download the software doing the real job. We have to download the cxacru package prepared by Josep Comas BUT MODIFIED by Francesco Zuliani. You can find all the necessary stuff at <http://www.zullinux.it/linux/accessrunner.html>.

    We need the following packages:

    --- linux-atm (Francesco Zuliani seems to say this package is not necesssary in our case, but when I uninstall it, I can't get my ppp connection up). Get the rpm package following the link <http://sourceforge.net/projects/linux-atm/>.
    --- cxacru
    --- some modified scripts of the cxacru package

    You can find all these on <http://www.zuillinux.it/linux/accessrunner.html>. Put the downloaded packages in /tmp and extract their content with the command (as root):

    # cd /usr/local/src
    # tar xvzf /tmp/cxacru-2003-10-05-src.tgz
    # rpm -ivh /tmp/linux-atm-2.4.1-1.i386.rpm

    Do not unpack the modified scripts yet.

    6. Compile the cxacru package (as root), but not with the classical "make". You have to issue "make new" for the 2.6.x kernels:

    # cd /usr/local/src/cxacru
    # make new

    This compiles and installs cxacru; you will get an error before the end of the compilation, but it doesn't matter: the only important thing is that we achieve to compile and install the contents of the directory named module2.

    7. Once this is done, we have to remove any existing "cxacru" module from the current kernel-modules tree, issuing (as root):

    # find /lib/modules/`uname -r`/ -name "*cxacru*" -exec rm {} \;

    This seems crazy, since we just compiled this module, but it is because we are going to use the "speedtch.ko" module instead of "cxacru.ko".

    8. Now we can unpack /tmp/modified_scripts.tgz (as root):

    # cd /usr/sbin
    # tar xvzf /tmp/modified_scripts.tgz

    9. We have to configure /etc/cxacru according to our needs:

    -------------------------------------------------------------------------------
    # Driver mode
    DRIVER_MODE=1 # 1 = normal (no debug)

    # Protocol
    PROTOCOL_MODE=2 # 2 = PPP over ATM (pppoa)

    VPI=8
    VCI=35
    -------------------------------------------------------------------------------

    10. We have to modify even one script more: /usr/sbin/cxnet2up.sh; the lines containing

    echo $">>> Loading pppd daemon..."
    pppd || exit 1

    must be changed in

    echo $">>> Loading pppd daemon..."
    pppd call versatel unit 1 || exit 1

    because the ppp deamon needs a lot more of arguments than a current phone connection.

    11. Finally, we need to install a file /etc/ppp/peers/versatel. We need to do this as root. The file contains:

    -------------------------------------------------------------------------------
    defaultroute
    noipdefault
    #noauthsync
    noaccomp
    nopcomp
    noccp
    novj
    holdoff 4
    persist
    maxfail 25
    usepeerdns
    passive
    asyncmap 0
    lcp-echo-interval 2
    lcp-echo-failure 7
    # put twice, below, the user name Versatel provided to you when you subscribed:
    name 'vt123456@versadsl.be'
    user 'vt123456@versadsl.be'
    plugin /usr/lib/pppd/plugins/pppoatm.so
    8.35
    -------------------------------------------------------------------------------

    If you cut and paste, keep in mind to change the username above by the one Versatel provided to you.

    12. The password for the connection has to go to the file /etc/ppp/pap-secrets:

    You have to add a line in that file (as root):

    -------------------------------------------------------------------------------
    "vt123456@versadsl.be" * "jamesbond007"
    -------------------------------------------------------------------------------

    putting obviously YOUR username as first argument and YOUR password as third argument.

    13. Now the moment of the truth arrived: connect you E-Tech USB modem to some USB port and issue (as root):

    # cxstart.sh

    If your root shell was not a login shell, this won't work. Start to be root with the command "su -", not only with "su". Normally you see a lot of things happen: modules unloaded and loaded, firmware sent to the modem, modem detected, etc... You will to wait a while when the modem is coming up, and finally, the pppd deamon will be launched. I hope the script tells everything went successfully, but some things can go wrong with the pppd deamon without giving a diagnose at the console. You can be sure that you really have a connection when the interface ppp1 appears in the output of the command "/sbin/ifconfig". If v.gr. your password is wrong, pppd will not bring up the interface ppp1 and the reason will be output at the bottom of the file /var/log/messages.

    14. DON'T FORGET TO bring the interface down with the command (as root):

    # cxstop.sh

    otherwise Versatel is going to compute a huge connection time on your bill. Probably unplugging the modem can lead to the same result, but I heard you can freeze your computer with such a methods, so be careful.

    15. For a short interruption of the connection, it is sufficient (I hope, since I'm doing that) to issue (as root):

    # cxnet2down.sh

    and for getting the network up again after a cxnet2down.sh, you can issue

    # cxnet2up.sh

    which is much faster than running cxstart.sh each time you want to connect. Anyway, the first connection, after plugging in the modem, must be launched with cxstart.sh.

    16. Finally, when everything works, you can delete the temporary files in /tmp (or save these elsewhere):

    $ cd /tmp
    $ rm patch-2.6.6_20040517_accessrunner.gz cxacru-2003-10-05-src.tgz linux-atm-2.4.1-1.i386.rpm modified_scripts.tgz

    17. If you want to get here, first make a little prayer before you start with the whole procedure, and if you do get here, congratulations, but don't forget to make a little prayer for me.

    Good luck!
  2. 2004-08-31 20:07:02 UTC
    well done.
  3. 2005-01-18 11:37:00 UTC
    ATTENTION, there is a tipo at point 12: The password for the connection has to go to the file /etc/ppp/pap-secrets:

    -------------------------------------------------------------------------------
    "vt123456@versadsl.be" * "jamesbond007"
    -------------------------------------------------------------------------------

    putting obviously YOUR username as first argument and YOUR password as third argument.

    In the previous version, I put a ";" after the username, we have to take it away! Sorry for this inconvenience.
  4. 2005-01-18 11:43:52 UTC
    The tipo is not my fault: when I posted the correct version of /etc/ppp/pap-secrets, the script "forum.php" which displays this page added again a ";" after "vt123456@versadsl.be" (I'm sure I didn't write a ";" at the left of this parenthese now). The scripts thinks it is an e-mail address and adds some stuff around it (mailto: etc...) and also a ";".

    I will post a thread for fixing this.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.