ASUS N13 USB Wireless device stopped woring on update to 2.6.32.27

Asked by TonyR

I configured my ASUS N13 USB 300N wireless card to work with Ubuntu 10.04 using the RT_3070 STA v2.3.0.2 driver using the Makes and Make install routine about 6 months ago. It worked very stabily until I did a update via update manager some 3 months ago which stopped it working. I reinstalled the driver using the procedure recommended which restored full functionality.

Recently I did another upgrade to resolve an existing provlem however this time I cannot get my wireless working again even though I have re run the installation procedure as before.

I am surprised that this card is not supported by default and do not know why the reinstallation of the driver has not worked.

Here is some information that might help your reviewers understand what is happening.

anthony@TeleLinux:~$ iwconfig
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

anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ sudo make
[sudo] password for anthony:
make -C tools
make[1]: Entering directory `/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/tools'
/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/tools/bin2h
cp -f os/linux/Makefile.6 /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux/Makefile
make -C /lib/modules/2.6.32-27-generic/build SUBDIRS=/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-27-generic'
  CC [M] /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux/../../common/rtmp_mcu.o
  LD [M] /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux/rt3070sta.o
  Building modules, stage 2.
  MODPOST 1 modules
  LD [M] /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux/rt3070sta.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-27-generic'
cp -f /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux/rt3070sta.ko /tftpboot

anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ make install
make -C /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux -f Makefile.6 install
mkdir: cannot create directory `/etc/Wireless': File exists
make[1]: Entering directory `/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux'
rm -rf /etc/Wireless/RT3070STA
rm: cannot remove `/etc/Wireless/RT3070STA/RT2870STA.dat': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux'
make: *** [install] Error 2
anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ sudo make install
make -C /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux -f Makefile.6 install
mkdir: cannot create directory `/etc/Wireless': File exists
make[1]: Entering directory `/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux'
rm -rf /etc/Wireless/RT3070STA
mkdir /etc/Wireless/RT3070STA
cp /home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/RT2870STA.dat /etc/Wireless/RT3070STA/.
install -d /lib/modules/2.6.32-27-generic/kernel/drivers/net/wireless/
install -m 644 -c rt3070sta.ko /lib/modules/2.6.32-27-generic/kernel/drivers/net/wireless/
/sbin/depmod -a 2.6.32-27-generic
make[1]: Leaving directory `/home/anthony/2009_1110_RT3070_Linux_STA_v2.1.2.0/os/linux'

anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ iwconfig
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

anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1b80:c160 Afatech
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0b05:1784 ASUSTek Computer, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ lsmod | grep -e rt2 -e rt3
rt3070sta 511759 0

anthony@TeleLinux:~/2009_1110_RT3070_Linux_STA_v2.1.2.0$ dmesg | grep -i rt2
[ 10.539290] usbcore: registered new interface driver rt2870

I have the following files in place:

network_drivers.conf:
install rt3070sta /sbin/modprobe --ignore-install rt3070sta $CMDLINE_OPTS; /bin/echo "0b05 1784" > /sys/bus/usb/drivers/rt2870/new_id

And network_drivers.rules:
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="1784", RUN+="/sbin/modprobe -qba rt3070sta"

There is no sign of life from the device when it is inserted into the USB port with no indicator light flashing.

What has caused this to fail so completely and does anyone know why this device is not supported natively by the Ubuntu kernal?

Many Thanks

Anthony

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-nettool Edit question
Assignee:
No assignee Edit question
Solved by:
TonyR
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

Please try the solution from user koanhead at the following location:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/566962/comments/8

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#2

If my advice did not help, can you please send us the output of the following command?

The command starts with the word sudo and ends with the word lsmod. Copy-paste the entire command below into a Terminal, press <Enter>. Then, when you are asked for a password, enter your personal password, then press <Enter> again.

Tip: If you have a wheel mouse or 3-button mouse, you do not need to type the commands into the Terminal. Instead, copy the commands from this web page and paste them into the terminal. To do this, move your mouse cursor over the start of the command written on the Web page. Then press the left mouse button and drag the mouse till the end of the command to highlight the whole command; then release the mouse button. Then press the middle mouse button or mouse wheel anywhere inside the Terminal. The command should now be printed in the Terminal without errors. Now press <Enter> to execute the command.~-

sudo apt-get update; sudo apt-get install hwinfo grep; sudo lshw -C network; rfkill list; sudo iwlist scanning; cat /etc/network/interfaces; cat /etc/lsb-release; lspci -nn; lsusb; sudo lshw -short; uname -a; dmesg | egrep '8180|acx|at76|ath|b43|bcm|CX|eth|ipw|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|ound|p54|prism|rtl|rt2|rt3|rt6|rt7|usb|witch|wl'; iwconfig; cat /etc/modprobe.d/* | egrep '8180|acx|at76|ath|b43|bcm|CX|eth|ipw|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|p54|prism|rtl|rt2|rt3|rt6|rt7|witch|wl'; sudo hwinfo --netcard ; cat /var/lib/NetworkManager/NetworkManager.state; sudo lsmod

Revision history for this message
TonyR (rooneyo) said :
#3
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

@TonyR: You have reopened the question, but you have not posted to indicate if the workaround at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/566962/comments/8 was successful or to provide the output of the command Mark Rijckenberg asked you to run. If you have difficulty with either that workaround or running Mark's command (or both), please post and explain the difficulty. Since there are steps that have been proposed that you have not tried, it is unlikely that you will receive further useful advice just by changing this question's status back to Open.

Revision history for this message
TonyR (rooneyo) said :
#5

Hi

Sorry for the delay getting back to the communtiy - suppose too much celebration getting it working again as I was successful.

I used the following steps to resolve.

1. I download the driver for linux http://www.ralink.com.tw/support.php?s=2
click RT8070/RT3070USB(RT307x) version 2.3.0.2.

2. Extracted the file, open a terminal, cd into it and copy a missing file.
tar -xvf DPO_RT3070_LinuxSTA_V2.3.0.2_20100412.tar.bz2
cd DPO_RT3070_LinuxSTA_V2.3.0.2_20100422
cp RT2870STA.dat RT3070STA.dat - I am uncertain about the need for this step - (see comment below)

3. I did not need to edit os/linux/usb_main_dev.c, add one line “MODULE_LICENSE(“GPL”);” as it was already in place.

4. I compiled and installed the driver without making any change to the installation reference files and you can ignore the error that related “tftpboot”
Use sudo make install

5. Add a missing symlink.
sudo mkdir /etc/Wireless/RT2870STA; sudo ln -s /etc/Wireless/RT3070STA/RT3070STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat

Now I Posted previously that this method did not work because i missed up this part. I was reading from a print-out of the instructions and interpretated it as:
sudo ln -s /etc/Wireless/RT3070STA/RT3070STA.dat
sudo ln -s /etc/Wireless/RT2870STA/RT2870STA.dat
because that is how it printer (what a nobb!)

6. I had to load the driver using modprobe not really understanding the instrctions about "remod rt2800usb" or related kernel modules.
i just run sudo modprobe rt3070sta

7. I also edited the file “/etc/modprobe.d/blacklist.conf” to add “blacklist rt2800usb” to the bottom line

 I rebooted I was able to connect however brefore this I saw the led flashing vigoriously after step 6.

I restored an image of the machine before the live update to look at the etc/Wireless directory of the previous configuration that worked and noticed that I did not have RT3070STA.dat loaded. This makes me think that instead of creating the symlink in step 5 above i previously just renamed the RT3070.STA.dat file in the RT3707STA directory as RT2870STA.dat and did not bother with the symlink. i remember renaming something but stupidly did not take proper notes at teh time. It was somethink I just tried out of desperation late one evening not expecting it to work.

I am not sure what you need to do to prevent a Kernal upgrade from breaking this configuration so I will have to remain on this Kernal version indefinately. Does anyone know why live update so frequently breaks Linux configurations as I have encountered this many times before? I would have thought that a core design pre-requisite of live update is to update but most importantly "preserve" existing core functionality, which it appears unable to do.

I also do not have an handle on the instruction to copy the dat files in step 2 above. The extracted driver has both RT3707STA & 2870 dat files and they seem identicle in GEDIT. Why do you nedd to copy one over the other and later creat the symlinks is still unclear to me. If one driver is pretending to bve another why are they the same and why not just remane one?

I hoped someone with better Linux knowledge would have definitively worked out and posted what is stopping this working with a stright Make Insatall and I also wonder why the Linux kernal does not natively support such a common device as the ASUS N13, which can be made to work in minutes in Windows.

I feel after so many hours of working on this that I still do not fully understand why it did not work in the 1st place and why what i did worked comparred to my previous lattempt with version 2.1.2.0. Note that although i am now running with v2.3.0.2 I had it working very well with 10.04 for 6 months with excellent performance using version 2.1.2.0 of the driver.

Revision history for this message
koanhead (googoleyes) said :
#6

Hi Tony, my driver has been working just fine since I went through the steps that others have quoted above, even after several kernel upgrades. Unfortunately I can't say the same for the device itself, which I have since had to retire due to its spotty performance. This wasn't a driver issue in my case, as I tested it with several different kernels, and under Windows XP and 7. It was just a bad unit.
Also, I've found that the device works "out of the box" in newer kernels. Hurray!

In general, there are two ways to keep your home-brewed kernel modules from being clobbered by kernel updates (not counting having them adopted by the kernel maintainers ;^):
The "right" way is to use DKMS, for Dynamic Kernel Module Support. I tried this with the driver code I had, but it didn't work. So I had to go the other, not-quite-so "right" way:
I added a set of udev rules (details are in the forum post by user chili555 which is linked in the comment linked above. This forced the driver to work with the actual USB ID of the device.

This last is sometimes necessary because vendors can't be trusted to use the exact same chipset in devices with the same model number. Usually this doesn't matter, but sometimes (as in this case) it breaks things.

Personally, I lay this particular problem at ASUS' door. Every ASUS device I have ever owned has been somewhat shoddy and ASUS' support for Linux amounts to false advertising. In this particular case the code they provided was a stale, unbuildable version of another company's functioning driver on a CD. That's not how you do Linux support, and they know it; in fact they admitted to me in an email that they *don't* support modern kernels (as of September 15 2009 this was anything newer than 2.6.28-11).

I hope this is useful to you.

Revision history for this message
TonyR (rooneyo) said :
#7

Hi

I noticed that I had much better performance with the older driver 2.1.2.0 as the newer driver would hang about every 24 - 36 hours. I would lose network connectivity to my Myth box and log in and see the authentication dialog box open. Enen if I put the correct password in it would completely loop endlessly reasking for the password. if I stopped and restarted networking it immediately reconnected to the network and work for another few days before the connectivity was lost again with the same authrntication dialog box loop.

With the older driver it seems to stay connected for on average 9 to 12 days. In the end i dragged a very long cable under carpet to the myth box as i want it on all the time.

I agree ASUS support is very poor where recently I asked for a Win7 driver for my 4 year old 3000U ASUS TV tuner and they said it was too old to have a Win7 driver and I could try a Vista driver without saying if it would work or not.

Interesting concept of customer service for someone who owns a ASUS laptop, N15 router and a N13 USB adapter?

I had a PCI internal Netgear Wireless card a few years ago - WG311 v3 which was also supposed to be supported by Linux however the Netgear driver was also not very good so ASUS are not the only vendor to falsely claim Linux support without bothering to test and provide accurate advice.