LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to load driver (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-load-driver-716528/)

dinkarchary 04-03-2009 03:28 AM

How to load driver
 
I am a newbie. I have Acer Aspire One Netbook and have loaded Mepis 8.
Everything works fine except that I am unable to connect to WiFi, though the machine detects it.
I have downloaded the ath5k driver.
How do I install it? What do I do with the downloaded file? Please tell me in layman's language as I am a newbie to linux.

alan_ri 04-03-2009 04:14 AM

I believe that Mepis8 has all the drivers you need already there or a few clicks away.There should be something like Network Manager in the menu.Check it out.
Maybe all you need to do is enter your WEP/WPA key to connect.
You can open Konsole,become root and run few commands in it so that we can see what's goin' on;
Code:

lspci -v
Code:

ifconfig -a
Code:

iwconfig

dinkarchary 04-04-2009 01:31 AM

Dear Alan,

Thank you for the reply.
The driver is not available in Mepis8.
Here is the part from Mepis docs about Aspire One.

Quote:

Wireless LAN

Support for the Atheros 5007EG wifi chipset in Mepis 8 is provided by either the madwifi-modules package (driver name is ath-pci, or ath_pci, either one works), or the ath5k driver built into the kernel. You may have to unload both with rmmod as root, then use modprobe drivername to load your selected driver. Either one will work, but there may be some trouble under heavy load on the chipset, such as Bittorrent. As of March 2009, the ath5k driver updated per the section below seems to have fixed the dropout problem under heavy loads.
Example commands: (unload both drivers, then reloads ath5k)
su
<password>
rmmod ath-pci
rmmod ath5k
modprobe ath5k
You may have to add the unwanted driver to /etc/modprobe.d/blacklist, and add the one you wish to use to /etc/modules, to get just the right one to load at boot.
Right now, the ath5k driver is under heavy development, and the latest versions can be installed by downloading and compiling the driver source tarballs from linuxwireless.org. This will get the LED working for the wifi, and fix other issues you may not have been aware of. The drivers take quite a while to build and install on the AA1; over an hour at least.
If you are using the madwifi driver, the wifi LED can be made to work by adding the following two lines to /etc/sysctl.conf:
dev.wifi0.ledpin=3
dev.wifi0.softled=1
This can be tested immediately by executing
sysctl -p
Though Knetworkmanager will work with mnetwork set to Automatic, I prefer to set it to Manual and use Wicd, which is available in the ML community repository.
I have downloaded the ath5k driver. I just don't know what to do with it as there is nothing to 'install' and doesn't look like a package.

alan_ri 04-04-2009 02:16 AM

Run as root
Code:

modprobe -r ath5k
Open as root /etc/modprobe.d/blacklist and add a line ath5k,save the file,also open /etc/modules and add a line ath_pci if it's not already there.Reboot.
Your wireless shoud work then,you'll maybe need to enter your key.

jschiwal 04-04-2009 02:59 AM

alan_ri, aren't you are recommending blacklisting the very driver that the user wants to use?

Does the download look like a tarball? That is to say does it have the extension .tar.gz? You need to untar it with "tar xvzf <filename>" and read the instructions.

Firstly, which kernel do you have. I think that the ath5k driver was introduced with 2.6.9.26, but I'm not certain about that.
My kernel has these files in the kernel source for the ath5k driver.
/usr/src/linux/drivers/net/wireless> ls ath5k
ath5k.h base.c base.h debug.c debug.h hw.c hw.h initvals.c Kconfig Makefile phy.c reg.h

From what you posted, your download consists of updated versions of these files. Either that or it is a kernel patch to replace these files, or you need to replace them yourself (by replacing the ath5k directory with your own downloaded one).

Before going through all of this effort, check if you are even using it with "lsmod". Maybe you just need to unload & reload the module as the instructions you posted recommend. If it is detected, the kernel ath5k module is loaded and the command "sudo /usr/sbin/iwlist scan" shows access points; then the kernel module isn't the problem. Look at the wireless configuration instead.

( Note: Please make sure you shut down wireless before unloading a wireless kernel module. You could lock up the kernel if you unload a wireless module that is in use )


---
I have a different distro. It includes a kernel-syms package which can make compiling an external module easier.
Be sure to read the README in the kernel source. Your distro may have it's own README as well with distro specific instructions. It may have some instructions similar to this for compiling a single driver.
Code:

The first method involves the following steps:

  (1)  Install kernel-source.$ARCH.rpm.

  (2)  Change to the /usr/src/linux directory.  Configure the kernel
      (for example, ``make oldconfig'' or ``make cloneconfig'', see
      HOW TO CONFIGURE THE KERNEL SOURCES).

  (3)  Create files required for compiling external modules:
      ``make scripts'' and ``make prepare''.

  (4)  Compile the module(s) by changing into the module source directory
      and typing ``make -C /usr/src/linux M=$(pwd)''.

  (5)  Install the module(s) by typing
      ``make -C /usr/src/linux M=$(pwd) modules_install''.


The second method involves the following steps:

  (1)  Install kernel-source.$ARCH.rpm.

  (2)  Install kernel-syms.$ARCH.rpm. This package is necessary for
      symbol version information (CONFIG_MODVERSIONS).

  (3)  Compile the module(s) by changing into the module source directory
      and typing ``make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$(pwd)''.
      Substitute $ARCH and $FLAVOR with the architecture and flavor
      for which to build the module(s).

      If the installed kernel sources match the running kernel, you
      can build modules for the running kernel by using the path
      /lib/modules/$(uname -r)/build as the -C option in the above
      command. (build is a symlink to /usr/src/linux-obj/$ARCH/$FLAVOR).

      Starting with SuSE Linux 9.2 / SLES9 Service Pack 1, the
      modversion information for the running kernel is also
      contained in the kernel-$FLAVOR packages, and so for building
      modules for the running kernel, the kernel-syms package is no
      longer required.

  (4)  Install the module(s) with
      ``make -C /usr/src/linux-obj/$ARCH/$FLAVOR M=$(pwd) modules_install''.

----
Notice this part of the instructions:
<password>
rmmod ath-pci
rmmod ath5k
modprobe ath5k

This is for unloading the madwifi ath-pci driver and loading the built in kernel driver.
You can't have both the ath-pci and ath5k drivers running at the same time. If you do, you would uninstall the madwifi package or simply blacklist the ath-pci driver. Or you could blacklist the ath5k driver as alan_ri suggested. This is if you have both. You only want one. If you have both, mad-wifi & use the ath5k built in driver, then wireless won't work.

alan_ri 04-04-2009 03:50 AM

Quote:

Originally Posted by jschiwal (Post 3498105)
alan_ri, aren't you are recommending blacklisting the very driver that the user wants to use?

I recommened ath_pci driver because I think it's a better driver.

This is topic unrelated;
jschiwal,
I've been reading about the situation in Fargo in the news with titles like "Fargo Flood Fears".
Is the situation better now? I hope that it is.

jschiwal 04-04-2009 10:33 AM

Thank you Alan_Ri for your concerns. The river levels are dropping. When the 12-20 inches of snow we got recently melts, there will be a second peak, but the mayor doesn't think the more pessimistic predictions will come to pass. They are giving a wide range. He said "we did everything in 8 days, and on the 9th we rested". So over this weekend, we will be recharging our batteries.

---

The OP should post the results of iwconfig & iwlist. If APs are being detected, then different drivers may not be needed. If ath5k works, he doesn't need a firmware blob, or install madwifi if it isn't already installed.

If both are being used, one should be blacklisted.

---

A post about blacklisting ath5k in answer with how to use ath5k confused me, I confess.

alan_ri 04-04-2009 12:08 PM

Quote:

Originally Posted by jschiwal (Post 3498360)
Thank you Alan_Ri for your concerns. The river levels are dropping. When the 12-20 inches of snow we got recently melts, there will be a second peak, but the mayor doesn't think the more pessimistic predictions will come to pass. They are giving a wide range. He said "we did everything in 8 days, and on the 9th we rested". So over this weekend, we will be recharging our batteries.

---

Ok,I hope that it will all be over soon.All the best! ;)


All times are GMT -5. The time now is 01:06 AM.