Did this help you?

Yes
40%
4
No
20%
2
Sorta
30%
3
Too hard to understand!
10%
1
 
Total votes: 10
wiinick
Posts: 7
Joined: Sat Jun 22, 2013 8:42 am

Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Jun 22, 2013 9:40 am

I recently bought a Ralink USB wifi dongle wireless n 150Mbps from ebay and plugged it into my pi. It didnt work.
For 2 weeks I tried to fix it, and I FINALLY fixed it. Now I'm putting this here so someone else doesnt have to go through this torture.
Turns out Ralink wifi adapters have 2 dev teams. The rt2x00 team, and the original Ralink rt2800sta team. rt2x00 doesnt work at all.

EDIT:
Try this guys if nothing else works. Worth a try. I've found that sudo apt-get update breaks the wifi.
http://www.raspberrypi.org/phpBB3/viewt ... 70#p395758

EDIT2:
Thanks martinlbb
sudo rpi-update fixes it. Nothing else is needed. Ralink Support is now available.


Before you begin, read through this, as it provides some useful information. Or not.
http://www.raspberrypi.org/phpBB3/viewt ... 28&t=15465
I have provided the file NEEDED to get it working. Also make sure to type sudo before every command you may think needs root privileges. "cd or ls" dont need sudo. "sudo make, sudo make install, sudo nano" are good examples.

Version used 3.6.11+
To find yours run /uname -r

Steps:
1- Do sudo dmesg right after plugging in your usb wifi dongle
2- Look for this

Code: Select all

[  285.494113] phy1 -> rt2800_init_eeprom: Error - Invalid RF chipset 0x3070 detected.
[  285.494143] phy1 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
If it exists, then you're right where I was.
3- Run ifconfig, if you see ra0 or wlan0 then you are already doing better than when I started.
4- NOW if you dont see ra0 or wlan0 and in dmesg, you still see the error, try this,

Code: Select all

sudo nano /etc/modprobe.d/blacklist.conf
(Save and Exit, Cntrl O, Cntrl X) Now I would suggest this 1st

Code: Select all

cd /etc/modprobe.d/
and then running "ls" to see what the blacklist file's name is, something like raspi-blacklist.conf. So when you find the name, run

Code: Select all

sudo nano raspi-blacklist.conf
5- Now we need to blacklist the old Drivers. Insert one of these at a time until dmesg shows ralink exists. Remember to unplug and re-plug the usb to get an updated dmesg. I've found that the rt2x00usb is the culprit here. I have both just to be sure.

Code: Select all

blacklist rt2800usb
blacklist rt2x00usb
If that still fails, do not worry, continue on.
6- Now in the download, go to WifiFix, and

Code: Select all

tar xjfv 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
cd 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
,
Read the readme, especially

Code: Select all

In Makefile
	 set the "MODE = STA" in Makefile and chose the TARGET to Linux by set "TARGET = LINUX"
Build for being controlled by NetworkManager or wpa_supplicant wext functions
	   Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
Run

Code: Select all

make
sudo make install
I have an already unzipped and "maked" folder in there if anyone was having issues. Although, im pretty sure /make is very important to do on your own system. You might need to install your own gcc compiler source or something or other to get it running. If it ran without errors, then skip this little bit of code.

Code: Select all

cd /usr/src
sudo wget https://github.com/raspberrypi/linux/archive/rpi-3.6.y.tar.gz
sudo tar xvfz rpi-3.6.y.tar.gz
sudo ln -s /usr/src/linux-rpi-3.6.y/ /lib/modules/3.6.11+/build
cd /lib/modules/3.6.11+/build
sudo make mrproper
sudo gzip -dc /proc/config.gz > .config
sudo su
gzip -dc /proc/config.gz > .config
make modules_prepare
wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
exit
7-After that works now, for the love of god, read the readme file. It will tell you

Code: Select all

sudo cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat
Then it will say this, VERY IMPORTANT. Pay attention to SSID and Encryption type. I have a WEP connection, so I typed WEP. Make sure to modify this file in its copied location in /etc/Wireless/RT2870STA/

Code: Select all

# Use "nano RT2870STA.dat" to modify settings according to your need.
# 
# 1.) set NetworkType to "Adhoc" for using Adhoc-mode, otherwise using Infrastructure
# 2.) set Channel to "0" for auto-select on Infrastructure mode
# 3.) set SSID for connecting to your Accss-point.
# 4.) AuthMode can be "WEPAUTO", "OPEN", "SHARED", "WPAPSK", "WPA2PSK", "WPANONE"
# 5.) EncrypType can be "NONE", "WEP", "TKIP", "AES"
# for more information refer to the Readme file.
# 
#The word of "Default" must not be removed
Default
CountryRegion=5
CountryRegionABand=7
CountryCode=
SSID=Dennis2860AP
NetworkType=Infra
WirelessMode=9
Channel=0
BeaconPeriod=100
TxPower=100
BGProtection=0
TxPreamble=0
RTSThreshold=2347
FragThreshold=2346
TxBurst=1
WmmCapable=0
AckPolicy=0;0;0;0
AuthMode=OPEN
EncrypType=NONE
WPAPSK=
DefaultKeyID=1
Key1Type=0
Key1Str=
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
PSMode=CAM
FastRoaming=0
RoamThreshold=70
HT_RDG=1
HT_EXTCHA=0
HT_OpMode=1
HT_MpduDensity=4
HT_BW=1
HT_AutoBA=1
HT_BADecline=0
HT_AMSDU=0
HT_BAWinSize=64
HT_GI=1
HT_MCS=33
HT_MIMOPSMode=3
EthConvertMode=
EthCloneMac=
IEEE80211H=0
TGnWifiTest=0
WirelessEvent=0
MeshId=MESH
MeshAutoLink=1
MeshAuthMode=OPEN
MeshEncrypType=NONE
MeshWPAKEY=
MeshDefaultkey=1
MeshWEPKEY=
CarrierDetect=0
8- Now to connect. We will be using some handy software for this. Run

Code: Select all

sudo apt-get install wicd wicd-curses
NOW REBOOT!
wicd is the brains behind wicd-curses. wicd-curses actually allows you to configure your wifi.
9- Run

Code: Select all

sudo wicd-curses
hit -> key and enable encryption if you use WEP or WPA. Also insert your passkey.
10- Hit Shift P and set your wifi name to ra0, or wlan0 depending on your ifconfig, which should be working. Make any other changes you see fit while you're in there, remember it has multiple tabs in this menu.
11- Exit out and now find your SSID aka wifi name, and hit shift C. It may take a tad but you should see activity at the bottom. And you should be connected.

This should have fixed your issue. If not, then something went wrong, but you have the files that will fix it.

Link to file
https://dl.dropboxusercontent.com/u/175 ... 0Fixer.zip
Website to DL drivers just in case top link is broke - http://www.mediatek.com/_en/07_downloads/01_windows.php
For safety sake, i've included the actual file name if the DL doesnt work
Wifi Driver "2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO" (When downloaded it should have .bz2 at the end.)

Picture of the adapter.
Image

If all else fails, try a USB powered hub. The pi only puts out 140mA to its usb ports. Which is just enough to power this wifi dongle. The initial surge to get it going causes the pi to restart, so its good to just leave it in.
Last edited by wiinick on Sat Jan 11, 2014 6:30 am, edited 4 times in total.

dconroy
Posts: 18
Joined: Sat Mar 30, 2013 3:37 am
Contact: Website

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Mon Jul 08, 2013 6:08 pm

Thanks for posting this. After 10 hours I finally got it working using your instructions.

Thank you for sharing.

Dave

ophirf15
Posts: 3
Joined: Thu Jul 11, 2013 10:12 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Thu Jul 11, 2013 10:16 am

Hi, thank you for the great walkthrough, this is the first one that worked all the way with no errors, BUT in wicd-curses i do not see any network + the led light does not go on on the usb dongle + i do not see a wlan0 in ifconfig, but i do see that there are no errors in dmesg about the dongle (which there were before)
could you assist me with making this work?

Thanks alot

EDIT:
i read another thread: http://forums.bodhilinux.com/index.php? ... er-solved/
and did (quote from thread) :
cd /2011_ (after2011 _ continue with TAB and the foldername will be filled in)
sudo su
make
make install
modprobe rt5370sta
exit"
REBOOT
and it works using wicd-curses
thanks a lot again because without this tutorial the other thread instructions did not work for me.

victagayun
Posts: 127
Joined: Sun Apr 15, 2012 4:01 pm
Contact: Website

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Jul 13, 2013 3:25 pm

Hello,

When I compile it (make), got these errors:

Code: Select all

make: *** /lib/modules/3.6.11+/build: No such file or directory.  Stop.
make: *** [LINUX] Error 2
then I make "build" folder then compile again, now I have these errors:

Code: Select all

make[1]: Entering directory `/lib/modules/3.6.11+/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/lib/modules/3.6.11+/build'
make: *** [LINUX] Error 2
Got any ideas why I have those errors?

Victor

wiinick
Posts: 7
Joined: Sat Jun 22, 2013 8:42 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Jul 13, 2013 11:53 pm

victagayun wrote:Hello,

When I compile it (make), got these errors:

Code: Select all

make: *** /lib/modules/3.6.11+/build: No such file or directory.  Stop.
make: *** [LINUX] Error 2
then I make "build" folder then compile again, now I have these errors:

Code: Select all

make[1]: Entering directory `/lib/modules/3.6.11+/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/lib/modules/3.6.11+/build'
make: *** [LINUX] Error 2
Got any ideas why I have those errors?

Victor
By far the hardest thing is this exact problem. Its the compiler. This took me ages to get working. Remember the Gcc compiler bit I put up in the tutorial. Your msg doesn't specify if you downloaded and install the compiler. If so, simply google this message and follow the trail of breadcrumbs to the solution. I highly suggest that if you do come across this solution, you let me know and someone else can read this tutorial and have that fixed up in no time.

wiinick
Posts: 7
Joined: Sat Jun 22, 2013 8:42 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sun Jul 14, 2013 12:00 am

ophirf15 wrote:Hi, thank you for the great walkthrough, this is the first one that worked all the way with no errors, BUT in wicd-curses i do not see any network + the led light does not go on on the usb dongle + i do not see a wlan0 in ifconfig, but i do see that there are no errors in dmesg about the dongle (which there were before)
could you assist me with making this work?

Thanks alot

EDIT:
i read another thread: http://forums.bodhilinux.com/index.php? ... er-solved/
and did (quote from thread) :
cd /2011_ (after2011 _ continue with TAB and the foldername will be filled in)
sudo su
make
make install
modprobe rt5370sta
exit"
REBOOT
and it works using wicd-curses
thanks a lot again because without this tutorial the other thread instructions did not work for me.
Im happy this worked for you. My goal for this post was to help people out and fix the problem. But for some, people have had issues, BUT this thread sent them in the right direction in solving the issue. And that's good enough. Did you use the same adapter as me? A picture is listed in the bottom of the thread. The rt5370sta does not work with the rt2800/3070 wifi. Sorry for the late response, I thought I would be emailed when people posted a question.

ophirf15
Posts: 3
Joined: Thu Jul 11, 2013 10:12 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sun Jul 14, 2013 5:38 pm

Im happy this worked for you. My goal for this post was to help people out and fix the problem. But for some, people have had issues, BUT this thread sent them in the right direction in solving the issue. And that's good enough. Did you use the same adapter as me? A picture is listed in the bottom of the thread. The rt5370sta does not work with the rt2800/3070 wifi. Sorry for the late response, I thought I would be emailed when people posted a question.
yes, sort of.. i have the same chip-set in my adapter but it looks different (ill post a pic), when i was doing dmesg it recognized the adapter as rt2870/rt3070 which raspibian had all the modules for...but i guess they didn't work correctly so following your guide helped me get to a point that raspibian would recognize my commands because it didn't (lol don't ask how.. I'm a noob when it comes to using special commands on Linux) after i did all that you wrote here i went back to the other thread and it all worked great! now i need to use wicd-curses and its all nice. :D but i was wondering... is there a way to add the device to the wifi program which came with raspibian? (i dont have the name cause im away from my pi) i would prefer using that instead of going to terminal and typing the command each time i turn the pi on
wifi adapter .jpg
pic from ebay of my adapter.
wifi adapter .jpg (15.29 KiB) Viewed 26169 times

wiinick
Posts: 7
Joined: Sat Jun 22, 2013 8:42 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Mon Jul 15, 2013 10:26 am

ophirf15 wrote:
Im happy this worked for you. My goal for this post was to help people out and fix the problem. But for some, people have had issues, BUT this thread sent them in the right direction in solving the issue. And that's good enough. Did you use the same adapter as me? A picture is listed in the bottom of the thread. The rt5370sta does not work with the rt2800/3070 wifi. Sorry for the late response, I thought I would be emailed when people posted a question.
yes, sort of.. i have the same chip-set in my adapter but it looks different (ill post a pic), when i was doing dmesg it recognized the adapter as rt2870/rt3070 which raspibian had all the modules for...but i guess they didn't work correctly so following your guide helped me get to a point that raspibian would recognize my commands because it didn't (lol don't ask how.. I'm a noob when it comes to using special commands on Linux) after i did all that you wrote here i went back to the other thread and it all worked great! now i need to use wicd-curses and its all nice. :D but i was wondering... is there a way to add the device to the wifi program which came with raspibian? (i dont have the name cause im away from my pi) i would prefer using that instead of going to terminal and typing the command each time i turn the pi on
wifi adapter .jpg
Since wicd is the daemon of wicd-curses, (It runs in the background) you dont need to use wicd-curses each time you boot. It automatically connects. BUT if you want to use the default program you have to navigate to /etc/network/interfaces.conf or something or other. Use Sudo nano /etc..... for this. In there you should add the appropriate instructions, like auto ra0 and dhcp bla bah. I personally dont know if this will work. It should though. Google it. It should resemble this if you plan on using DHCP which assigns the IP address to your pi automatically.

# The primary network interface
auto ra0
iface ra0 inet dhcp

Keep in mind that if your wifi isnt automatically connecting, check your wicd-curses settings to make sure that your settings are correct. I think ethernet takes priority by default.

Pl4za
Posts: 1
Joined: Tue Jul 23, 2013 2:11 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Tue Jul 23, 2013 2:22 pm

Thanks to you i finally solved this problem, thanks ;)

Now i can see the "ra0" device, and find my wi-fi network. Just having problems connecting in the authentication fase.. my network is WPA2-AES..

Will try to solve this later, thanks ;)

wiinick
Posts: 7
Joined: Sat Jun 22, 2013 8:42 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Mon Jul 29, 2013 11:13 pm

Pl4za wrote:Thanks to you i finally solved this problem, thanks ;)

Now i can see the "ra0" device, and find my wi-fi network. Just having problems connecting in the authentication fase.. my network is WPA2-AES..

Will try to solve this later, thanks ;)
Did you set it to WPA2-AES on the ralink config. An if you are using Wicd-curses, are the correct settings set. If not well then thats your problem.

lucasmun09
Posts: 48
Joined: Thu Apr 04, 2013 11:26 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Wed Jul 31, 2013 6:02 pm

Guys try here: http://www.raspberrypi.org/phpBB3/viewt ... 70#p395758 I made a tutorial that actually works...

juanps90
Posts: 2
Joined: Sat Aug 10, 2013 11:50 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Aug 10, 2013 11:57 pm

Hello. I am trying to setup my wireless dongle ( which looks exactly like the one you posted ) but I can't seem to get an interface.

Apparently, there is no rt2870sta module, this is what I get:

Code: Select all

$ sudo modprobe rt2870sta
FATAL: Module rt2870sta not found.
However, the 5370 seems to be available:

Code: Select all

$ sudo modprobe rt5370sta
ERROR: could not insert 'rt5370sta': Exec format error
When I run lsusb, the device is recognized as RT2870/RT3070:

Code: Select all

Bus 001 Device 004: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
I have tried all your steps and have been succesful so far but can't seem to get an interface. I think this is because of the module not being avaiable.

I tried using the interfaces file but this is what I get upon networking restart:

Code: Select all

Cannot find device "ra0"
Bind socket to interface: No such device
Failed to bring up ra0.
Any help?

Thanks!

lucasmun09
Posts: 48
Joined: Thu Apr 04, 2013 11:26 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sun Aug 11, 2013 1:36 am

Hello! It seems that you have the problem i had also. The problem with our dongle here is that the driver inside the raspberry pi is not rerouted to the corrext directory. Have you tried the link to my solution above?

juanps90
Posts: 2
Joined: Sat Aug 10, 2013 11:50 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sun Aug 11, 2013 2:07 pm

For everyone else having the "could not insert 'rt5370sta': Exec format error" problem, I used this rt5370sta.ko file someone else compiled and made available on the internet.

It appears that the Ralink 2870/3070 chipset works fine with the rt5370sta.

Credit to http://androideia.wordpress.com/2013/07 ... i-e-linux/

martinlbb
Posts: 4
Joined: Thu Jun 20, 2013 3:32 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Wed Sep 11, 2013 9:53 am

Good news:

Ralink 3070 chipset is now supported in RPI kernel.

We suggested a commit, and it is now available :)

Just do an

Code: Select all

rpi-update
, reboot and you have a 100% working ralink 3070 :)

For more info: https://github.com/raspberrypi/linux/co ... 6b5f3d1179

ngocphamm
Posts: 5
Joined: Thu Mar 20, 2014 5:38 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Fri Mar 28, 2014 9:50 pm

Hi,

Does it mean that I only have to run "sudo rpi-update" to get the latest firmware and this USB dongle will be automatically recognized without any further steps listed on the first post?

The dongle is from eBay: http://www.ebay.com/itm/181207053210?ss ... 1439.l2649, and it seems to use Ralink 2870 chipset.

However, I've tried to run "sudo rpi-update" but it's not working. I cannot see any other interfaces rather than eth0. "sudo apt-get install firmware-ralink" doesn't help either.

Could anyone please tell me how to examine the chipset type of the dongle?

ngocphamm
Posts: 5
Joined: Thu Mar 20, 2014 5:38 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Mar 29, 2014 1:25 am

I think that I got a wrong dongle or something. It appears in the `sudo dmesg` as the following.

Code: Select all

[    3.219839] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[    3.341221] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=0179
[    3.357532] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.374929] usb 1-1.3: Product: 802.11n NIC
[    3.389615] usb 1-1.3: Manufacturer: Realtek
[    3.395504] usb 1-1.3: SerialNumber: 00E04C818C6D
The dongle seemed to be recognized properly but I still cannot see the interface anywhere. Starting the WPA_config program on LXDE GUI doesn't show any interface from the list.

MrEngman
Posts: 4056
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Mar 29, 2014 1:33 am

ngocphamm wrote:I think that I got a wrong dongle or something. It appears in the `sudo dmesg` as the following.

Code: Select all

[    3.219839] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[    3.341221] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=0179
[    3.357532] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.374929] usb 1-1.3: Product: 802.11n NIC
[    3.389615] usb 1-1.3: Manufacturer: Realtek
[    3.395504] usb 1-1.3: SerialNumber: 00E04C818C6D
The dongle seemed to be recognized properly but I still cannot see the interface anywhere. Starting the WPA_config program on LXDE GUI doesn't show any interface from the list.
That dongle, 0bda:0179, uses the rtl8188eu driver. Take a look here for drivers and config info.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

ngocphamm
Posts: 5
Joined: Thu Mar 20, 2014 5:38 am

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Mar 29, 2014 1:48 am

I was able to enable the interface using this help: http://www.raspberrypi.org/forum/viewto ... 82#p462982

Thanks all! :)

MrEngman
Posts: 4056
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Sat Mar 29, 2014 2:22 am

ngocphamm wrote:I was able to enable the interface using this help: http://www.raspberrypi.org/forum/viewto ... 82#p462982

Thanks all! :)
Good to hear that. Glad you found it helpful. It's a post I generated and try to keep updated so it's always encouraging to hear it's useful and helps folks get their wifi up and running.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

radhika0102
Posts: 14
Joined: Fri Aug 15, 2014 4:20 pm

Re: Ralink 2870/3070 USB Wifi Dongle Not working. [FIXED!]

Tue Jan 13, 2015 11:36 am

in wicd -curses, what to write in identity and password field,i am using WPA2PSK as authentication mode

Return to “Troubleshooting”