Announcement

Collapse
No announcement yet.

Setting up wifi internet with ndiswrapper for n00bs

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Setting up wifi internet with ndiswrapper for n00bs

    ***EDITED TO INCLUDE UPDATED INFO***  08/01/06
    Now I know that not everyone has the same setup and its hard when you have no internet at all, so being new myself it took me about a month to figure it all out.  So this is something I am putting together to help the n00bs like me that need step by step generic instructions.  So here goes!  I will include pics when I learn how to post them.  As well this guide is also written for use with PCI internal wifi cards, I do not know if it will work the same for notebook pcmcia wifi cards.  Also not sure if all this will work in the new Dapper LTS release but I should think so.

    GETTING STARTED: The Basics

    First get the MAC address for your wifi card, it should be on the card itself**(A MAC address is like an ESN for your cell phone, it is a number that is assigned to each networking card and is unique to that card)** or you can find it in windowsxp by running the c:/prompt terminal, you find that by going to your winxp start menu > Programs > Accessories > Command Prompt.
    Once at the c:\ prompt, type in
    Code:
    ipconfig /all
    it will give you your MAC address, The "12-digit Physical Address" is the same as MAC address, write it down you will need it later.  If your set up for high speed internet is DHCP the rest will be easy cause it will handle all the config IP address for you, if its not DHCP, then i can not help you, cause like I said I am new too, this was all the info I found and was helped with.
    DHCP stands for "Dynamic Host Configuration Protocol".
    A static IP address is a number that is assigned to a computer by an Internet service provider (ISP) to be its permanent address on the Internet.  Check with you ISP if your not sure what you have.  Also the differnces can be found here.
    http://computing.fnal.gov/cd/windows...NTguide.b.html

    Getting NDISWrapper

    Step 1
    So next you need to make sure your wifi pci card is compatible with ndiswrapper, check this website and find your make and model.
    If its not listed in the ndiswrapper "list" page then it is probably not supported by ndiswrapper., You would then have to use another means of setup such as maddog, But I have never used them.

    http://ndiswrapper.sourceforge.net/m...index.php/List
    If it is supported then continue on.

    Step 2
    Next you need to obtain your wifi cards "windows driver" which you should/could download from the ndiswrapper "list" page to your home folder or put in in your home folder when you obtain it.

    Extract the driver to a new folder(it should have been downloaded in a ".zip" like format), name the folder something simple as it helps navigate to it later in the terminal.
    My driver file that I downloaded is named "WN-WPCI-Web-Update-v1.1.exe", so when i extracted the driver, I did it to a folder called "motorola" in my home directory.
    Name it what you want but either write it down exactly as it appears or make it very easy to remember, linux comands are case sensetive when making or changing to directories. 
    Look in the folder you extracted your windows driver to for your "driver name".inf, 
    The ".inf" file in your driver folder will be the driver file you need to install in ndiswrapper so write it down exactly as it apears.  For this guide we will use mine as an example.  So when you see me use "motorola" or "bcmwl5a.inf", I am refering to MY driver and MY folder, Yours could be named something different.
    In the "motorola" folder  I found my driver which is called "bcmwl5a.inf" after the "w" bcmwl5a it is a lowercase "L" not a "1".
    Remember, you should only need the ".inf" file for ndiswrapper, windows uses all the other files as well, but linux should not need them.

    Step 3
    Next we need to make sure you have ndiswrapper installed, you need to go and open your terminal window or also called "shell", don't be afraid of it, it doesn't bite. If your don't know where the terminal is go to your K menu and click on it, scroll to the system folder in there should be an icon for Terminal Program (Konsole), thats what you need. If ndiswrapper is already installed it will let you know after you type the code to install it.

    Step 4
    The first thing you will see in your terminal window is
    Code:
    "Your Login Name"@kubuntu:~/$
    (this is your home directory)or "home folder" in terminal, this is the directory most of your coding will be done at.
    Become familure with some terminal commands. 
    The main ones to know are things like to make any changes to your comp, use the "sudo" command, it gives you root privleges(super user) and uses your "login password" you set up kubuntu with to login.
    Type this into the terminal window and it will ask for your password
    Code:
    sudo apt-get install ndiswrapper-utils
    Also if you still are not comfortable using the Terminal window you can install a graphical version of the ndiswrapper utility by going into adept or synaptic and downloading or installing ndisgtk, a GUI for Ndiswrapper, or type in the terminal window
    Code:
    sudo apt-get install ndisgtk -a
    if you don't like or know how to use adept. though without internet I think it would be hard to install the GUI hence why you are reading this guide and also I believe this GUI is for the gnome desktop as I installed it in kubuntu but could not make it open. Anyway if you did install ndiswrapper right (using the first method in the terminal window) and if its is able to install you should get this output,

    Reading package lists... Done
    Building dependency tree... Done
    Suggested packages:
      ndiswrapper-source
    The following NEW packages will be installed:
      ndiswrapper-utils
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B/25.7kB of archives.
    After unpacking 131kB of additional disk space will be used.

    Preconfiguring packages ...
    Selecting previously deselected package ndiswrapper-utils.
    (Reading database ... 57910 files and directories currently installed.)
    Unpacking ndiswrapper-utils (from .../ndiswrapper-utils_1.1-4ubuntu2_i386.deb) ...
    Setting up ndiswrapper-utils (1.1-4ubuntu2) ...
    If you can't install ndiswrapper, you need to get to a computer that has internet and download it manually.
    Follow this link,
    http://sourceforge.net/projects/ndiswrapper/
    then follow the installation directions from this page
    http://ndiswrapper.sourceforge.net/m....php/Main_Page
    this is the main ndiswrapper page as well,
    http://ndiswrapper.sourceforge.net/
    If all installs well continue,....

    Installing Your WinDriver

    Step 1
    Now we need to change to the directory or "folder" that your windows driver was extracted to in the earlier steps above, we will use mine as examples for now. But remember to substitute your "folders" name when you do this.
    The folder "motorola" will be used in this exercise, once we get there we are going to be able to install your win driver so.......
    Change to driver directory by typing in your terminal window,
    Code:
    cd motorola
    Where my "cd motorola" is you would put your folders name that you used to when unzipping your driver.
    Would look like this for me
    Code:
    jrsoit@kubuntu:~/$cd motorola
    Hit enter.
    Now you should be in the directory ("folder") the driver is in,(as long as you put the folder in your home directory, not anywhere else)
    Mine would look like
    Code:
    "Your login"@kubuntu:~/motorola$
               

    Step 2
    Next we are going to load (install) the driver by typing in the terminal window,
    Code:
    sudo ndiswrapper -i "your driver name here".inf
    without the quotation marks and with the proper name of your driver that I had you write down earlier.
    Mine would look like,
    Code:
    jrsoit@kubuntu:~/motorola$sudo ndiswrapper -i bcmwl5a.inf
    NDISWrapper should do its thing and will take you back to the prompt, even if it failed to install the driver.
    So now we need to verify it did infact install.
    At this point we need to get back to our main directory(your home folder) so in your terminal window you type,
    Code:
    cd
    then hit enter and you should be back to
    Code:
    "Your login"@kubuntu:~/$
    Step 3
    now to verify the driver install, type in terminal window
    Code:
    ndiswrapper -l
    The "-l" is a lowercase "L", not a "1".
    Your output should look similar to this but with your "driver" name.

    Installed ndis drivers:
    bcmwl5a  driver present, hardware present
    Step 4
    Now do something to ensure ndiswrapper gets properly loaded, type in terminal window, same directory,

    Code:
    sudo ndiswrapper -m
    it will either do nothing or give you some output, if it gives you an output message, post the output to a new topic for more help with it other wise try this code instead, which i believe is just an alternate way of enshuring ndiswrapper is properly loaded, type in terminal window,

    Code:
    sudo modprobe ndiswrapper
    Configuring NDISWrapper

    Step 1
    Now we need to add your cards MAC address to the "iftab" file, "/etc/iftab", this is a file on your computer that tells your comp info about your networking cards. The code will open up another program, probably "kate"or"kwrite" which is a text editor for you to add the info, kinda like notepad in windows. Do not close your terminal window just leave it in the background
    Type in the terminal window,
    Code:
    sudo kwrite  /etc/iftab
    It would look like this for me:
    Code:
    jrsoit@kubuntu:~/$sudo kwrite /etc/iftab
    Now you will add the mac address as the "wlan0 interface" line under the "eth0" line.
    The 0 at the end of wlan0 and eth0 is a zero.
    It should look something like this in "kate/kwrite",

    /etc/iftab
    # This file assigns persistent names to network interfaces.  See iftab(5).
    eth0 mac 00:0d:87:9d:9f:74
    wlan0 mac 00:0C:E3:57:30:5F(THIS IS WHAT YOU ADD, not my real mac address either, just for teaching purposes)
    After you add the line "wlan0 mac (put 12 digit MAC Number here without parentecies)" you need to save the file by going to filemenu > save, or click the floppydisk icon up top of the text program. You can close the program "kate/kwrite" after you save the file and then go back to your terminal window which should now be back to your home directory prompt.

    Step 2
    We can verify the changes made to the "iftab" file by typing this code into the terminal window,

    Code:
    cat /etc/iftab
    It would look like this for me:
    Code:
    jrsoit@kubuntu:~/$cat /etc/iftab
    Your output should look similar to this,

    # This file assigns persistent names to network interfaces.  See iftab(5).
    eth0 mac 00:0d:56:38:8e:38
    wlan0 mac 00:90:4B:B1:02:04
    Step 3
    Next we will edit "/etc/network/interfaces" file to include wlan0, it will open up "kate" again for you to add the info. This file is i think like the text version of your network configurations in windows.
    Type in your terminal window,
    Code:
    sudo kwrite /etc/network/interfaces
    Would look like this for me:
    Code:
    jrsoit@kubuntu:~/$sudo kwrite /etc/network/interfaces
    It should open up this file:
    /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
            script grep
            map eth0
    Then we add "auto wlan0" and "iface wlan0 inet dhcp" to the bottom of what is already there in the text file.
    The second one you add (iface wlan0) makes it start up everytime you reboot.

    After you add the above info to your "interfaces" file it should look similar to this

    /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
            script grep
            map eth0
            auto wlan0(1st added this)
            iface wlan0 inet dhcp(2nd added this)
    Other wise you have to type into the terminal window,
    Code:
    sudo dhclient wlan0
    Everytime you reboot to get your internet to work.
    Thats just to much work!

    I was also told
    "I think you should comment your lines in mapping paragraph...
    Then make : type in terminal
    sudo ifdown -a
    sudo ifup -a
    and check if all is good, at least it's working with me"
    By forum member "sky" but I am not sure what for.

    Commenting means to put a # symbol infront of a line to keep it from being loaded, so it would look like this instead. This is the same file as above just edited to include more configurations.
    Code:
    "your login name"@kubuntu:~/$sudo kwrite /etc/network/interfaces
    /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
    #      script grep(notice the # now at the beggining of the line, keeps it from loading at start)
    #      map eth0(notice the # now at the beggining of the line, keeps it from loading at start)
            auto wlan0(this was what we added from the above step)
            iface wlan0 inet dhcp(this is what we added from the above step)

    I didnt do it and its working fine but I think it optimizes the time it takes the comp to get the wifi to connect and load at start up, I think it keeps the computer from trying to initialize the ethernet port.

    Step 4
    If you know your network name you can add this as well and also if you are using encryption keys (passwords/WEP) to access your router, encryptions make the connection secure so no random persons can use your internet, also refered to as WAP/WEP,(refer to your router user guide for more info on this).
    For your connection it is added here as well, also it would look like so after editing the same file again.
    Code:
    sudo kwrite /etc/network/interfaces
    /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
    #      script grep(stopped from loading at startup with #)
    #      map eth0(stopped from loading at startup with #)
            auto wlan0(added this from above)
            iface wlan0 inet dhcp(startup everytime you reboot added from above)
            wireless-essid "default"(Your name of your network)
            wireless-mode managed(I have no clue but it works)
            wireless-key 4C51D978BAD9901BC2B5A4AE03(encryption key or "WEP")
    You can also add "wireless-channel" but I don't know what for and i didnt use it since i have no security on my wireless router.

    If you are done editing you /etc/network/interfaces file now, you can press the save (floppydisk) button and exit.
    You should now have everything done and ready to start using your new wifi connection.

    The REAL DEAL!

    Testing:
    Close your terminal window and restart the computer or in the terminal window type, (Not sure if it's necessary, but wanted to prove everything worked correctly.)
    The terminal command to reboot is
    Code:
    sudo reboot
    Reboot and log back in, then open up a browser and go to a website.
    If it works welcome to the world of linux wifi internet, if not you probably need to do some more configuration and you should post all terminal outputs in a new topic for more experienced help.

    Good luck and safe browsing!!!
    Thank you for reading.....

    BIG THANKS GOES TO FOURM MEMBERS:
    sky
    ericesque
    dcdurazzo
    For all the help and info they have given me, without them I would never have gotten my wifi up and running and not able to provide this info guide to you all so THANK YOU ALL FOR HELPING ME!!!!!!  Most of this guide come from the info they provided me!

    Feel free to add anything to this guide that I may have missed or forgot or mabey even hopefully not got wrong.
    I didnt know where to post this so its posted once in the help the new guy section. If it needs to be moved, please do so. I think this guide should be made permanent if possible.
    Later,
    &quot;Time fades even legend&quot;<br />-Blood Omen: Legacy of Kain

    #2
    Re: Setting up wifi internet with ndiswrapper for n00bs

    I think you may have been a little too specific to your experience--without explaining yourself.

    for example, when you're instructing the user to change to the directory which contains their drivers, your code says to 'cd motorola'. Now, this may make sense to someone who has been through the process, but it still took me a couple minutes to figure out what you were trying to have the reader do. I kept thinking 'what's he talking about? I didn't have to do that.' only to realize what step you were trying to describe.

    also, you don't have to be at the root directory to do the 'ndiswrapper -l, sudo ndiswrapper -m, and sudo modprobe ndiswrapper' commands.

    You have a good start here though. I think with some time and consideration I can use some of what you have said in conjunction with my experience (and some pics!) to create one ndiswrapper tutorial to rule them all.

    Comment


      #3
      Re: Setting up wifi internet with ndiswrapper for n00bs

      Well thanks, just remember I am brand new to linux myself and so like the pics thing is still beyond what I know how to do as for the rest of the guide, I think its more newbie friendly than all the other info out there and this is all compiled by all the stuff that I was helped with from the above mentioned people, stuff I got from their posts to me as they helped me get my internet to work. So mabey some of us can all work together and make this guide better, Its a starting place where new people can look to to get all the basic info they need to get the wifi running without having to search hi and low for scraps of info *hey that rhymed*. Keep the suggetions coming and I will try my best to incorporate them in as I have time to. And if anyone knows or can tell me how to make screen shots, I will get them done as I am currently setting up another kubuntu linux box for my wife, so as I set hers up I can take the screenshots.
      Thanks

      By the way thank you for the help you gave me in my other post that helped me get online, your info was greatly appreciated and so used in this guide.
      &quot;Time fades even legend&quot;<br />-Blood Omen: Legacy of Kain

      Comment


        #4
        Re: Setting up wifi internet with ndiswrapper for n00bs

        Hi there,

        I just completed this tutorial and wanted to express my gratitude. This is all new to me and all went well when following your instructions.

        Cheers!

        Jon

        Comment


          #5
          Re: Setting up wifi internet with ndiswrapper for n00bs

          Thank you, jon, this is very informative.

          I just wanted to mention that there is an article about ndiswrapper in the November of Tux Magazine, http://www.tuxmagazine.com/. Tux is probably a good thing to read in any case, especially since it's free as in beer!

          Comment


            #6
            Re: Setting up wifi internet with ndiswrapper for n00bs

            Your tutorial got me further under Kubuntu than anything else I've found. I couldn't find a simple solution for accessing ndiswrapper anywhere else, and I knew it had to be in there somewhere. So thanks for that. However, when I installed the drivers using ndiswrapper, it tells me they are installed, but beside each it says invalid driver. I installed bcmwl5.inf, bcmwl5a.inf, bcmwl5.sys, and bcmwl5a.sys. Any ideas? (I also posted this as a new question before realizing that I might be better off asking here.) Win2K on the same computer uses the driver bcmwl5.sys.

            Comment


              #7
              Re: Setting up wifi internet with ndiswrapper for n00bs

              First, let me say, great tutorial. Got me a lot farther along than anything else that I've tried including the NDISWRAPPER Wiki! Anyway, there has been an issue and I'm hoping that someone can help me out. I have Kubuntu installed on an IBM ThinkPad 600X. She only has about 192MB of RAM installed right now (getting more RAM tomorrow...). Ofcourse there is no ethernet port, only one USB port and 2 PC Card slots. Seeing as how I use a wireless USB mouse, I opted to go for PC Card wireless adapter.

              Anyway, after folowing the tutorial, I finally got the wireless card to power-up and stay on. However, I never got a chance to test if it was connecting to my schools network. After restarting the laptop per the instructions, my laptop will not go thru the full boot process. It gets theough the Kubuntu screen, but then when it goes theough it's system check scripts, it keeps throwing up either I/O errors, filesystem errors or it goes into a kernal panic and locks-up. Also, sometimes, it goes into fsck, but then the system won't take my root password when it asks me to authenticate. I've followed the instructions to the letter, be careful to type in only the information that applied to me. I can't understand what the problem could be. Can someone help me please?

              Comment


                #8
                Re: Setting up wifi internet with ndiswrapper for n00bs

                sorry viperteq,

                when it comes to using pcmcia notebook wifi cards I have no idea how to get them to work. They are looked at differently in kubuntu hardware configs, and I have not had the option to use that setup on my laptop. Since I did a clean install of kubuntu LT6.06 on my HP laptop with my D-link wifi pcmcia card installed when I did the install it found the hardware and configured it for me, seems they fixed some of the hardware support in dapper, so it might be a good idea to try it.
                &quot;Time fades even legend&quot;<br />-Blood Omen: Legacy of Kain

                Comment

                Working...
                X