Wireless connection but no internet - rt5370 chipset

Hi guys, apologies if the following is a little disjointed - I’ve been compiling all my info for a while now to make sure I had tried everything/collected all necessary info before asking for help:

I’ve got a (relatively cheap) usb wireless stick based on the Ralink RT5370 chipset. (I chose this as it supposedly works with the Raspberry Pi I’m hoping to receive in the next few days, plus my other wifi card isn’t supported in linux :frowning: )

When I plug it in, I can connect to my wireless network, but can’t connect to the internet. Having seen this thread http://forums.opensuse.org/english/get-technical-help-here/wireless/472338-wireless-up-but-no-internet.html , I thought it might be a similar issue, but even after I try

ifconfig eth0 down

the problem persists.

I don’t know if this is related, but when I boot my PC, NetworkManager doesn’t autostart. If I do ifconfig without starting Network Manager, eth0 and wlan0 are not present, but when I start NM, eth0 and wlan0 appear. (wlan0 is the one I want), and eth0 is ‘UP’. As I said, after performing the ‘down’ command, the problem still persists.

Finally it may be worth noting that (and I may say it again below), I can access the internet through my Android phone (which in turn goes through the WiFi). However, if I connect my phone after trying and failing to use NM & my usb wifi device, I cannot connect to the internet and am still presented with the same error messages.

Hopefully that set the scene and makes sense. Below is all the info I could collate on the issue:

I believe my device is supported natively under Linux (I’m running OpenSUSE 12.2), which is confirmed by the following:



$> cat /etc/issue
Welcome to openSUSE 12.2 "Mantis" - Kernel \r (\l).




$> lsusb
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 002 Device 007: ID **148f:5370** Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 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 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0ac8:3420 Z-Star Microelectronics Corp. Venus USB2.0 Camera
Bus 001 Device 006: ID 0bb4:0c86 High Tech Computer Corp. 
Bus 001 Device 004: ID 062a:3270 Creative Labs 



$> /sbin/modinfo rt2800usb | grep 5370
alias:          usb:v**148Fp5370**d*dc*dsc*dp*ic*isc*ip*





And my understanding of modprobe is that the driver is loaded:



$> modprobe -l | grep 2800
kernel/drivers/net/wireless/rt2x00/rt2800lib.ko
kernel/drivers/net/wireless/rt2x00/rt2800pci.ko
kernel/drivers/net/wireless/rt2x00/rt2800usb.ko



I have my device present in iwconfig:



$> /usr/sbin/iwconfig
usb0      no wireless extensions.


eth0      no wireless extensions.


lo        no wireless extensions.


wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on



$> dmesg -T
...
[Tue Feb 19 20:01:55 2013] usb 2-2: new high-speed USB device number 7 using ehci_hcd
[Tue Feb 19 20:01:55 2013] usb 2-2: New USB device found, idVendor=148f, idProduct=5370
[Tue Feb 19 20:01:55 2013] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Tue Feb 19 20:01:55 2013] usb 2-2: Product: 802.11 n WLAN
[Tue Feb 19 20:01:55 2013] usb 2-2: Manufacturer: Ralink
[Tue Feb 19 20:01:55 2013] usb 2-2: SerialNumber: 1.0
[Tue Feb 19 20:01:55 2013] usb 2-2: reset high-speed USB device number 7 using ehci_hcd
[Tue Feb 19 20:01:55 2013] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[Tue Feb 19 20:01:55 2013] Registered led device: rt2800usb-phy0::radio
[Tue Feb 19 20:01:55 2013] Registered led device: rt2800usb-phy0::assoc
[Tue Feb 19 20:01:55 2013] Registered led device: rt2800usb-phy0::quality

$> sudo /usr/sbin/iwlist scan
root's password:
usb0      Interface doesn't support scanning.


eth0      Interface doesn't support scanning.


lo        Interface doesn't support scanning.


wlan0     Interface doesn't support scanning : Network is down


$> sudo /sbin/ifup wlan0
    wlan0     
              No configuration found for wlan0



The above is all performed after boot but before starting NetworkManager.

The following is from after starting NetworkManager and connecting to my network: (Note: usb0 is my android device)

> /usr/sbin/iwconfig
usb0      no wireless extensions.


eth0      no wireless extensions.


lo        no wireless extensions.


wlan0     IEEE 802.11bgn  ESSID:"virginmedia1234567"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: NO:TR:EA:L1:23   
          Bit Rate=19.5 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=47/70  Signal level=-63 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:21   Missed beacon:0



$> sudo /usr/sbin/iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: NO:TR:EA:L1:23
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=49/70  Signal level=-61 dBm  
                    Encryption key:on
                    ESSID:"virginmedia123456"
                    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
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=***
                    Extra: Last beacon: 75ms ago
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: Unknown: ***
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: ***

As I don’t know what the numbers in this output mean, I have replaced them all with ‘***’. Probably over cautious but ah well. Also my MAC address and essid are false.

As far as I can tell, I’m connected to the network:

$> ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=112 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=16.0 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=16.2 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=15.8 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=15.6 ms
64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=16.4 ms
64 bytes from 192.168.0.1: icmp_seq=7 ttl=64 time=17.4 ms
64 bytes from 192.168.0.1: icmp_seq=8 ttl=64 time=16.5 ms
64 bytes from 192.168.0.1: icmp_seq=9 ttl=64 time=15.9 ms
64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=21.1 ms
64 bytes from 192.168.0.1: icmp_seq=11 ttl=64 time=18.8 ms
64 bytes from 192.168.0.1: icmp_seq=12 ttl=64 time=21.2 ms
64 bytes from 192.168.0.1: icmp_seq=13 ttl=64 time=15.8 ms
64 bytes from 192.168.0.1: icmp_seq=14 ttl=64 time=16.0 ms
64 bytes from 192.168.0.1: icmp_seq=15 ttl=64 time=16.7 ms
64 bytes from 192.168.0.1: icmp_seq=16 ttl=64 time=16.5 ms
64 bytes from 192.168.0.1: icmp_seq=17 ttl=64 time=15.7 ms
^C
--- 192.168.0.1 ping statistics ---
17 packets transmitted, 17 received, 0% packet loss, time 16022ms
rtt min/avg/max/mdev = 15.686/22.661/112.855/22.612 ms



but when I try to access the internet I get the following errors:

Google Chrome:
Error 137 (net::ERR_NAME_RESOLUTION_FAILED): Unknown error.


Firefox:
Server not found
          Firefox can't find the server at www.google.co.uk.
  Check the address for typing errors such as
    ww.example.com instead of
    www.example.com
  If you are unable to load any pages, check your computer's network
    connection.
  If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

$> /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
loopback        *               255.0.0.0       U     0      0        0 lo
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0



When I allow my computer to connect to the internet through my Android phone, (via the wifi network), everything works (hence my being able to post this message), hopefully showing that the router works and also that when I have an internet connection, Chrome can use it.

It’s also worth mentioning that my PC dual-boots Windows 7, and this device/network setup works perfectly.

That’s everything that I can think of - if any more info is required, please let me know.

Thanks in advance for any hints you may be able to provide!

Peace,

Thonners

I did not read everything, but as you, somewhere down your post, can ping to your router (192.168.0.1), that proves that your NIC functions. Thus all taalking about it being a Ralink … etc. can be skipped. Your system is connected to your LAN.
Next test should indeed be to see if you can access the Internet. But not in the way you do it. Again using ping to an IP address.
Try e.g.

ping -c 1 130.57.66.6

If that succeeds you just pinged to the forums.opensuse.org system and thus are connected to the internet.

But what seems not to work in your case is using host.domainnames. They do not resolve to IP addresses. Thus you have no (correct) DNS server. Normaly you get your DNS server from your DHCP server (like your IP address, netmask and default router). But It may be that somewhere during the DNS server configuration is changed by some other means and in that case DHCP wll not overwrite it because it thinks that the “manual” change has priority.

Please post

cat /etc/resolv.conf

Since you seem to be setting the card up manually, you will need to give a DNS server in /erc/resolv.conf. Usually the router will have a DNS pass-through server running so set that as your nameserver in resolve.conf.

Better, use yast or networkmanager.

Since you seem to be setting the card up manually, you will need to give a DNS server in /erc/resolv.conf. Usually the router will have a DNS pass-through server running so set that as your nameserver in resolve.conf.

Better, use yast or networkmanager.

Thanks guys,

Having tried pinging the suggested address successfully (and also accessing the page in chrome via the IP address), I checked /etc/resolve.conf. There was an address in there, but I changed it to the Virgin Media recommended one and hey presto I’m up and running, so thank you so much for this.

I just need to set NM to autoboot now (I’ve already looked without much success for this) or alternatively find a way to make the device start on boot, but I think I need to add some settings to config-wlan0, since if I try ifup wlan0 without starting NM I get an error about lack of configuration file.

This may be a question for another topic, but do you have any recommendations for which files / locations to put scripts to run at boot? I saw something about .desktop files, but it didn’t work when I tried - clearly I made a mistake in the implementation somewhere!

Thanks again for the help, very much appreciated :slight_smile:

Thonners

P.S. sorry about the overly verbose first post - just trying to make sure I wasn’t lacking any info but clearly went well overboard!

Better, new question, new thread, other (sub)forum, new telling title.

Your first post was very elaborate indeed. That is no problem. It was well organised. I prefer that above the half line “problem descriptions” that are in fact no more then “it doesn’t do it”.

What I tried to teach you (sounds pedantic :frowning: ) is that the network also has a bottom up approach and that you first see that the NIC functions, then that you can connect with your LAN (your router), then that you can go outside to the internet and then that you can resolve names. When you prove a certain point is functioning, all before it is functioning also. Thus in your case, you could have left out everything before the ping. But as said, your description contained a lot of information and showed that you know rather well what you are doing. And for others, to see that you understand a lot allready helps in helping you. Often to find out the level of understanding of an OP is often more difficult then the whole problem is :wink:

Ok, I’ll keep looking and if unsuccessful try a new post. Your methodology all makes sense too, so that’s cool.

Thanks once again - I can now have Linux as my primary OS - happy days :slight_smile:

Thonners.

You could use yast to set up the network. Choose network devices and then take the global options tab. Select the button that says to let enable network manager.

On the desktop, look for the network manager client applet and use that to configure the wlan in terms of ssid and passphrase etc be sure to tell the client to bring up the interface every time. Leave the client on the desktop tool bar and it will come back after reboot.

If you disable nm, edit the setup for the nic. You can configure the nic to come up on boot, give the passphrase etc as part of the dialogue.

If you don’t want to use yast, create a file called /etc/sysconfig/ifcfg-xxxx where xxxx is the name of your nic. That file needs to contain all the stuff you need to boot up the nic.

You are still one step behind me lol!. It is my only OS.