Page 1 of 7 123 ... LastLast
Results 1 to 10 of 68

Thread: HOWTO: Latest madwifi svn snapshot

  1. #1
    Join Date
    Jun 2005
    Location
    Ashland Virginia (usa)
    Beans
    Hidden!

    HOWTO: madwifi-ng from svn snapshot

    As every user has options with gnu/linux you can also see this howto. The instructions there will let you keep restricted modules working.
    http://ubuntuforums.org/showthread.p...hlight=MADWIFI

    This howto will install the latest svn snapshot of the madwifi-ng driver for pci devices based on the atheros chipset. The difference between this and the other howto on madwifi in this section is the other will update to the latest madwifi-old module and this installs madwifi-ng.
    The newer features found in the -ng version can be found here.

    This update is not necessary unless
    1. your pci device is not working with current version that comes with breezy.
    2. Or you can use if you removed restricted modules to use latest nvidia/fglrx drivers
    3. You build a custom kernel but note these instructions do not include steps to properly make and install when using custom kernel. I can add these later as I'm not sure of all steps and currently don't have a custom kernel to work with. If somebody else wants to post some instructions, I'll edit them into the original post.

    Note: madwifi does not currently support USB devices with the atheros chipset and the roadmap shows it will be sometime before USB support is built into the driver(version 2.0). You can watch progress at www.madwifi.org


    Warning:
    The atheros driver that comes with Breezy is part of the restricted-modules package. This will need to be removed before you can install the latest driver. All modules in this package will be removed and may affect areas such as your graphic driver. If you need to use a module in this package then you will also have to recompile and install that module. There are howtos on the latest nvidia and fglrx in the tips and tricks section.

    Here are the modules in the restricted-module package

    Currently the following modules are included:
    - madwifi (Atheros)
    - fglrx (ATI)
    - nvidia
    - fcdsl, fcdsl2, fcdslsl, fcdslslusb, fcdslusb, fcdslusb2, fcdslusba,
    fcpci, fcpcmcia, fcpcmcia_cs, fcusb, fxusb (AVM ISDN)
    - ltmodem (Winmodem)

    HOWTO: latest fglrx
    HOWTO: latest nvidia

    .1 Preperation

    You will need a working internet connection to complete this howto.
    Basic knowledge of moving around in the terminal is required
    1. Remove the following package
    Code:
    sudo apt-get --purge linux-restricted-modules-`uname -r`
    2. Install the following packages
    Code:
    sudo apt-get install build-essential linux-headers-`uname -r` gcc-3.4 subversion sharutils
    1.0 Download

    Code:
    cd /usr/src
    Code:
    sudo svn checkout http://svn.madwifi.org/trunk madwifi-ng
    move into the directory that was created

    Code:
    cd /usr/src/madwifi-ng
    1.1 Build

    There is an error that comes up if you don't follow this step first.

    Open Makefile.inc

    Code:
    sudo gedit Makefile.inc
    towards the bottom is a line line that needs to be modified.

    COPTS+= -Werror

    change this line and remove the -Werror part so line now looks like this.

    COPTS+=

    This will not affect driver in anyway, it's just something in the way ubuntu built the kernel for breezy which will prevent installing the driver.

    Note: I and others have been able to build, install, and use this driver with no problems but as provided by marcantonio, see about setting up file to ensure gcc-3.4 is used to build driver in this post.
    http://ubuntuforums.org/showpost.php...2&postcount=35

    Now

    Code:
    sudo make
    There will be some warnings but you can ignore those. Look for any errors as these will need to be addressed before moving on to next step.

    1.2 Install

    Code:
    sudo make install
    You may get this warning

    Code:
    WARNING:
    It seems that there are modules left from previous MadWifi installations.
    You should consider removing them before you continue, or else you might
    experience problems during operation. Remove old modules?
    
    [l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ?
    You should remove with option r

    If all goes well your last few lines should look like this.

    Code:
    (export MODULEPATH=/lib/modules/2.6.15-8-686/net; depmod -ae)
    echo "KERNELRELEASE=2.6.15-8-686" > ./install.log
    echo "DESTDIR=" >> ./install.log
    1.3 Insert module

    Code:
    sudo modprobe ath_pci
    1.4 Create the interface

    Code:
    wlanconfig ath0 create wlandev wifi0 wlanmode sta
    You should now have the latest madwifi driver working. Just configure your network and connect.

    If it does not then try to restart your network

    Code:
    sudo /etc/init.d/networking restart
    or reboot after completing the next step.

    2.0 Configure for boot

    Edit Feb 4th: With latest driver, this part is no longer needed. Kept in howto for historical reference.

    When you reboot the interface will not be set up. Add a line like this for the interface in the /etc/network/interfaces

    pre-up wlanconfig ath0 create wlandev wifi0 wlanmode sta

    Example

    iface ath0 inet dhcp
    pre-up wlanconfig ath0 create wlandev wifi0wlanmode sta
    wireless-essid xxxx
    wireless-key xxxx


    3.0 Uninstall

    If you want to uninstall this module just move back to the directory

    Code:
    cd /usr/src/madwifi-ng
    and

    Code:
     sudo make uninstall
    Notes
    If you want to use wpa encryption with -ng driver you will need latest wpasupplicant. See instructions here.
    Last edited by Lambert; February 5th, 2006 at 05:32 AM.

  2. #2
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Latest madwifi svn snapshot

    Gave this a shot earlier....Had some errors though and not sure how to correct them. This is what it spits out at the end:

    make[3]: *** [/usr/src/madwifi-ng/net80211/if_media.o] Error 1
    make[2]: *** [_module_/usr/src/madwifi-ng/net80211] Error 2
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-10-686'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/madwifi-ng/net80211'
    make: *** [modules] Error 1

    I dont see anything above it about errors, besides this line:

    cc1: warnings being treated as errors

    Any help would be greatly appreciated.

  3. #3
    Join Date
    Jun 2005
    Location
    Ashland Virginia (usa)
    Beans
    Hidden!

    Re: HOWTO: Latest madwifi svn snapshot

    It may not have anything about errors above this but there is more information needed above this. Can you post the entire output after running the command.

  4. #4
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Latest madwifi svn snapshot

    Yah, I think I see the problems, but have no idea how to fix them:

    root@BigLaptop:/usr/src/madwifi-ng# make
    Checking requirements... ok.
    Checking kernel configuration... ok.
    mkdir -p ./symbols
    for i in ./ath_hal ./net80211 ath_rate/sample ./ath; do \
    make -C $i || exit 1; \
    done
    make[1]: Entering directory `/usr/src/madwifi-ng/ath_hal'
    cp -f ./../hal/public/i386-elf.opt_ah.h opt_ah.h
    cp -f ./../hal/linux/ah_osdep.c ah_osdep.c
    /usr/bin/uudecode ./../hal/public/i386-elf.hal.o.uu
    make -C /usr/src/linux-headers-2.6.12-10-686 SUBDIRS=/usr/src/madwifi-ng/ath_hal MODVERDIR=/usr/src/madwifi-ng/ath_hal/../symbols modules
    make[2]: Entering directory `/usr/src/linux-headers-2.6.12-10-686'
    CC [M] /usr/src/madwifi-ng/ath_hal/ah_osdep.o
    LD [M] /usr/src/madwifi-ng/ath_hal/ath_hal.o
    Building modules, stage 2.
    MODPOST
    Warning: could not find /usr/src/madwifi-ng/ath_hal/.hal.o.cmd for /usr/src/madwifi-ng/ath_hal/hal.o
    CC /usr/src/madwifi-ng/ath_hal/ath_hal.mod.o
    LD [M] /usr/src/madwifi-ng/ath_hal/ath_hal.ko
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-10-686'
    make[1]: Leaving directory `/usr/src/madwifi-ng/ath_hal'
    make[1]: Entering directory `/usr/src/madwifi-ng/net80211'
    make -C /usr/src/linux-headers-2.6.12-10-686 SUBDIRS=/usr/src/madwifi-ng/net80211 MODVERDIR=/usr/src/madwifi-ng/net80211/../symbols modules
    make[2]: Entering directory `/usr/src/linux-headers-2.6.12-10-686'
    CC [M] /usr/src/madwifi-ng/net80211/if_media.o
    cc1: warnings being treated as errors
    In file included from include/linux/if_ether.h:107,
    from include/linux/netdevice.h:29,
    from /usr/src/madwifi-ng/net80211/if_media.c:60:
    include/linux/skbuff.h: In function 'skb_add_data':
    include/linux/skbuff.h:1067: warning: pointer targets in passing argument 1 of 'csum_and_copy_from_user' differ in signedness
    make[3]: *** [/usr/src/madwifi-ng/net80211/if_media.o] Error 1
    make[2]: *** [_module_/usr/src/madwifi-ng/net80211] Error 2
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-10-686'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/madwifi-ng/net80211'
    make: *** [modules] Error 1

  5. #5
    Join Date
    Jun 2005
    Location
    Ashland Virginia (usa)
    Beans
    Hidden!

    Re: HOWTO: Latest madwifi svn snapshot

    Ok, do this

    in user /usr/src/madwifi-ng

    open up Makefile.inc

    sudo gedit Makefile.inc

    towards the bottom you'll see a line COPT -Werror

    erase the -Werror part and save the file.

    then sudo make again

    You'll see a bunch of warnings in the output but should complete and you can go onto the make install step.

  6. #6
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: HOWTO: Latest madwifi svn snapshot

    couple of problems

    Code:
    robert@linux:~$ sudo apt-get purge linux-restricted-modules-`uname -r`
    E: Invalid operation purge
    robert@linux:~$
    Code:
    robert@linux:~$ sudo apt-get install build-essentials linux-headers-`uname -r` gcc-3.4 subversion
    Reading package lists... Done
    Building dependency tree... Done
    E: Couldn't find package build-essentials
    robert@linux:~$
    Code:
    robert@linux:/usr/src/madwifi-ng$ sudo make
    Checking requirements... FAILED
    The 'uudecode' tool was not found on your system. Please make sure
    it is installed in your PATH, then try again.
    make: *** [sanitycheck] Error 1

  7. #7
    Join Date
    Jun 2005
    Location
    Ashland Virginia (usa)
    Beans
    Hidden!

    Re: HOWTO: Latest madwifi svn snapshot

    errors in my entry and didn't double check.

    change purge to --purge

    change build-essentials to build-essential

  8. #8
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Latest madwifi svn snapshot

    Thanks. Its up and working now. I just have one question...well probably alot more, but the main one is this one. What does this do:

    wlanconfig ath0 create wlandev wifi0 wlanmode sta

    When do that and get the network started up...when I run "ifconfig" I have 2 listings. One is ath0 and one is wifi0. Maybe I just dont fully understand the way madwifi works. When I originally installed kubuntu, I only had ath0. All is well and working, just trying to figure out what the extra one does and if I need to ever refer to it for example when setting up the wpa_supplicant....

    It seems like I have to refer to ath0 when issuing ifup or ifdown as they dont seem to think wifi0 exists, probably because it doesnt have an entry in interfaces...

  9. #9
    Join Date
    Jun 2005
    Location
    Ashland Virginia (usa)
    Beans
    Hidden!

    Re: HOWTO: Latest madwifi svn snapshot

    Quote Originally Posted by pugs
    Thanks. Its up and working now. I just have one question...well probably alot more, but the main one is this one. What does this do:

    wlanconfig ath0 create wlandev wifi0 wlanmode sta


    When do that and get the network started up...when I run "ifconfig" I have 2 listings. One is ath0 and one is wifi0. Maybe I just dont fully understand the way madwifi works. When I originally installed kubuntu, I only had ath0. All is well and working, just trying to figure out what the extra one does and if I need to ever refer to it for example when setting up the wpa_supplicant....

    It seems like I have to refer to ath0 when issuing ifup or ifdown as they dont seem to think wifi0 exists, probably because it doesnt have an entry in interfaces...
    Madwifi-ng has some interesting work going into to. I don't know of another driver doing what they are doing but I also don't follow all drivers.

    I might not explain this properly but this is how I understand it so far.

    wifi0 is a base interface that sits on top of the driver. When you ran the wlanconfig command it builds an interface ontop of the wifi0 interface. With the madwifi device you can build multiple interfaces ontop of the wifi0 base so your card can run in multiple ways at the same time. Your card can be an ap for others while also runing in stationary client mode where it's connected to a router. You can run multiple aps at one time.


    For a typical home owner none of this is necessary as they just need a single interface to connect to a router but it adds flexibility for certain users/situations.

    So to answer your question what does the wlanconfig command do? it sets up an interface, assigns the name ath0 and sets it up in station mode.

    If you decide to look more into wpa it will be on the ath0 interface and not on thewifi0 interface.

    http://madwifi.org/wiki/UserDocs/WPA_PSK_on_Both_Ends

    I haven't played with this yet but I don't believe you have to compile the latest wpasupplicant, you may be able to use wpasupplicant from the repositories.
    Last edited by Lambert; December 24th, 2005 at 03:11 AM.

  10. #10
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Latest madwifi svn snapshot

    That makes quite a bit of sense...thanks alot.

    I did think up another question for you. I know the -ng is supposed to add some extra "enhanced" features... The main ones that might be of interest at least to me are things like SuperG mode...Is it possible to run up to 108 Mbps or not yet? The other one is the XR to gain some distance from the router, not a biggy for me, but some might find it useful.

    There is some info here about changing some of the modes but I think the -ng might be different:

    http://madwifi.org/wiki/FAQ/HowDoI

    There it mentions putting it into mode 3, however with the -ng drivers I have now, when I do: iwpriv ath0 get_mode it returns 11g instead of just an integer...looks like it is a 6 character string now. Also, get_turbo returns 1. However my Router doesnt have a setting for static turbo mode so I may not be able to see higher speeds anyway.

Page 1 of 7 123 ... LastLast

Bookmarks

Posting Permissions

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