Need help installing USB Wifi card in Ubuntu

Asked by Chakib

I am using Ubuntu 8.4 on a BenQ Joybook S41. I recently purchased an alfa awus036h wireless card to use with Aircrack-ng. The card is supposed to be plug and play; however, when I connect it to my USB port nothing happens.

When I run iwconfig in the bash (with the USB card connected), I get :

**********************************************************
lo no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"ChakibMain" Nickname:""
          Mode:Managed Frequency:2.437 GHz Access Point: 00:1C:DF:08:57:5D
          Bit Rate=54 Mb/s Tx-Power=27 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2346 B
          Power Management:off
          Link Quality=100/100 Signal level=-27 dBm Noise level=-95 dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0

eth0 no wireless extensions.
******************************************************************************

As you can see, Ubuntu is only detecting the internal wireless card which is also called "wlan0. How can I make Ubuntu recognize and use the alfa awus036h instead of the internal wireless card?

I am new to Linux, so if you can give me detailed instructions I would really appreciate it.

Thanks.

Chakib

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Chakib
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Chakib (chakib007) said :
#1

More Information.. The card being detected is the Pro/Wireless 4965 AGN... But again, no signs of the Alpha awus036h.

**************************************************************
 $ sudo lshw -C network
  *-network
       description: Wireless interface
       product: PRO/Wireless 4965 AG or AGN Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wmaster0
       version: 61
       serial: 00:13:e8:62:fe:41
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list logical ethernet physical wireless
       configuration: broadcast=yes driver=iwl4965 ip=192.168.2.2 latency=0 module=iwl4965 multicast=yes wireless=IEEE 802.11g
  *-network
       description: Ethernet interface
       product: 88E8055 PCI-E Gigabit Ethernet Controller
       vendor: Marvell Technology Group Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: eth0
       version: 12
       serial: 00:1b:24:a4:7a:bd
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sky2 driverversion=1.20 firmware=N/A latency=0 link=no module=sky2 multicast=yes port=twisted pair

***************************************************************
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:24:a4:7a:bd
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:17

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1404 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1404 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:70200 (68.5 KB) TX bytes:70200 (68.5 KB)

wlan0 Link encap:Ethernet HWaddr 00:13:e8:62:fe:41
          inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
          inet6 addr: fe80::213:e8ff:fe62:fe41/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:146625 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26863 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:28362506 (27.0 MB) TX bytes:4191556 (3.9 MB)

wmaster0 Link encap:UNSPEC HWaddr 00-13-E8-62-FE-41-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
******************************************

If you need more information, please let me know.

Thanks!

Revision history for this message
Chris (cmavr8) said :
#2
Revision history for this message
Chakib (chakib007) said :
#3

I tried and it did not work. If you notice from the information I put in there, the internal card is already detected as wlan0.
I have Ubuntu 8.4, which should already have all the drivers needed.

With my limited knowledge of Linux I do not know what else to do....

Revision history for this message
Chris (cmavr8) said :
#4

Sorry, I didn't study your text much..
I managed to make mine work though.. (cable was broken. Tried a normal usb cable and it works)

So, your internal card is called wlan0 too?
Can you disable it? (wireless kill switch if on a laptop..)

Revision history for this message
Chakib (chakib007) said :
#5

Thanks for the suggestion.

OK, I killed the switch on the laptop and rebooted.. It still detects the internal card as wlan0, the only difference is that it did not connect.

the iwconfig log with the wireless swith off:
**********************************************************
$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"" Nickname:""
          Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
          Tx-Power=27 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2346 B
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0
**********************************************************
Also, I ran "lsusb" ot see what usb devices Linux is detecting. Below is what I get. I am assuming the 8187 Realtek Semiconductor Corp. is the USB wireless card..
*********************************************************************

chakib@Ubuntu007:~$ lsusb
Bus 007 Device 003: ID 0bda:8187 Realtek Semiconductor Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 002: ID 064e:a111 Suyin Corp.
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 045e:00e1 Microsoft Corp. Wireless Laser Mouse 6000 Reciever
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
********************************************************
I do not really know how to interpret this..

Revision history for this message
Chris (cmavr8) said :
#6

Well, I suspect this wlan0 IS the usb adapter. Try ifconfig and check the MAC address. See which mac address it matches.

Revision history for this message
Chakib (chakib007) said :
#7

you are correct, Bus 007 Device 003: ID 0bda:8187 Realtek Semiconductor Corp. is the USB card... Unfortunately, running lsusb seems to be the only place where I see it. if I run iwconfig I get the same results as the first ones.. The wlan0 card it sees is the Pro/Wireless 4965 AGN, not the alfa awus036h.

The big question is... How do I get to the point where I run "iwconfig" and I see the alfa awus036h?

Revision history for this message
Chris (cmavr8) said :
#8

How can you be so sure since you have killed laptop's radio?
Did you try ifconfig?

Anyway, you could unload the 4965 driver.. (I don't know its name, but you'll use "sudo modprobe -r ....") but that's not the perfect way to do it..

Revision history for this message
Chakib (chakib007) said :
#9

I am sure because of the Mac adress..

Let me recap the problem to see if someone can help.

I have two wireless cards, one internal (Pro/Wireless 4965 AGNPro/Wireless 4965 AGN) which is currently being used just fine. Ubuntu detects it as wlan0.
The second card is a USB card c). Ubuntu already has all the drivers for it; however, when I run iwconfig, my computer does not detect the USB card.

I need to use the alfa awus036h because my Pro/Wireless 4965 AGNPro/Wireless 4965 AGN will not inject packages with aircrack.

Can someone please help me? Details of hardware etc are above.

Thanks....

Revision history for this message
Chakib (chakib007) said :
#10

I followed These instructions:
********************************************************
wget http://dl.aircrack-ng.org/drivers/rtl8187_linux_26.1010.zip
unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/
wget http://patches.aircrack-ng.org/rtl8187_2.6.24v3.patch
tar xzf drv.tar.gz
tar xzf stack.tar.gz
patch -Np1 -i rtl8187_2.6.24v3.patch
make
***************************************************

Everything goes well until this point.. When I type "make install", I get the below error:

*********************************************************
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$ make install
install -d /lib/modules/2.6.24-16-generic/kernel/drivers/net/wireless/rtl_ieee80211
install: cannot change permissions of `/lib/modules/2.6.24-16-generic/kernel/drivers/net/wireless/rtl_ieee80211': No such file or directory
make: *** [install] Error 1
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$
*******************************************

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#11

Please try

sudo make install

give your user password when requested, you don't see nothing when you type it, then press enter.

Revision history for this message
Chakib (chakib007) said :
#12

Thanks, it installed...

I rebooted, typed iwconfig, and again I only see the internal card..

*****************************************************
chakib@Ubuntu007:~$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"ChakibMain" Nickname:""
          Mode:Managed Frequency:2.437 GHz Access Point: 00:1C:DF:08:57:5D
          Bit Rate=54 Mb/s Tx-Power=27 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2346 B
          Power Management:off
          Link Quality=100/100 Signal level=-34 dBm Noise level=-96 dBm
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0

chakib@Ubuntu007:~$
*************************************************

What do I need to do to see and use the USB WIFI card?

Revision history for this message
Chris (cmavr8) said :
#13

Did you check for the MAC address AGAIN using ifconfig, after the installation?

You do have the kill switch on, don't you? (Try booting with kill sw on, and USB unplugged. Is iwconfig empty? If not you'll have to unload the 4965 driver, ASK! Now plug in the USB)

Revision history for this message
Chakib (chakib007) said :
#14

By the way.. before I proceed. I appreciate all your help.. People like you make this community great!!

OK, back to the card... you are absolutely right.. I turned off the internal wireless card throught the laptop switch and then rebooted.

Then ran iwconfig:
*****************************************
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$
*****************************************

Then, I connected the wireless card to my usb port and ran "lsusb".. the realtek shows there:
******************************************
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$ lsusb
Bus 007 Device 003: ID 0bda:8187 Realtek Semiconductor Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 002: ID 064e:a111 Suyin Corp.
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 045e:00e1 Microsoft Corp. Wireless Laser Mouse 6000 Reciever
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$
********************************************

Then I ran ifconfig: but the card does not show..

***********************************************
eth0 Link encap:Ethernet HWaddr 00:1b:24:a4:7a:bd
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:17

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1342 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1342 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:67100 (65.5 KB) TX bytes:67100 (65.5 KB)
****************************************

I tried the comand "sudo wlan0up", but it did not work.
I also tried "wlan0up", but no luck either.

************************************
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$ sudo wlan0up
sudo: wlan0up: command not found
chakib@Ubuntu007:~/rtl8187_linux_26.1010.0622.2006$
***********************************

I should be able to start the card with "wlan0up" (according to the installation instructions).. but I get the above error.

I know the card is now installed... (and I appreciate you helping so much with this).... what am I missing to start the card?

Revision history for this message
Chris (cmavr8) said :
#15

Wait!
At this very point, instead of running
#wlan0up
could you run
#sh wlan0up
or
#sh wlan0up.sh
or
#./wlan0up
?

("#" before a command means run it with sudo. "%" means run it as a normal user)

Revision history for this message
Chakib (chakib007) said :
#16

Its working!! YOU ARE THE MAN!

Thanks a lot... I rebooted and it started working as wlan1.

Thanks a bunch!

Chakib

Revision history for this message
Chris (cmavr8) said :
#17

No problem!
See you..