Installing a HomePNA 2.0 Home Phoneline Network for Knoppix and Slackware
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
By spurious at 2003-09-30 01:50
Installing HomePNA 2.0 Home Phoneline Network for Knoppix and Slackware
My modest home network consists of a Slackware 9.0 box functioning as an Internet gateway and a Knoppix 3.3 box acting as a workstation. Both boxes are connected with a D-Link HomePNA 2.0 (also known as "hpna2" or "iLine") 10 Mbps home phoneline network. This article will deal with compiling and installing the hpna2 linux module for Knoppix and Slackware. Please note that I use static IP addresses on my two-box network; you will have to adapt this article for DHCP.
I adapted the instructions on http://www.homepna.org. Note that the instructions on www.homepna.org apply to Red Hat 7.x and Mandrake 8.x; later versions of these distros apparently refuse to load the hpna2 linux module. Also, the module is intended for the 2.2.x and 2.4.x series of kernels; I have not tried the new 2.6 test kernel.
Unfortunately, HomePNA 2.0 is not open source, unlike the prior HomePNA 1.0 technology. Broadcom owns HomePNA 2.0, and licenses it to other vendors such as D-Link, Linksys, Diamond etc. A binary-only HomePNA 2.0 module does exist for Linux, however, and is available by as an unsupported driver from Linksys. While this driver is provided by Linksys, it will work on all HomePNA 2.0 devices, as they are all based on the Broadcom spec.
As root, verify that the HomePNA 2.0 pci card is properly installed and detected by your system. At bash prompt, execute:
There will be several lines of output and one should be similar to:
You will note that, ironically, the driver is a Windows executable archive; you must open it up under Windows (or WINE, I suppose). The archive will unpack with three directories filled with both source and object files; we will be dealing with the one called "iL_hybrid".
Assume for the sake of this article that you save iL_hybrid to /home/iL_hybrid. You will need to compile the hpna2 module "il.o" from the source and object files therein.
You will also need the linux kernel source headers, which are usually found in a sub-directory under /usr/src/linux-2.4.xx where 2.4.xx is your distro's kernel version. You can determine your kernel version with the bash command:
root# uname -r
The command uname -r outputs the version number of your linux kernel. In the example above, the kernel version for Slackware 9.0 is 2.4.20; therefore the kernel headers should be in /usr/src/linux-2.4.20. For Knoppix 3.2-2003-07-26, the kernel version is 2.4.21-xfs and the kernel headers are in /usr/src/linux-2.4.21-xfs. For Knoppix 3.3-2003-09-24, however, the kernel version is 2.4.22-xfs, but the kernel headers are in /usr/src/linux-2.4.22 (NOT linux-2.4.22-xfs). This seems to be an mistake in the latest Knoppix, which has consequences for my Knoppix make.hpna2 script, below (more on this later).
I like to reinstall Knoppix whenever a new version comes out (I keep separate partitions for /home and /usr/local for convenience). I wrote a simple script to compile and install the hpna2 module automatically. Here it is for your own use (I am a newbie bash scripter, so please be kind):
# hpna2 is the HomePNA 2.0 home phoneline network module
# build and install hpna2 modules in Knoppix/Debian;
# needs hpna2 source and object files in /home/iL_hybrid
# destination path for il.o;
#`uname -r` returns the kernel version
# path for Knoppix network files
# path for Knoppix module files
# your hpna2 network card
# the following assumes static IP addresses, not DHCP
# IP address for your Knoppix box
# IP address for your network gateway
# Network address
# Broadcast address
# your ISP's DNS Nameserver address
###### end variable declarations
echo 'Building il.o module'
make LINUXVER=`uname -r`
# make uses variable LINUXVER to find the kernel headers under /usr/src
# You will see some gcc output at this point.
# Ignore the error message about malloc.h being deprecated; or
# you can edit il_linux.c and replace 'malloc.h' with 'slab.h'.
# When make is done, then 3 object (binary) files are created:
# il.o (the actual hpna2 module),
# il_linux.o and linux_osl.o (which seem to be intermediate object files)
mv il.o $ILD
# now iL_hybrid is cleared for future re-use^M
echo 'Appending il to /etc/modules'
echo 'HomePNA 2.0 network' >> /etc/modules
echo 'il' >> /etc/modules
# Debian distros prefer that you don't manually edit modules.conf
# you edit the /etc/modutils/aliases file, then run update-modules
echo 'Appending il to /etc/modutils/aliases'
echo 'HomePNA 2.0 network' >> $ETCMOD/aliases
echo 'alias' $ETH 'il' >> $ETCMOD/aliases
echo 'update-modules with il'
echo 'Temporarily bring up il.o module and enable networking'
ifconfig $ETH1 $IPADDR
route add default gw $GATEADDR
# or if you have DHCP, replace above two lines with dhcpcd $ETH
WARNING for Knoppix 3.3-2003-09-24: you will note the use of the `uname -r` command (note the ` apostrophes, located on the top left of your keyboard, under the ESC key) to obtain the linux kernel version for your Knoppix system.
In Knoppix 3.3-2003-09-24, the destination path for the kernel network modules is under /lib/modules/2.4.22-xfs/kernel/net, which is what is correctly assigned to the variable $ILD. However, the kernel headers for Knoppix 3.3-2003-09-24 is located under /usr/src/linux-2.4.22, not /usr/src/linux-2.4.22-xfs as expected.
To work around this error, either edit the script above with 'make LINUXVER=2.4.22' or create a symlink: ln -s /usr/src/linux-2.4.22 /usr/src/linux-2.4.22-xfs
Compiling and installing hpna2 for Slackware 9.0 is a lot easier, so I won't bother scripting it. It looks relatively simple without the variables and comments: