problem to add wireless card in yast

I have a usb wireless card on P5E3 Premium


Bus 004 Device 002: ID 0b05:1742 ASUSTek Computer, Inc. 802.11n Network Adapter

Opensuse installed automatically and loads the module


rt2870sta

at every boot. The problem is i can`t find any configuration file to configure the wireless card.

I tried to add this wireless card through Network Settings in Yast but no luck.

Can anybody tell me how to add this card with network settings?

I selected Add the Wireless, in the module name section i enter the module name rt2870sta and check the usb checkbox and when i reboot there is no card there.

Have you had a peek at the stickies ? the very informative one by lwfinger is the one you want

Andy

My wireless doesn’t work - a primer on what I should do next - openSUSE Forums

so lwfinger says:

What should you do?

(1) The first thing is to learn how to use the command-line interface in a terminal.

then

(2) Determine what device you have.

(a) If it is a USB adapter, you should enter the command ‘/usr/bin/lsusb’ in a terminal and you will see output that looks like:

so

/usr/bin/lsusb

then

(3) Once you know what your hardware is, the next step is to see what the kernel has to say about it. The command for this is ‘dmesg | less’

so

dmesg | less

lots of information there

As you go through the dmesg output,look for any mention of your hardware

then

In particular, you should look for any lines that indicate that you are missing firmware. Note that firmware, which runs on the microprocessor in the device, is distinct from a driver, which runs on the host CPU. If you have missing firmware, check online to learn how to install firmware for your device.

see how all that goes; let the forum know

acknowledgement: all the quotes are obviously from lwfinger’s howto

and it looks like you may be headed in this direction;

http://en.opensuse.org/SDB:ASUS_WL-160N_USB_Wireless_Adapter

you might like to read up on this as some homework, in possible preparation

thx guys. I found very useful those links specially this.

I am not sure about one thing…in that tutorial it says

Now that the driver has been successfully built, copy the newly created kernel driver file rt2870sta.ko which you will find in the os/linux directory of your unzipped download file to /lib/modules/{your kernel}-default/other. Create the ‘other’ directory if needed.

the problem is a i have


$ uname -r
2.6.27.19-3.2-pae

and there said “-default”. So i have to create the folder ‘other’ in the 2.6.27.19-3.2-default or 2.6.27.19-3.2-pae ?

No, use the pae-folder as it is your running kernel.

But why all this fuzz?

You already have a driver for this adapter:


modinfo **rt2870sta** |grep -E 'filename|1742'
filename:       /lib/modules/2.6.27.19-3.2-pae/kernel/drivers/staging/rt2870/rt2870sta.ko
alias:          usb:v**0B05**p**1742**d*dc*dsc*dp*ic*isc*ip*

The module will be the same you just compiled (or to be precise, it will be a version which has already been worked on, the last release from Ralink os several months old).

After plugging in the device, hwat is the output of iwconfig?

More information is clearly needed.

Yes, you are right, i have already this module but on ralink site is 2.1 version and i have 1.4

Anyway i cant find the configuration file for this module.

The output of the iwconfig is:


lo        no wireless extensions.

eth0      no wireless extensions.

ra0       RT2870 Wireless  ESSID:""  
          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

eth1      no wireless extensions.

vmnet1    no wireless extensions.

vmnet8    no wireless extensions.


so ra0 is my wireless interface.

Yes, so your device is there and seems to work.

How Do you want to configure this device?

NetworkManager or traditional method with ifup?

I want to configure with Yast because it`s more simple. :shame:

I want to configure as Adhoc mode,share the internet connection, that others can connect to me as an acces point.

An interface in Ad-Hoc mode is not an access point (aka “station mode”).

Are you sure the driver supports AP-mode? (I don’t think so).

In the README file from the latest driver 2.1 said:

Features:

This driver implements basic IEEE802.11. Infrastructure and adhoc mode with
open or shared or WPA-PSK or WPA2-PSK authentication method.
NONE, WEP, TKIP and AES encryption.

so is has support, but i`m not sure if this version that i have 1.4 has.

Again, Ad-Hoc mode is not the same as a “real” access point, you will be rather limited with Ad-Hoc (and the driver does not seem to support AP-mode).

Did you try to use the interface in managed mode to see if it works at all?
Does it find APs in range when scanning (iwlist)?

10% signal strength does not look too good.

You can try with the new driver, but put it into the “update”-Folder in the actual /lib/modules/Kernelversion, if there is none, create it.

After that run depmod as root and reload the module (with modprobe, see “man modprobe” for help)

Post the content of

/etc/udev/rules.d/70-persistent-net.rules

and

/etc/udev/rules.d/79-yast-drivers.rules

and the output of

/usr/sbin/hwinfo --wlan

You are right, i am confusing the ad-hoc with AP.

At this moment my laptop is not here to test the scan. Maybe i did not make my self clear, i want to create an ad-hoc mode session (computer to computer : my desktop and my laptop) then from the desktop i want to create a bridge connection from my wireless card and ethernet card (where the internet is comming). I did this on windows xp for a test and is working. That`s why i need to add the wireless card in yast because from there is easy to create a bridge connection.

I will install the latest driver later. I will post for the current running driver.

The content for the “/etc/udev/rules.d/70-persistent-net.rules” is


# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it,as long as you keep each rule on a single line.
# PCI device 0x11ab:0x4364 (sky2)
# PCI device 0x10ec:0x8167 (r8169)
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it,as long as you keep each rule on a single line.
# PCI device 0x11ab:0x4364 (sky2)
# PCI device 0x10ec:0x8167 (r8169)
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it,as long as you keep each rule on a single line.
# PCI device 0x11ab:0x4364 (sky2)
# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:c6:2d:e4:56", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:c6:2d:e4:55", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

and for “/etc/udev/rules.d/79-yast-drivers.rules” it isn`t only “/etc/udev/rules.d/79-yast2-drivers.rules” that is empty.

The same thing for the


/usr/sbin/hwinfo --wlan

nothing.

It seems udev did not recongnize the card at all, as there is no entry in 70-persistent-net.rules.

Post the output of


/usr/sbin/hwinfo --netcard

only the part referring to your rt2870-device, at least there should be something.

Also post the output of


tail -F /var/log/messages #as root

when plugging in the device.

(Fist run the above command, THEN plug in the device.)

Unload the module rt2870sta before.

The output from the “/usr/sbin/hwinfo --netcard”


28: PCI 200.0: 0200 Ethernet controller                         
  [Created at pci.318]
  UDI: /org/freedesktop/Hal/devices/pci_11ab_4364
  Unique ID: rBUF.lJIN+p5NzvB
  Parent ID: HnsE.lrle2jCtbd2
  SysFS ID: /devices/pci0000:00/0000:00:1c.5/0000:02:00.0
  SysFS BusID: 0000:02:00.0
  Hardware Class: network
  Model: "Marvell 88E8056 PCI-E Gigabit Ethernet Controller"
  Vendor: pci 0x11ab "Marvell Technology Group Ltd."
  Device: pci 0x4364 "88E8056 PCI-E Gigabit Ethernet Controller"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x81f8 
  Revision: 0x12
  Driver: "sky2"
  Driver Modules: "sky2"
  Device File: eth0
  Memory Range: 0xfe9fc000-0xfe9fffff (rw,non-prefetchable)
  I/O Ports: 0xc800-0xc8ff (rw)
  Memory Range: 0xfe9c0000-0xfe9dffff (ro,prefetchable,disabled)
  IRQ: 218 (1 event)
  HW Address: 00:1f:c6:2d:e4:56
  Module Alias: "pci:v000011ABd00004364sv00001043sd000081F8bc02sc00i00"
  Driver Info #0:
    Driver Status: sky2 is active
    Driver Activation Cmd: "modprobe sky2"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #16 (PCI bridge)

32: PCI 504.0: 0200 Ethernet controller
  [Created at pci.318]
  UDI: /org/freedesktop/Hal/devices/pci_10ec_8167
  Unique ID: JNkJ.K8HxcuSc1R8
  Parent ID: 6NW+.two+GgbUMg7
  SysFS ID: /devices/pci0000:00/0000:00:1e.0/0000:05:04.0
  SysFS BusID: 0000:05:04.0
  Hardware Class: network
  Model: "Realtek RTL-8110SC/8169SC Gigabit Ethernet"
  Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  Device: pci 0x8167 "RTL-8110SC/8169SC Gigabit Ethernet"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x820d 
  Revision: 0x10
  Driver: "r8169"
  Driver Modules: "r8169"
  Device File: eth1
  I/O Ports: 0xe800-0xe8ff (rw)
  Memory Range: 0xfebfec00-0xfebfecff (rw,non-prefetchable)
  Memory Range: 0xfaf00000-0xfaf1ffff (ro,prefetchable,disabled)
  IRQ: 16 (4499920 events)
  HW Address: 00:1f:c6:2d:e4:55
  Link detected: yes
  Module Alias: "pci:v000010ECd00008167sv00001043sd0000820Dbc02sc00i00"
  Driver Info #0:
    Driver Status: r8169 is active
    Driver Activation Cmd: "modprobe r8169"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #21 (PCI bridge)


thats all but i have tried


/usr/sbin/hwinfo --netcard | grep rt2870

and nothing.

Ok. First i run the command the unload the module and then load back the module. Here is the output:


Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:36:20 DarkStar kernel: ALSA /usr/src/packages/BUILD/alsa-driver/usb/usbaudio.c:1310: 2:2:1: cannot get freq at ep 0x84
Mar 26 21:47:11 DarkStar smartd[4553]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 66 to 69
Mar 26 21:47:11 DarkStar smartd[4553]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 116 to 119
Mar 26 21:48:06 DarkStar su: (to root) calin on /dev/pts/3
Mar 26 21:48:16 DarkStar kernel: usbcore: deregistering interface driver rt2870
Mar 26 21:48:16 DarkStar kernel: rtusb_disconnect: unregister usbnet usb-0000:00:1a.7-3
Mar 26 21:48:16 DarkStar kernel: rtusb_disconnect: unregister_netdev(), dev->name=ra0!
Mar 26 21:48:16 DarkStar vmnetBridge: RTM_DELLINK: name:ra0 index:3 flags:0x00001002
Mar 26 21:48:16 DarkStar vmnetBridge: Can't remove interface ra0 3 (does not exist).
Mar 26 21:48:16 DarkStar kernel:  RTUSB disconnect successfully
Mar 26 21:48:16 DarkStar kernel: <--- rtusb exit
Mar 26 21:48:17 DarkStar ifdown:     ra0       
Mar 26 21:48:17 DarkStar ifdown: Interface not available and no configuration found.
Mar 26 21:48:36 DarkStar kernel: rt2870sta: module is from the staging directory, the quality is unknown, you have been warned.
Mar 26 21:48:36 DarkStar kernel: rtusb init --->
Mar 26 21:48:36 DarkStar kernel: 
Mar 26 21:48:36 DarkStar kernel: 
Mar 26 21:48:36 DarkStar kernel: === pAd = f9436000, size = 567076 ===
Mar 26 21:48:36 DarkStar kernel: 
Mar 26 21:48:36 DarkStar kernel: <-- RTMPAllocAdapterBlock, Status=0
Mar 26 21:48:36 DarkStar kernel: usbcore: registered new interface driver rt2870
Mar 26 21:48:36 DarkStar vmnetBridge: RTM_NEWLINK: name:ra0 index:7 flags:0x00001002
Mar 26 21:48:36 DarkStar vmnetBridge: Can't remove interface ra0 7 (does not exist).
Mar 26 21:48:36 DarkStar ifup:     ra0       
Mar 26 21:48:36 DarkStar ifup:               No configuration found for ra0


Ok. First i run the command the unload the module and then load back the module. Here is the output:

Erm, you have to load the module manually?

This should not happen and udev does not recognize the device as a network device at all, so this is where your problem initially comes from.

It might be possible to tell udev explicitly what to do, but for that I need hwinfo-data and the MAC-address of the device.

Search with hwinfo, try --usb and find the line corresponding to this here:

Module Alias: "pci:v000011ABd00004364sv00001043sd000081F8bc02sc00i00"

It will of course contain an “usb:” instead of “pci:”

The MAC-address will be visible via “ifconfig -a”.

With that data one can construct suitable udev-rules for this device.

I don`t load the module manually every time (if this is what you mean), i did it now (load and unload the module manully) to see the output, the module load automatically at boot.

This is the output from the hwinfo --usb for the wireless


11: USB 00.0: 0000 Unclassified device
  [Created at usb.122]
  UDI: /org/freedesktop/Hal/devices/usb_device_b05_1742_1_0_if0
  Unique ID: HpcW.U3_jZucdYR2
  Parent ID: zPk0.cO89g+iefn1
  SysFS ID: /devices/pci0000:00/0000:00:1a.7/usb4/4-3/4-3:1.0
  SysFS BusID: 4-3:1.0
  Hardware Class: unknown
  Model: "ASUSTek 802.11 n WLAN"
  Hotplug: USB
  Vendor: usb 0x0b05 "ASUSTek Computer, Inc."
  Device: usb 0x1742 "802.11 n WLAN"
  Revision: "1.01"
  Serial ID: "1.0"
  Driver: "rt2870"
  Driver Modules: "rt2870sta"
  Speed: 480 Mbps
  Module Alias: "usb:v0B05p1742d0101dc00dsc00dp00icFFiscFFipFF"
  Driver Info #0:
    Driver Status: rt2870sta is active
    Driver Activation Cmd: "modprobe rt2870sta"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #8 (Hub)

MAC-address?

Hardware Class: unknown

(And here you can see the problem.)

maybe beacause the interface is down. I enable the interface


ifconfig ra0 up

and the ifconfig output shows the mac


ra0       Link encap:Ethernet  HWaddr 00:15:AF:72:37:52  
          inet6 addr: fe80::215:afff:fe72:3752/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:143 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:9724 (9.4 Kb)

but the same thing in whinfo --usb “Hardware Class: unknown”

So you are saying to add similar to this


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:c6:2d:e4:55", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

for the wireless, in the “/etc/udev/rules.d/70-persistent-net.rules” ?

Yes, try:


# USB device 0x0b05:0x1742 (rt2870sta)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:af:72:37:52", ATTR{type}=="1", KERNEL=="ra*", NAME="ra0"

in 70-persistent-net.rules and additionally (maybe not needed)


ENV{MODALIAS}=="usb:v0B05p1742d0101dc00dsc00dp00icFFiscFFipFF", ENV{MODALIAS}="rt2870sta"

in 79-yast-drivers.rules.

Unload the module and run


udevadm trigger

as root.