Diff for "UsbAdslModem/e-techV2"


Differences between revisions 4 and 5
Revision 4 as of 2006-02-05 10:24:03
Size: 11612
Editor: ip235-112-172-82
Comment:
Revision 5 as of 2006-02-05 11:17:47
Size: 12118
Editor: ip235-112-172-82
Comment:
Deletions are marked like this. Additions are marked like this.
Line 139: Line 139:
'''Closing remark:''' Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without too much effort by the user him- or herself. '''Closing remark:''' Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without complications by the user him- or herself.
Line 144: Line 144:
The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network. Dutch users (zonnet/versatel/tele2) should check this URL: http://www.dse.nl/~torch/usb_adsl_modem/

The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network. If the modem is connected to the provider by the telephone network (using the ADSL-splitter), it probably uses a communication mode called '''ATM''' (Asynchronous Transfer Mode). In my case the drivers (see Item 1 - Step 1) had to be placed in a ''atm'' subdirectory. The fact that this subdirectory already exists in Ubuntu is a good sign: the connection to atm modems is already foreseen in Ubuntu.

How I got my USB ADSL modem working in Ububtu

For the general understanding, let me first try to explain why most USB ADSL don't work in a new installation of Ubuntu.

  1. Ubuntu and, I guess, all other Linux' operating systems assume that the network connection runs over an ethernet card in the computer. This is based on almost ancient technology, but still doing very well. Most of the computers and (business) PC's have an ethernet card, and in these cases you will have no problems getting connected to the network. Remark however, that if you buy a 'home' PC, it will probably not contain an ethernet card.
  2. If you choose an interner provider, normally you also get the hardware to set up the internet connection in a kind of package deal. In 50% of the cases you will get a ethernet card, in the other cases (often the more economic contracts) you get an USB ADSL modem.
  3. All hardware that you connect with your PC through USB needs hardware-specific software. Most (frequent) drivers that are free and not licensed are in the standard Ubuntu installation. E.g. the Alcatel speedtouch USB modem driver is preinstalled. Also my memory stick driver is available.
  4. However, the driver for my USB DSL modem (e-tech-V2 usb) is not installed. This modem contains a 'conexant' chip, and the driver is 'commercial' and licensed. That explains why it is not installed in Ubuntu.

To get the USB modem working, two things need to be achieved:

  1. Linux must be extended with software to control the modem, you need to get so-called drivers.
  2. The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network.

Item 1 - drivers for the USB modem

Step 1: obtain the drivers

A group of people in the sourceforge project is developing drivers for many USB ADSL modems. For my USB DSL modem (e-tech-V2 usb) with the conexant chip I found the following files (http://accessrunner.sourceforge.net/index.shtml):

/drivers/usb/atm/cxacru.c

/drivers/usb/atm/Kbuild

/drivers/usb/atm/Kconfig

/drivers/usb/atm/usbatm.c

/drivers/usb/atm/usbatm.h

Step 2: obtain firmware for the modem

Most USB modems contain a microprocessor (a 'simple' computer), which is programmable and therefore can do many different things, so it is sold a lot and can be cheap. The above driver (cxacru) will try to 'upload' a small program to the modem, allowing the microprocessor to do the 'modem-work'. This small program (called firmware) is often licensed.

The drivers (downloaded in Step 1) do not contain theis firmware (otherwise it would be illegal), but you probably got a CD with the modem, which contains many files, in which the firmware is also contained. If you have the modem working for Windows, the firmware is in the Windows partition. So you already have a legal copy of the firmware, the only problem is finding the firmware. The sourceforge site gives you some intsructions. I have found a programm called cxacru-fw.c (I lost the URL name, but you can trace it with Google). After compiling cxacru-fw.c (the URL gives you clear instructions), cxacru-fw can extract the firmware from a file called CnxEtU.sys on the modem CD, or the Windows partition. Make sure that you name the firmware file cxacru-fw.bin

Place the file cxacru-fw.bin in:

/lib/hotplug/firmware

Note: this is Ubuntu specific - other Linux distributions use other locations. Note 2: the file cxacru-fw.bin is licensed, do not redistribute it.

Step 3: recompile the linux-kernel

(unfortunately this is difficult without an internet connection)

Step 3a: There is a HOWTO "Kernel Compilation for Newbies" at ubuntuforums.org. You need to do all obligatory steps mentioned there to recompile the kernel. The HOWTO aims at recompilation of the kernel to get a video card working, so a number of optional steps can be skipped. However, the HOWTO assumes Ubuntu has a working internet connection.

Step 3b: This means that you cannot install all the packages you need to recompile the kernel. The files you need are somewhere in http://archive.ubuntu.com/ubuntu/ One of the packages you need is libncurses5-dev A trick to find the location is as follows: goto http://ftp.se.kde.org/ftpsearch.html Search for libncurses5-dev Now you get a reference to a location in the Debian FTP-archive. The Ubuntu archive has the same structure, so you can find libncurses5-dev in a similar location in the ubuntu archive.

The packages downloaded this way wil have the extension .deb. They can be installed manually through the command:

dpkg -i (package.deb)

To get a feeling for how to use this workaround, read the section 'compile from a vanila kernel' in HOWTO "Kernel Compilation for Newbies"

Step 3c: If you finished step 3 HOWTO "Kernel Compilation for Newbies" (congratulations if you got here), first exit menuconfig. Look for the place where usb_atm.c is in the source tree. This is provbably /usr/src/linux/drivers/usb/atm/usb_atm.c Here, rename the files usb_atm.c, usb_atm.h, Kbuild and Kconfig (add something like .old). Copy the new drivers to this location:

/drivers/usb/atm/cxacru.c

/drivers/usb/atm/Kbuild

/drivers/usb/atm/Kconfig

/drivers/usb/atm/usbatm.c

/drivers/usb/atm/usbatm.h

I renamed usbatm.c and usbatm.h to usb_atm.c and usb_atm.h, but I am not sure whether this is necessary.

Now, type again

sudo make menuconfig

Now, in the submenu drivers-usb-atm I selected cxacru (the new driver!) and typed m (maybe * will do, I am not sure). Exit menuconfig and compile the kernel.

Step 3d (optional): Everything should go well, but it did not in my case. I got the error-message:

Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS
make: *** [vmlinux] Fout 1

I don't know how to set CONFIG_KALLSYMS_EXTRA_PASS, so I did a bad thing, namely edit the Makefile. I looked for the place in Makefile that checks the parameter CONFIG_KALLSYMS_EXTRA_PASS, and changed the IF statement such that it acts as if CONFIG_KALLSYMS_EXTRA_PASS is true. This worked. (I hope somebody edits this, and explains how to do this nicely)

Step 3e (optional): Further in the proces I got the error message:

dpkg-gencontrol: error: package kernel-image-2.6.12-accessrunner not in control info
make[1]: *** [real_stamp_image] Fout 255
make[1]: Leaving directory `/usr/src/linux-source-2.6.12-10.25'
make: *** [kernel-image-deb] Fout 2

Here also I did a probably bad thing: I added something like this to debian/control

Package: kernel-image-2.6.12-accessrunner
Architecture: all
Section: devel
Priority: optional
Depends: 
Provides: ${kt-provides}
Description: Linux kernel image

I had to do this for two packages. (I hope somebody edits this, and explains how to do this nicely)

Step 3f: Eventually you have new kernel packages. If you couldn't do it, send me a line at wubu.20.jacquesb@spamgourmet.com, and I will e-mail the two package files (25 MB)

Step 4: Install the kernel-packages (see the HOWTO "Kernel Compilation for Newbies"). If you restart the computer, GRUB will give you the option to start the new kernel. After starting the new kernel and loggin in, check in Applications - System tools - System log. If everything went well you can see that the USB modem is detected and cxacru is activated. You also see messages from CXacru in /var/log/messages: If everything went well you see

localhost kernel [4294759.585000] cxacru 1-1:1.0: ADSL line: training
localhost kernel [4294764.599000] cxacru 1-1:1.0: ADSL line: channel analysis
localhost kernel [4294769.585000] cxacru 1-1:1.0: ADSL line: up (384 Kib/s down | 128 Kib/s up)

Step 4a (optional): Initially I got errors:

localhost kernel [4300944.253000] cxacru 1-1:1.0: firmware unavailable (hotplug configuration problem?)
localhost kernel [4295543.593000] cxacru 1-1:1.0: poll status: error -5

The 1. problem was I put the firmware in a wrong location. The 2. problem may require newer firmware.

Closing remark: Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without complications by the user him- or herself.

Item 2 - connect the modem to the ethernet 'talk' of Ubuntu

Dutch users (zonnet/versatel/tele2) should check this URL: http://www.dse.nl/~torch/usb_adsl_modem/

The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network. If the modem is connected to the provider by the telephone network (using the ADSL-splitter), it probably uses a communication mode called ATM (Asynchronous Transfer Mode). In my case the drivers (see Item 1 - Step 1) had to be placed in a atm subdirectory. The fact that this subdirectory already exists in Ubuntu is a good sign: the connection to atm modems is already foreseen in Ubuntu.

If you use DHCP to login (this is used when you don't have to provide a password for connecting):

1. You have to get the br2684ctl package from a debian archive (it is not in the ubntu-archive)

2. you have to type some magic words in a terminal window

modprobe 2684
br2684ctl -b -c 0 -a (followed by a provider dependent code, in my case: 0.0.32)
dhclient nas0 (ubuntu equivalent of dhcpcd)

It worked for me, although I always get a few warning-messages at the end)

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/nas0/00:d0:41:10:21:dc
Sending on   LPF/nas0/00:d0:41:10:21:dc
Sending on   Socket/fallback
DHCPREQUEST on nas0 to 255.255.255.255 port 67
DHCPACK from 82.172.112.1
bound to 82.172.112.235 -- renewal in 3125 seconds.

If you need PPPoE or PPPoA (you will need a username password), the following is untested, I have to use DHCP.

if PPPoA , download from http://accessrunner.sourceforge.net/debian-scripts/ the peers-pppoa and put it in /etc/ppp/peers, edit that file especially the user and the VPC/VCI peers. Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets in the form login * password *

insmod /lib/modules/2.6.10-5-386/kernel/net/atm/pppoatm.ko pppd call peers-pppoa

if PPPoE Install apt-get install libatm1

also you ll need to download 2 package from the ubuntu

br2684ctl_20040226-1_i386.deb atm-tools_2.4.1-16_i386.deb ( I m not sure if that one needed)

then install them with the command dpkg -i xxxxxfilexxxxx.deb

download from http://accessrunner.sourceforge.net/debian-scripts/ the peers-pppoe and put it in /etc/ppp/peers, edit that file especially the user. Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets in the form login * password *

after that modify the /etc/network/interfaces and add : auto nas0 iface nas0 inet static address 192.0.2.1 netmask 255.255.255.0 broadcast 192.0.2.255 0x0x gateway 192.0.2.254 pre-up br2684ctl -b -c 0 -a 0.0.100 post-down kill $(cat /var/run/$IFACE.pid) (the 0.0.100 is the form itf.vpi.vci you should set vpi/vci accordingly to what you have see your ISP for this infos.)

Restart the network to get the nas0 match the atm interface insmod /lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko /etc/init.d/networking restart

And finally connect pppd call peers-pppoe

I m sorry it s a bit hard and maybe not well organized but it should give you a better idea of what you need to do.

For Dutch users (zonnet/versatel/tele2), check this URL: http://www.dse.nl/~torch/usb_adsl_modem/


CategoryNetworking CategoryCleanup

UsbAdslModem/e-techV2 (last edited 2017-09-22 17:50:20 by ckimes)