How do i install a driver for a wireless usb adapter (debian)
Hi everyone. I am a complete novice when it comes to Linux. I have just installed Debian 5 and i would like to get the wireless adapter working. I have a Ralink RT2070 54Mbs Wireless USB Adapter and the driver disk.
What are the steps/commands i must follow to install the driver please? Many thanks. Neil. |
Welcome to Debian. To install the drivers you don't need the driver disk, just follow the steps for Lenny on this site: http://wiki.debian.org/rt2870sta
In general, the Debian Wiki is a good place to look at if you have any questions. |
Thanks for the link. i think i may be out of my depth here
to follow the instructions and add a repository would i not need to be online? i cant connect via ethernet so would that be a problem? |
Yes, you have to be online to follow those instructions, maybe you can visit an internet caffee and do the installation there.
|
Quote:
Thanks. Neil. |
Ok i have tried to follow the link. The instructions are a little vague at times and were most definitely not written for newbies with no knowledge of linux like myself. But i have managed to struggle through and (after many errors) I think follow what to do.
So far i have added the debian backports, updated the packages and installed the 2.6.32 kernel image via 'aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,') firmware-ralink wireless-tools' Have i done this correct? When i type ‘modprobe rt2500usb’ or ‘modprobe rt73usb’ then type ‘1wconfig’ i get the message: lo no wireless extensions eth0 no wireless extensions And ‘ifconfig wlan0 up’ reports the wlan0: ERROR while getting interface flags: No such device. ‘dpkg –list | grep linux-image’ states that I have 2.6.32 Any idea what i have done wrong or were I have gone wrong? |
Why didn't you do modprobe rt2870sta, as stated in the wiki? As far I can see that is the only mistake, everything else you have done looks OK.
|
I had forgotten to install the lenny-backports/firmware-ralink and wireless-tools package
Although i have them downloaded I have no idea how to install them. i tried to run synaptics package manager but i get an unable to get exclusive lock error saying to close apt-get or aptitude. The only method i could find was the killall method but this did not work |
Quote:
Ralink 802.11g USB devices are supported by the rt73usb and rt2500usb drivers |
The rt2870sta-driver handles the device Ralink 2070 USB, as stated in the Supported Devices section in the wiki, otherwise i would have pointed you to the section for a different driver. Please do as stated in the wiki.
To install the firmware and wireless-tools just do aptitude -t lenny-backports install firmware-ralink wireless-tools. |
Quote:
FATAL: module rt2860sta not found. Then I read Ralink 802.11n PCI devices are supported by the rt2860sta driver. Ralink 802.11g USB devices are supported by the rt73usb and rt2500usb drivers. So I then tried both modprobe rt2500usb and rt73usb to see if they might work On both occasions it went back to debian:/home/neil# Then I realised I had not installed the lenny-backports/firmware-ralink and wireless-tools package. The firmware will not install nor will synaptics package manager open After a reboot I tried to access the Synaptic Package Manager. After it accepted my password an error box came up saying: E: dpkg was interrupted, you must manually run ‘dpkg --configure –a’ to correct the problem. E: _cache->open() failed, please report I have ran the command but I still get locked out. This is when I referred to the killall command I used to try and end the process. I have also tried aptitude -t lenny-backports install firmware-ralink wireless-tools but that failed as well. This is my first go at anything Linux and I am trying as best I can, but as you can probably see I am not doing too well. :-< So I think because I forgot to install the lenny-backports/firmware-ralink and wireless-tools package could be were the problem is? And if it is how do I correct the lock out I have created please? |
Did you run dpkg --configure -a?n What was the output of that command?
I know that you are new to Linux and will try to keep that in mind. However, there are some general advices that I would recommend you to keep in mind. First, try to never interrupt dpkg, because that can leave your system in an inconsistent state. Second, please read any advices given to you carefully and type any commands exactly as given to you. The command to load the driver is not modprobe rt2860sta, but modprobe rt2870sta. Please try this. You have read that 802.11g-USB-devices are handled by different drivers, but the wiki says, that 802.11g-USB-devices with rt2500/rt2501-chipsets are handled by different drivers. If anything is unclear look through the whole documentation, the wiki mentions your chipset in the Supported Devices-Section: Quote:
|
Sorry it was a typo error...i did type rt2870rta.
The error message with dpkg was: status database area is locked by another process. |
I can get the dpkg etc command to run after a reboot and a package configuration page comes up with a configuring linux-base box regarding assigned uuid's or labels etc...i selected yes and it goes to another screen with ok at the end but no way to select it. Then if i try to open synaptics i get an unable to get exclusive lock message.
Thankyou for all the help and advice. I will check back tommorow as its quite late in the uk and i have taken up a lot of your time with my errors. Peace. Neil. |
You can't run two packagemanagers at the same time, therefore the "lock"-errors. To get to the "OK" use the Tab-key.
Quote:
|
ok...due to all the mess i created i reinstalled debian....this time a more up to date september 5th version 5.0.6 (On Sept. 5th, 2010, Backports became an official service)
This version includes backports so no need to do the first stage of adding the repository. i have got as far as modprobe2870sta i get the same error FATAL: Module rt2870sta not found I will leave it there and not do anything else untill someone can point me in the right direction. many thanks for any help anyone can offer. Neil. |
Backports is an official service now, but that doesn't mean that its already included, because not all users want to use backports. You have to follow the wiki-artcle step by step to make it work.
|
one quick point...after stage 3 it asks for the debian disc to be inserted to install the wireless tools (this is not mentioned in wiki). it installed the files ok and after a reboot i continued onto the modprobe....that is were i am at present. Could it be it is not seeing my usb? i have tried it in various sl0ts and each time i get FATAL error.
my repostories are deffinatley there as i checked for deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free i have done exactly as wiki says but the error comes at modprobe. |
i noticed on booting up while it scrolled thru that it said unable to enumerate usb port.
|
OK, please post your sources.list, the output of lspci and the last 10 lines of /var/log/messages after you plugged in the stick.
Have you restarted into the new kernel? |
Quote:
|
Your sources.list is a text file, open it with a text editor copy the contents and place it between code-tags in your post.
Sorry, I made a mistake, we need the output of lsusb, not lspci. Just run that command and copy/paste the output between code-tags in your post. The easiest way to get the contents of /var/log/messages is to type dmesg in a terminal. Then copy/paste the last 10-15 lines into you post (between code-tags). Note: Do that after you unplugged and plugged in the stick again. To get code-tags just press the #-button above the input windows. |
Quote:
Code:
echo sources: > file.txt |
Quote:
|
before i do that i have just noticed the 2.6.32 kernel is not present
aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,') firmware-ralink wireless-tools says couldn't find any package whose name or description matched "firmware-ralink" |
Did you do a apt-get update after editing the sources.list? This is essential.
|
yes i did but cant seem to get the 2.6.32 kernel to appear.
|
aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*,,') firmware-ralink wireless-tools
Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Reading task descriptions... Done No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 97 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. Writing extended state information... Done Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Reading task descriptions... Done GNU nano 2.0.7 file: etc/apt/sources.list # Backported packages for Debian Lenny deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free # deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12]/ lenny contrib main deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12]/ lenny contrib main deb http://security.debian.org/ lenny/updates main contrib deb-src http://security.debian.org/ lenny/updates main contrib apt-get updateIgn cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny Release.gpg Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/contrib Translation-en_GB Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/main Translation-en_GB Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny Release Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/contrib Packages/DiffIndex Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/main Packages/DiffIndex Hit http://security.debian.org lenny/updates Release.gpg Ign http://security.debian.org lenny/updates/main Translation-en_GB Ign http://security.debian.org lenny/updates/contrib Translation-en_GB Hit http://security.debian.org lenny/updates Release Ign http://security.debian.org lenny/updates/main Packages/DiffIndex Ign http://security.debian.org lenny/updates/contrib Packages/DiffIndex Ign http://security.debian.org lenny/updates/main Sources/DiffIndex Ign http://security.debian.org lenny/updates/contrib Sources/DiffIndex Hit http://backports.debian.org lenny-backports Release.gpg Ign http://backports.debian.org lenny-backports/main Translation-en_GB Hit http://security.debian.org lenny/updates/main Packages Hit http://security.debian.org lenny/updates/contrib Packages Hit http://security.debian.org lenny/updates/main Sources Hit http://security.debian.org lenny/updates/contrib Sources Ign http://backports.debian.org lenny-backports/contrib Translation-en_GB Ign http://backports.debian.org lenny-backports/non-free Translation-en_GB Hit http://backports.debian.org lenny-backports Release Hit http://backports.debian.org lenny-backports/main Packages/DiffIndex Hit http://backports.debian.org lenny-backports/contrib Packages/DiffIndex Hit http://backports.debian.org lenny-backports/non-free Packages/DiffIndex Reading package lists... Done dpkg --list | grep linux-imageii linux-image-2.6-686 2.6.26+17+lenny1 Linux 2.6 image on PPro/Celeron/PII/PIII/P4 ii linux-image-2.6.26-2-686 2.6.26-25lenny1 Linux 2.6.26 image on PPro/Celeron/PII/PIII/ |
Try this:
apt-get install linux-image-2.6-i686 if you run a 32-bit system, or apt-get install linux-image-2.6-amd64 if you run a 64-bit system. Please post the output if there are errors. |
Quote:
By the way, you have to run apt-get update before installing a new package. |
apt-get install linux-image-2.6-i686
Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package linux-image-2.6-i686 |
# Backported packages for Debian Lenny
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free # deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12]/ lenny contrib main deb http://security.debian.org/ lenny/updates main contrib deb-src http://security.debian.org/ lenny/updates main contrib |
OK, my error, the correct command should be apt-get -t lenny-backports install linux-image-2.6-686
|
apt-get -t lenny-backports install linux-image-2.6-686Reading package lists... Done
Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies. linux-image-2.6-686: Depends: linux-image-2.6.32-bpo.5-686 but it is not going to be installed E: Broken packages |
OK, then try apt-get dist-upgrade first, maybe this helps. If not, try apt-get -t lenny-backports install linux-image-2.6.32-bpo.5-686
|
apt-get dist-upgrade
Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. apt-get -t lenny-backports install linux-image-2.6.32-bpo.5-686 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies. linux-image-2.6.32-bpo.5-686: Depends: linux-base (>= 2.6.32-23~bpo50+1) but it is not going to be installed E: Broken packages |
I don't have a clue anymore. I think after all that it would be better to install Squeeze, you don't have to use backports than.
|
ok many thanks for all your help. You have helped me learn quite a lot in my first 24 hours of linux.
If i get it working i will post what i did in here. Thanks again. Peace Neil. |
ok think i have almsot got there...this is how far i have got now.(i have done another clean install of debian)
first i went to debian:/home/neil# nano /etc/apt/sources.list and added # Backported packages for Debian Lenny deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free and saved the changes then debian:/home/neil# aptitude update Writing extended state information... Done Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny Release.gpg Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/contrib Translation-en_GB Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/main Translation-en_GB Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny Release Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/contrib Packages/DiffIndex Ign cdrom://[Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12] lenny/main Packages/DiffIndex Hit http://security.debian.org lenny/updates Release.gpg Ign http://security.debian.org lenny/updates/main Translation-en_GB Ign http://security.debian.org lenny/updates/contrib Translation-en_GB Hit http://security.debian.org lenny/updates Release Ign http://security.debian.org lenny/updates/main Packages/DiffIndex Ign http://security.debian.org lenny/updates/contrib Packages/DiffIndex Ign http://security.debian.org lenny/updates/main Sources/DiffIndex Ign http://security.debian.org lenny/updates/contrib Sources/DiffIndex Hit http://security.debian.org lenny/updates/main Packages Hit http://security.debian.org lenny/updates/contrib Packages Hit http://security.debian.org lenny/updates/main Sources Hit http://security.debian.org lenny/updates/contrib Sources Get:1 http://backports.debian.org lenny-backports Release.gpg [835B] Ign http://backports.debian.org lenny-backports/main Translation-en_GB Ign http://backports.debian.org lenny-backports/contrib Translation-en_GB Ign http://backports.debian.org lenny-backports/non-free Translation-en_GB Get:2 http://backports.debian.org lenny-backports Release [74.3kB] Get:3 http://backports.debian.org lenny-backports/main Packages [476kB] Get:4 http://backports.debian.org lenny-backports/contrib Packages [1886B] Get:5 http://backports.debian.org lenny-backports/non-free Packages [7568B] Fetched 560kB in 3s (144kB/s) Reading package lists... Done Current status: 1562 new [+1562]. debian:/home/neil# aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,') firmware-ralink wireless-tools Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Reading task descriptions... Done The following NEW packages will be installed: firmware-linux-free{a} firmware-ralink libuuid-perl{a} linux-base{a} linux-image-2.6.32-bpo.5-686{a} wireless-tools The following packages will be upgraded: linux-image-2.6-686 1 packages upgraded, 6 newly installed, 0 to remove and 96 not upgraded. Need to get 27.2MB/27.3MB of archives. After unpacking 78.6MB will be used. Do you want to continue? [Y/n/?] Y Writing extended state information... Done Media Change: Please insert the disc labeled 'Debian GNU/Linux 5.0.6 _Lenny_ - Official i386 DVD Binary-1 20100904-19:12' in the drive '/cdrom/' and press [Enter]. Get:1 http://backports.debian.org lenny-backports/main linux-base 2.6.32-23~bpo50+1 [157kB] Get:2 http://backports.debian.org lenny-backports/main linux-image-2.6.32-bpo.5-686 2.6.32-23~bpo50+1 [26.9MB] Get:3 http://backports.debian.org lenny-backports/main firmware-linux-free 2.6.32-23~bpo50+1 [139kB] Get:4 http://backports.debian.org lenny-backports/non-free firmware-ralink 0.24~bpo50+1 [18.9kB] Get:5 http://backports.debian.org lenny-backports/main linux-image-2.6-686 2.6.32+27~bpo50+1 [3138B] Fetched 27.2MB in 2min32s (179kB/s) Preconfiguring packages ... Selecting previously deselected package libuuid-perl. (Reading database ... 88526 files and directories currently installed.) Unpacking libuuid-perl (from .../libuuid-perl_0.02-3+b1_i386.deb) ... Selecting previously deselected package linux-base. Unpacking linux-base (from .../linux-base_2.6.32-23~bpo50+1_all.deb) ... Selecting previously deselected package linux-image-2.6.32-bpo.5-686. Unpacking linux-image-2.6.32-bpo.5-686 (from .../linux-image-2.6.32-bpo.5-686_2.6.32-23~bpo50+1_i386.deb) ... Selecting previously deselected package firmware-linux-free. Unpacking firmware-linux-free (from .../firmware-linux-free_2.6.32-23~bpo50+1_all.deb) ... Selecting previously deselected package firmware-ralink. Unpacking firmware-ralink (from .../firmware-ralink_0.24~bpo50+1_all.deb) ... Preparing to replace linux-image-2.6-686 2.6.26+17+lenny1 (using .../linux-image-2.6-686_2.6.32+27~bpo50+1_i386.deb) ... Unpacking replacement linux-image-2.6-686 ... Selecting previously deselected package wireless-tools. Unpacking wireless-tools (from .../wireless-tools_29-1.1_i386.deb) ... Processing triggers for man-db ... Setting up libuuid-perl (0.02-3+b1) ... Setting up linux-base (2.6.32-23~bpo50+1) ... Setting up linux-image-2.6.32-bpo.5-686 (2.6.32-23~bpo50+1) ... Running depmod. Running update-initramfs. update-initramfs: Generating /boot/initrd.img-2.6.32-bpo.5-686 Running update-grub. Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /boot/vmlinuz-2.6.32-bpo.5-686 Found kernel: /boot/vmlinuz-2.6.26-2-686 Updating /boot/grub/menu.lst ... done Setting up firmware-linux-free (2.6.32-23~bpo50+1) ... Setting up firmware-ralink (0.24~bpo50+1) ... Setting up linux-image-2.6-686 (2.6.32+27~bpo50+1) ... Setting up wireless-tools (29-1.1) ... Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Writing extended state information... Done Reading task descriptions... Done Current status: 96 updates [-1]. *after installing all the updates from disc i then rebooted (remove disc) then went back to terminal debian:/home/neil# modprobe rt2870sta debian:/home/neil# iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 Ralink STA ESSID:"" Nickname:"" Mode:Auto Frequency=2.412 GHz Link Quality=10/100 Signal level:0 dBm Noise level:-143 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 debian:/home/neil# ifconfig wlan0 up SIOCSIFFLAGS: Operation not permitted debian:/home/neil# |
Wow, I wonder why it is working now. I recommend to use a graphical tool to do the rest, like wicd or gnome-network-manager.
I have to say that you did it well, many had given up with this sort of problems right at the beginning and had thought: "Linux sucks, I will stick with Windows!" Congratulations and have a lot of fun with your Debian. |
Thank you. Your help was immense and extremely appreciated.
I have gone this route for wifi config.... $ su # aptitude update # aptitude install network-manager-gnome Am having a little difficulty with it finding my router but i will keep trying! Peace. Neil. |
wicd seems to work best for me never had much luck with reliability and network-manager it kept dropping the connection.
Try apt-get install wicd wicd-client for a better setup imho! |
SOLVED:
I tried both wicd and NetworkManager and had no success. I then played around with the router settings for an eternity and decided to post a question asking about a getting a better router. This led to a post advising me that usb adapters are problematic so i decided to swap my main windows wireless pc card (idimax wireless lan Pci card EW-7128g) over to my linux pc. Then i followed the instructions for Ralink RT2500 devices http://wiki.debian.org/fr/WiFi/rt2500I Then after i installed the NetworkManager my router was immediately visable. |
All times are GMT -5. The time now is 11:33 PM. |