Linux ZyXEL 630-11 Modem Setup (i.e. UTVInternet.ie ClickSilver)
The modem that UTV provide is an USB ZyXEL 630-11 modem, there is support for
this under linux, but not as part of any standard kernel or distribution as of
yet (Jan 21 2004).
The project that provides support for this device under linux lives at this
url: http://sourceforge.net/projects/zyxel630-11. From there download amedyn,
the latest version at the time of writing was amedyn-2003-10-29-src.tgz, so if
a later version now exists, none of the might be relevent anymore.
The previous link is your best location for support problems or oddness,
the hackery at the end is extracted from the sourceforge support forums.
1. Download your requirements
- rp-pppoe a handy pppoe user space implementation
- amedyn, the beast itself
- libusb, required to compile amedyn
- linux-atm, required to compile amedyn
You can install your own platforms rpm/deb for rp-pppoe and your platforms
development rpms/debs for libusb and linux-atm. You will need the source to the
kernel you are running as well, because amedyn creates a kernel module among
other things. Your kernel source is probably already in /usr/src/
2. Configure your kernel
You need to enable some options (probably many are already checked, except the
ATM ones), as root
> cd /usr/src/linux.whateveritis
> make menuconfig
Code maturity level options --->
[ * ] Prompt for development and/or incomplete code/drivers
Loadable module support --->
[ * ] Enable loadable module support
[ * ] Module unloading
Device Drivers --->
Networking support --->
Networking options --->
< M > Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)
< M > RFC1483/2684 Bridged protocols
< M > PPP (point-to-point protocol) support
< M > PPP support for async serial ports
< M > PPP support for sync tty ports
< M > PPP Deflate compression
USB support --->
< M > Support for USB
[ * ] USB device filesystem
< M > EHCI HCD (USB 2.0)
< M > OHCI HCD support
< M > UHCI HCD support
Library routines --->
< M > CRC32 functions
USB just has to work, so the above is just my setup, if you have working USB
you almost certainly don't need to change anything there, the same goes for
PPP support. CRC32 library routine is only an option for 2.6 I believe.
Some interesting factoids here are that
- The amedyn module is partly based on the "Alcatel Speedtouch USB support"
support under "USB Miscellaneous drivers" under the kernel USB support, this
comes in handy in a while. (I'm going somewhere with this later)
- There is a pppoe kernel module, we don't need this module as we are
going to use rp-pppoe, but if you get this working you can always play
with kernel pppoe to replace rp-pppoe.
3. Install your updated kernel
Now do your normal make ; make modules ; make modules_install and setup
lilo/grub or whatever you do and reboot into the new kernel and move on to the
next set of steps.
4. adsl-setup
As root run the rp-pppoe setup program as...
> adsl-setup
This asks your some questions, they might vary slightly from these ones
depending on your version, but the relevent ones are listed below. I choose
the defaults for all others.
LOGIN NAME
Enter your Login Name (default foobar): xxXXXXXX@utvinternet.ie
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0): nas0
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here: server
PASSWORD
Please enter your Password: xxxxxxxxxx
Please re-enter your Password: xxxxxxxxxx
Do you want to start this connection at boot time?
Please enter no or yes (default no): no
Accept these settings and adjust configuration files (y/n)? y
5. pre amedyn compilation
As root untar amedyn where it expects to be
> cd /usr
> tar xvzf ~/amedyn-2003-10-29-src.tgz
This is where the trickiness begins
Only for kernels > 2.4.20 doing the following seems to be the best
approach...
> cp /usr/src/linux.whatever/drivers/usb/misc/speedtch.c /usr/amedyn/module/xdslusb.c
edit /usr/amedyn/module/xdslusb.c and change the lines
#define SPEEDTOUCH_VENDORID 0x06b9
#define SPEEDTOUCH_PRODUCTID 0x4061
to
#define SPEEDTOUCH_VENDORID 0x06b9
#define SPEEDTOUCH_PRODUCTID 0xa5a5
(I did warn you that the fact that amedyn is based on the speedtch driver
would be useful)
For all kernels, including 2.4.20 and greater versions, the best thing
to do is to edit /usr/amedyn/init/amload.c and search for
memcpy(bufconf, buf+0xb9, 8);
/* clear endpoints */
clear_endpoints(adsl_handle, 1);
/*****************/
/* send firmware */
/*****************/
and comment out clear_endpoints so as to be...
memcpy(bufconf, buf+0xb9, 8);
/* clear endpoints */
/*clear_endpoints(adsl_handle, 1);*/
/*****************/
/* send firmware */
/*****************/
There are two clear_endpoint calls, only comment out the one above the send
firmware comment as above...
Now we need to replace your /usr/amedyn/scripts/amnet4up.sh with this one,
its just moving the "amioctl 1" usage to the start of the script.
Compile everything and install
> cd /usr/amedyn
> make
Now we should have compiled cleanly and this will have created and installed
our scripts and support programs and installed our amedyn module in the usual
place.
6. post amedyn compilation
edit /etc/amedyn and
change
PROTOCOL_MODE=4
VPI=8
VCI=35
because PROTOCOL_MODE=4 is pppoe, and the VPI/VCI settings will then
match what the handy utvinternet piece of paper told mac users to set
:-)
So my full config is here...
#
# Config file for Zyxel 630-11 & Asus AAM6000UG (ADSL Modem USB)
#
# Driver mode
DRIVER_MODE=1 # 1 = normal, 2 = debug
# Protocol
# 1 = RFC1483/2684 routed,
# 2 = PPP over ATM (pppoa),
# 3 = RFC1483/2684 bridged,
# 4 = PPP over Ethernet (pppoe)
PROTOCOL_MODE=4
# Paths
BINARY_PATH="/usr/sbin"
ATM_PATH=""
# ATM
VPI=8
VCI=35
# Specific for RFC1483/2684 routed/bridged
# if IP_ADDRESS is blank in bridged mode then it uses DHCP to get IP
IP_ADDRESS=
NETMASK=255.255.255.0
GATEWAY=
7. Giving it a go...
Now in theory you just need to run
> amstart.sh
The following is my log of the above command
# amstart.sh
>>> Inits Zyxel 630-11 & Asus AAM6000UG <<<
>>> Loading firmware...
Zyxel 630-11 & Asus AAM6000UG microcode upload program. 12/10/2003
Josep Comas <jcomas@gna.es>
Sundar <sundar@cynaptix.biz>
Eduardo Espejo <eespejo@users.sourceforge.net>
I found ADSL modem with VendorID = 06b9 & ProductID = a5a5
Loading and sending /usr/sbin/fw-usb.bin...
Firmware is sent!
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Error: usb_control_msg: error sending control message: Broken pipe
Waiting ADSL line is up (until 90 seconds)...
...........
ADSL line is up
>>> Loading driver...
Launching driver in normal mode...
/usr/sbin/amload.sh successful
Setting PPP over Ethernet...
>>> Setting PPPoE <<<
>>> Activating send/receive data...
Zxyel 630-11 & Asus AAM6000UG ioctl call. 24/9/2003
Josep Comas <jcomas@gna.es>
Sundar <sundar@cynaptix.biz>
Eduardo Espejo <eespejo@users.sourceforge.net>
I found ADSL modem with VendorID = 06b9 & ProductID = a5a5
>>> Loading br2684 kernel module...
>>> Loading ppp_generic...
>>> Loading br2684ctl...
RFC1483/2684 bridge: Interface "nas0" created sucessfully
RFC1483/2684 bridge: Communicating over ATM 0.8.35, encapsulation: LLC
RFC1483/2684 bridge: Interface configured
>>> Activating interface...
>>> Loading pppd daemon...
........... Connected!
/usr/sbin/amnet4up.sh successful
And you are finished.
8. Some possible helpful hints
If you see
Error: usb_control_msg: error sending control message: Broken pipe
but it doesn't continue past that point like my log above, then you may have
missed commenting out the clear_endpoints as described above.
If you see "bulk_error"s then you might be re-running amstart.sh after a
previous attempt, unplug your modem from the USB chain and wait a few secs and
plug it in again and try again.
If the loading pppd daemon times out and you've got nas0 up but see no RX
despite some TX when you use /sbin/ifconfig, then maybe you skipped copying
speedtch.c over xdslusb.x and modifying it as above.
If you see a failure along the lines of...
RFC1483/2684 bridge: Interface "nas0" created sucessfully
RFC1483/2684 bridge: Communicating over ATM 0.8.35, encapsulation: LLC
RFC1483/2684 bridge: (some error I forget how it looks)
then you might have forgotten to use the amnet4up.sh script included above.
If anything else goes wrong, then work through amstart.sh / amload.sh /
amnet4up.sh line by line by hand to see where the problem starts. For
what its worth I know it works myself with the above changes and kernels
2.4.20 and 2.6.1.
9. Credits
Kudos to Josep Comas and
Sundar R for putting together this driver,
and to the support crew at the sourceforge forum
, from where I shamelessly stole all this good stuff to assemble this document
10. Links
Related: Installing a Creative Zen USB on Linux
About the author, Cáolan McNamara.
USERS COMMENTS
|