How to change wireless card drivers/ how to identify?


Results 1 to 9 of 9

Thread: How to change wireless card drivers/ how to identify?

  1. #1
    Join Date
    Jun 2008
    Posts
    10

    How to change wireless card drivers/ how to identify?

    Hi, I run Slackware 12.1 and Elive 1.0 on an IBM Thinkpad T30. I am having trouble getting internet access in Slackware, and I am using Elive as a model since connection settings worked out of the box. I have the correct settings in Slackware already, however, I would like to see what driver the Elive installation is using, so I might be able to use the same driver on my Slackware install. Slackware using airo as default, however sources conflictingly tell me that I need an airo_cs or a windows driver(ndiswrapper). I could not find a windows driver, but I am at a loss about how to change my driver to airo_cs. Even worse, I don't have an idea what Elive uses, the only driver file I could find under the network category was adm8211.ko, how do I know Elive is using it?

    So, how do I know (identify) which driver Elive is using, and how would I change the driver in Slackware?

    Etc. To use hexadecimal encryption with iwconfig, the iwconfig interfacekey ****** option is sufficient, correct?

  2. #2
    Join Date
    Sep 1999
    Posts
    3,202
    Boot elive, and use the lsmod command to tell you what modules are loaded. If it isn't in there, it may be compiled into the kernel, not as a module.

    The lshal command may be helpful as well, when I run it one of the things it reports is info.linux.driver and it lists the module that a piece of hardware uses

  3. #3
    Join Date
    Jun 2008
    Posts
    10

    Sorry, but what?

    I understand the reasoning you state for using these commands; but can you explain what sections to look for to see which module the network/wireless card is loading? Should I look at PCMCIA or PCI, why are there so many PCI's, where's Aironet Wireless Communications Cisco Aironet Wireless Adapter (something similar to that is the wireless device on the IBM Thinkpad T30, which I use), how do I know if the module/driver Elive loads also needs firmware or other dependencies, etc.?

    Synopsis(for the lazy and weak of heart): I find the information expressed by these outputs confusing and unclear, and I do not know what to do with it.

  4. #4
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    There's tons of information under the /sys directory that pertains to various kernel bits. In particular, /sys/class/net/ has a subdirectory for each network interface in the system (the name of the subdirectory is the interface's name, e.g. eth0 or ath0 or whatever). Go into that subdirectory (actually it might be a symlink to somewhere else, but you can still do this); get into a shell (via a terminal emulator) and:

    Code:
    cd /sys/class/net/XXXXX
    (Replace XXXXX with the interface name you're interested in finding the driver for.)

    This directory will contain several files related to the network interface; one of those files will be a symlink to another directory, and will be named "device"; this will be the directory for the actual physical device in your machine. It will have another symlink subdirectory named "driver", which will point at a directory containing information about the driver that's being used. The driver directory, in turn, contains a "module" subdirectory that points at information about the kernel module that holds the driver. (Modules can contain any number of drivers, which can drive any number of physical devices, which can contain any number of logical network interfaces.)

    So to see the name of the module, from the same terminal window that you used earlier (which is still in the /sys/class/net/XXXXX directory), run:

    Code:
    ls -l device/driver/module
    That will print something like this:

    Code:
    lrwxrwxrwx 1 root root 0 Jun 23 19:11 device/driver/module -> ../../../../module/uli526x/
    The last directory in the list here (in my case, "uli526x") is the name of the module that you need to load on the other distro in order to use the same driver. (That's assuming, of course, that both use the same kernel. Otherwise you might not want to use the same driver; some drivers get fixes and updates pushed to them faster than others.)

    Yours won't be uli526x, because that's a driver for a wired network card. Yours may be airo, or airo_cs, or in fact anything else, but at least this should tell you what Elive is using.

  5. #5
    Join Date
    Jun 2008
    Posts
    10

    Red face Thank you, but...

    Thanks so much for your help in identifying the module I should use for the device driver, but that leaves me kind of stuck. The output of that was ../../../../module/airo. However, that is the same module Slackware tried to use. I suppose the problem was with my settings then.

    My network has a hexadecimal key for encryption, might this be making a difference in my ability to access a wireless connection? I.e., is there a special way to setup ones network using the iwconfig commands when one has a network with a hexadecimal key? Otherwise, I'm at a loss for what the problem is with Slackware.

  6. #6
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Hmm, yeah, I'd guess that it's either a settings issue, or an issue with kernel versions (i.e. maybe Slackware is using an older kernel than Elive, or is missing some helpful patches, or something like that).

    As far as a hex key: All keys are (eventually) hex, but to know whether iwconfig will work, we need to know what type of key it is.

    If it's either WEP40 or WEP104, then the ASCII values of the characters in the key are used directly to get the bytes that make up the key, so e.g. a WEP40 hex key of "4141414141" is "AAAAA" in text. WEP40 hex keys are 10 characters (5 bytes, 40 bits) long, and WEP104 hex keys are 26 characters (13 bytes, 104 bits) long.

    (I think someone was working on a way to get WEP hex keys from ASCII keys that was better than simply taking the ASCII values, but that was happening around the time that WEP was being broken, so I don't think it went anywhere.)

    But if you use WPA-PSK or WPA2-PSK, then the text version of the pre-shared key gets hashed, along with the SSID string, to yield the hex key. PSK hex keys are always 64 characters (=32 bytes, =256 bits) long. The text version can be any length because of the hashing, but most programs that accept text PSKs force them to be 63 characters or less.

    And iwconfig only accepts WEP keys. So if your hex key is 10 or 26 characters long, then yes, you can use iwconfig to set it (though I'm not exactly sure how). If you need a WPA or WPA2 key, then you probably need to use wpa_supplicant (or NetworkManager, which uses wpa_supplicant to do the work).

  7. #7
    Join Date
    Jun 2008
    Posts
    10

    Probably a Kernel issue and/or an interface one

    Sorry for not replying recently, I was away. Anyways on Elive the output of
    ls -l device/driver/module in /sys/class/net/xxx for
    eth0: e100 eth1: airo wifi0: no such directory

    The active interface in Elive is eth1 according to network settings.

    iwconfig reports that eth1 and wifi0 have wireless settings, while lo, eth0, and irda0 have no wireless extensions.

    Source Kernel edition in /usr/src is 2.6.18-elive (I doubt it is anything more than a 2.6.18 kernel, unless Elive's developer is also a kernel hacker)

    In Slackware 12.1 the output of ls -l device/driver/module in /sys/class/net/xxx
    for eth0: airo eth1:e100 wifi0: no such file or directory

    Active interface in Slackware is supposed to be eth0, but I'm not sure since I have no connection.

    iwconfig reports that eth0 and wifi0 have wireless settings while lo, irda0, and eth1 have no wireless settings.

    Source kernel edition/version in /usr/src in Slackware is 2.6.24.5

    My key is 10 charcters long so it is a WEP40, and the iwconfig output for eth1 in elive and eth0 in Slackware is the same.

    Nonetheless, I am confused how in two different distros how two different interfaces could switch jobs and drivers. Is this a naming issue, or have they actually switched? I know in an Ubuntu live CD it calls my hard drive /dev/sda but in the GParted Live CD my hard drive is identified as /dev/hda. Do these discrepancies say anything about my problem?

  8. #8
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Quote Originally Posted by wkdude18
    The active interface in Elive is eth1 according to network settings.
    Sigh. I hate distros that use old versions of the udev network persistence scripts.

    That should be wlan0, not eth1. Something on your machine is renaming it to eth1, because when wlan0 was first registered, that something saw that eth0 was in use, but didn't want to leave well enough alone with wlan0, and so renamed it to eth1. Stupid script.

    Anyway, it probably doesn't matter much, but I'm still going to rant about it.

    iwconfig reports that eth1 and wifi0 have wireless settings, while lo, eth0, and irda0 have no wireless extensions.
    eth1 and wifi0 are different virtual interfaces on a single physical interface. (That's why eth1 should be wlan0: wlan0/wifi0 is the normal split.)

    Source Kernel edition in /usr/src is 2.6.18-elive (I doubt it is anything more than a 2.6.18 kernel, unless Elive's developer is also a kernel hacker)
    Lots of distros add patches to kernels without having any specific kernel hacker in their team. They may have pulled together a bunch of patches from elsewhere. If it was a normal 2.6.18 kernel, it would have a version of 2.6.18, not 2.6.18-elive -- therefore at least one thing has changed. And I bet a lot more than just that one thing has changed.

    for eth0: airo eth1:e100
    So Slackware is using (or used, at one point) the same dumb network persistence script, but it assigned eth0 to the wireless device instead of eth1. Not a huge deal though.

    Active interface in Slackware is supposed to be eth0, but I'm not sure since I have no connection.
    That's the wireless device, yes. (The e100 driver won't bind to any wireless card.)

    iwconfig reports that eth0 and wifi0 have wireless settings while lo, irda0, and eth1 have no wireless settings.
    Yep, same thing: eth0 should be wlan0 to match wifi0, but it is definitely the wireless card.

    Source kernel edition/version in /usr/src in Slackware is 2.6.24.5
    Well, that's a heck of a lot newer. Something like a couple of years, actually.

    My key is 10 charcters long so it is a WEP40,
    OK, so if you try to set that key using "iwconfig eth0 key 1234567890", does it help?

    Nonetheless, I am confused how in two different distros how two different interfaces could switch jobs and drivers.
    Device names are assigned randomly at each boot. There are some scripts that run to make them the same as the last boot, but that only applies on a single distro (Elive and Slackware don't share the configuration here). So Elive assigned eth1 to the wireless card, but Slackware assigned eth0. Not a huge deal (and you can change the assignment by editing udev configuration files), but that's how it happened.

    I know in an Ubuntu live CD it calls my hard drive /dev/sda but in the GParted Live CD my hard drive is identified as /dev/hda. Do these discrepancies say anything about my problem?
    That's a different issue (one CD uses the newer libata driver and makes the disks appear to be SCSI, while the other CD uses the older IDE-only driver). It's somewhat similar in that the devices don't always keep the same names, but it's not directly related to the network card naming issue.

  9. #9
    Join Date
    Jun 2008
    Posts
    10

    If Kernels are the Probelem whats the solution?

    Okay, so all of the naming makes sense now. But does any of the information give you any hint as to why wireless works with one and not the other? Or should I give you more info?

    For viewers info: Since the topic of this discussion has changed dramatically and the one of the basic questions have been solved, this discussion has been moved to this link:http://justlinux.com/forum/showthrea...050#post882050
    Last edited by wkdude18; 06-26-2008 at 07:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •