LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-18-2009, 03:03 PM   #1
FastFeet
Member
 
Registered: Oct 2003
Posts: 45

Rep: Reputation: 15
USB WiFi / Ubuntu 9.04 / Connects to non-secure networks but not WEP/WPA


Hello folks, I have been working on troubleshooting this for days without success. Time to post my issue in these forums. I am hopeful you can help.

I am trying to get my D-Link DWA-130 (Revision: C) USB WiFi adapter to connect to a secure network. I first tried to get the DWA-130 to work with Ubuntu 9.04 using the Linux drivers from D-Links website: http://tinyurl.com/r6wmb6 . Here is what I got when I tried following the Linux Driver instructions (Method 1) found in the included readme.txt file.

Code:
:-$ make
[worked without issue]

Code:
:-$ sudo make install

make[1]: Entering directory `/usr/src/rtl8192u_linux_2.6.0006.1031.2008/ieee80211'
make -C /lib/modules/2.6.28-11-generic/build M= CC=gcc modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
make[3]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'.  Stop.
make[2]: *** [prepare0] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.28-11-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/rtl8192u_linux_2.6.0006.1031.2008/ieee80211'
make: *** [install] Error 2
I do have the Kernel Headers installed and using Apt-get I do have the kernel sources, although the Kernel apt-get provided where put in the /usr/src/ directory but are still compressed (linux-source-2.6.28.tar.bz2).

So after using Google and getting very little information about this, I gave up to proceeded with using ndiswrapper.

So based on this website this card should work just fine with ndiswrapper: http://tinyurl.com/qmy7c4 . I've tried using the ndisgtk GUI tools and the good old command line to install the XP drivers found on the DLink website for this card. Both giving the same results. I am able to connect just fine to non-secure networks, but not able to connect to WEP or WPA networks. I am desperate to getting this working.

Here is some information that you will likely need to in order to help me trouble shoot this issue. Thanks BTW!

I am using: Mythbuntu 9.04, and a D-Link DWA-130 USB WiFi Adaptor.

Code:
:~$ uname -mr
2.6.28-11-generic i686
Code:
:~$  ndiswrapper -l
net8192u : driver installed
    device (2001:3301) present
Code:
:~$  lsusb
Bus 004 Device 003: ID 2001:3301 D-Link Corp. [hex]
Code:
:-$ lsusb -v
Bus 004 Device 003: ID 2001:3301 D-Link Corp. [hex]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x2001 D-Link Corp. [hex]
  idProduct          0x3301
  bcdDevice            1.00
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           95
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints          11
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x08  EP 8 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x89  EP 9 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0a  EP 10 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0c  EP 12 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0d  EP 13 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
can't get device qualifier: Operation not permitted
can't get debug descriptor: Operation not permitted
cannot read device status, Operation not permitted (1)
Code:
:~$ iwconfig wlan0
wlan0     IEEE 802.11g  ESSID:off/any  
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated  
          Bit Rate:54 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:off   Fragment thr:off
          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
Code:
:~$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:22:b0:73:fc:13  
          inet6 addr: fe80::222:b0ff:fe73:fc13/64 Scope:Link
          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)
Code:
:-$  dmesg
See The Output Here:  http://pastebin.ca/1425880
(output is too long to post here)
Code:
~$ sudo lshw -C network

  *-network              
       description: Ethernet interface
       product: NC100 Network Everywhere Fast Ethernet 10/100
       vendor: ADMtek
       physical id: e
       bus info: pci@0000:00:0e.0
       logical name: eth0
       version: 11
       serial: 00:04:5a:8e:e6:eb
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical
       configuration: broadcast=yes driver=tulip driverversion=1.1.15 ip=192.168.10.187 latency=32 maxlatency=128 mingnt=64 module=tulip multicast=yes
  *-network:0 DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: pan0
       serial: 12:94:15:80:5d:2a
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes
  *-network:1
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: 00:22:b0:73:fc:13
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=ndiswrapper+net8192u driverversion=1.53+Realtek Semiconductor Corp. link=no multicast=yes wireless=IEEE 802.11g
Code:
:~$ iwlist scan
lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

pan0      Interface doesn't support scanning.

wlan0     Scan completed :
          Cell 01 - Address: 00:13:10:9F:D2:5C
                    ESSID:"LinuxNet"
                    Protocol:IEEE 802.11g
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality:71/100  Signal level:-50 dBm  Noise level:-96 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
                              12 Mb/s; 48 Mb/s
                    Extra:bcn_int=100
                    Extra:atim=0
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
Any help would be greatly appreciated!

Thanks,

FF

Last edited by FastFeet; 05-18-2009 at 03:35 PM.
 
Old 05-18-2009, 07:27 PM   #2
FastFeet
Member
 
Registered: Oct 2003
Posts: 45

Original Poster
Rep: Reputation: 15
WORKING! Almost.

Okay, I think I got it. I decided I would re-read the readme.txt file for the Linux Driver and try method #2. BINGO! Able to connect to WPA2 and browsing just fine.

I have not rebooted yet to see if I will have to run the wlan0up script again. I hope not. I would like it to automatically connect upon boot-up.

Here is the Install Section of the readme.txt

Quote:
===============================================================================
Installation
===============================================================================
<<Method 1>>
Runing the scripts accomplish all operations including building up modules
from the source code, installing driver to the kernel and starting up the nic.
1. Build up the drivers from the source code
make

2. Install the driver to the kernel
make install
reboot

3. bring up wlan if nic is not brought up by GUI, such as NetworkManager
ifconfig wlan0 up
Note: use ifconfig to check whether wlan0 is brought up and use iwconfig to check your wlan interface name,
since it may change wlan0 to wlan1,etc.

<<Method 2>>
Or only load the driver module to kernel and start up nic.
1. Build up the drivers from the source code
make
2. Copy firmware to /lib/firmware/ or /lib/firmware/(KERNEL_VERSION)/
cp -rf firmware/RTL8192U /lib/firmware
or
cp -rf firmware/RTL8192U /lib/firmware/(KERNEL_VERSION)
Note: This depends on whether (KERNEL_VERSION) subdirectory exists under /lib/firmware

3. Load driver module to kernel and start up nic.
./wlan0up
Note: when "insmod: error inserting 'xxxx.ko': -1 File exists" comes out
after run ./wlan0up, please run ./wlan0down first, then it should
be ok..
Note: If you see the message of "unkown symbol" during ./wlan0up, it
is suggested to build driver by <<Method 1>>
.


Okay the Ubuntu 9.04 machine just rebooted and no, my WiFi card did not re-initiate upon bootup. I had to open a terminal, cd to the uncompressed driver folder location (/usr/src/rtl8192u_linux_2.6.0006.1031.2008s/) and and run the wlan0up script provided using sudo in order to get the card working. Once the script ran then Network Manager was able to use it, and prompted me for my key ring password. Upon entering my key ring password, I was able to connect again successfully!

My question is now....

Is it possible to run the scripts automatically upon booting Ubuntu 9.04 up? If so could someone advise me how to do this?


Here is the contents of the included wlan0up script:

http://pastebin.ca/1426971

Here is the contents of the included wlan0down script:

http://pastebin.ca/1426976


Thanks in Advance!

FF
 
Old 05-18-2009, 08:32 PM   #3
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
You may be able to include this in either your login script or place a link to your script in /etc/init.d/
 
Old 05-20-2009, 11:06 PM   #4
FastFeet
Member
 
Registered: Oct 2003
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by irishbitte View Post
You may be able to include this in either your login script or place a link to your script in /etc/init.d/
Understood...

I tried the etc/init.d and rc.d# approach but it seems to be too early to run these scripts.

Is there away I can run the "wlan0up" script as root once my user account logs in?



Mythbuntu 9.04
 
Old 05-21-2009, 08:54 PM   #5
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
hmmm. not sure you can run it as root, without delegating auth to yourself. might be easier to give your account control of wlan0?
 
Old 05-21-2009, 10:19 PM   #6
df508462
LQ Newbie
 
Registered: Mar 2009
Distribution: Slackware
Posts: 7

Rep: Reputation: 1
Does this look like it would help to add your wlan0up script to init.d "late enough" in your boot?

https://help.ubuntu.com/community/RcLocalHowto



--Dennis
 
Old 05-22-2009, 04:57 AM   #7
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
If you follow the previous post advice, please make sure to set permissions on that file! Would be important that it's not world writable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu 8.10 cannot connect to WPA WiFi network Wiseloki Linux - Wireless Networking 2 12-29-2009 04:31 AM
Retrieve a Wep key (wifi) in Ubuntu Gutsy Fulano X Linux - Newbie 10 02-04-2008 04:38 PM
Can Aironet350 wifi do WEP/WPA? ssalman Linux - Wireless Networking 10 09-11-2007 02:09 AM
is there *any* wifi/usb which works with Ubuntu and WPA? vees Ubuntu 2 08-10-2007 09:17 PM
USB Wifi with WPA out the box, possible? fregster Debian 0 11-27-2006 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration