OpenWrt Forum Archive

Topic: wifi usb disconnect upon use - 148f:3070 Ralink [...] RT2870/RT3070

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all! I am trying to get my Ralink USB wifi adapter to work with latest stable CC of OpenWrt without success for the second time.

I've installed the opkg packages for it and it is recognize and loaded. But as soon as I try to connect, it simply logs "usb disconnect" with no other explanation. Tho I do can scan for wifi APs, I then can't join since it directly disconnects the usb as if I unplugged it.

Here is the output of lsusb -v for this device:

Bus 001 Device 009: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x148f Ralink Technology, Corp.
  idProduct          0x3070 RT2870/RT3070 Wireless Adapter
  bcdDevice            1.01
  iManufacturer           1 Ralink
  iProduct                2 802.11 n WLAN
  iSerial                 3 1.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              450mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           7
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              5 1.0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 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     0x0200  1x 512 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     0x0200  1x 512 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     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

My lsmod:

arc4                    1232  4 
ath                    19280  3 ath9k
ath9k                  83696  0 
ath9k_common           15760  1 ath9k
ath9k_hw              331712  2 ath9k
cfg80211              204048  5 ath9k
compat                  1120  5 ath9k
crc_ccitt                944  2 rt2800lib
crc_itu_t                944  0 
crypto_blkcipher        9744  1 arc4
eeprom_93cx6            1616  0 
ehci_hcd               31888  1 ehci_platform
ehci_platform           3408  0 
gpio_button_hotplug     4400  0 
ip6_tables              9056  3 ip6table_raw
ip6t_REJECT             1104  2 
ip6table_filter          528  1 
ip6table_mangle          992  1 
ip6table_raw             496  1 
ip_tables               9200  4 iptable_nat
ipt_MASQUERADE           544  1 
ipt_REJECT               832  2 
iptable_filter           592  1 
iptable_mangle           864  1 
iptable_nat              688  1 
iptable_raw              560  1 
ipv6                  261168 26 nf_conntrack_ipv6
ledtrig_usbdev          1856  0 
mac80211              362512  4 ath9k
nf_conntrack           44800 11 nf_nat_ipv4
nf_conntrack_ftp        5200  1 nf_nat_ftp
nf_conntrack_ipv4       5072  8 
nf_conntrack_ipv6       5456  3 
nf_conntrack_rtcache    2400  0 
nf_defrag_ipv4           720  1 nf_conntrack_ipv4
nf_defrag_ipv6          8800  1 nf_conntrack_ipv6
nf_log_common           2240  2 nf_log_ipv4
nf_log_ipv4             3056  0 
nf_log_ipv6             3216  0 
nf_nat                  9168  5 nf_nat_ipv4
nf_nat_ftp              1120  0 
nf_nat_ipv4             3968  1 iptable_nat
nf_nat_masquerade_ipv4    1184  1 ipt_MASQUERADE
nf_reject_ipv4          1760  1 ipt_REJECT
nf_reject_ipv6          1856  1 ip6t_REJECT
nls_base                4656  1 usbcore
ppp_async               6240  0 
ppp_generic            20176  3 pppoe
pppoe                   8032  0 
pppox                   1136  1 pppoe
rt2800lib              90016  1 rt2800usb
rt2800usb              14032  0 
rt2x00lib              29776  3 rt2800usb
rt2x00usb               7008  1 rt2800usb
slhc                    4080  1 ppp_generic
usb_common              1008  1 usbcore
usbcore               111392  5 rt2800usb
x_tables                9776 26 ipt_REJECT
xt_CT                   2144  0 
xt_LOG                   688  0 
xt_REDIRECT              976  0 
xt_TCPMSS               2528  2 
xt_comment               400 62 
xt_conntrack            2080 10 
xt_id                    400  0 
xt_limit                 912 20 
xt_mac                   544  0 
xt_mark                  592  0 
xt_multiport            1104  0 
xt_nat                   992  0 
xt_state                 608  0 
xt_tcpudp               1616 12 
xt_time                 1552  0 

The log appearing when I try to connect:

Mon Oct  5 09:11:25 2015 kern.info kernel: [ 1751.930000] ieee80211 phy8: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Mon Oct  5 09:11:25 2015 kern.info kernel: [ 1751.950000] ieee80211 phy8: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
Mon Oct  5 09:11:26 2015 kern.info kernel: [ 1752.720000] IPv6: ADDRCONF(NETDEV_UP): wlan8: link is not ready
Mon Oct  5 09:11:26 2015 daemon.notice netifd: radio1 (5130): Successfully initialized wpa_supplicant
Mon Oct  5 09:11:26 2015 daemon.notice netifd: Interface 'pwan' is enabled
Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1753.550000] usb 1-1: USB disconnect, device number 9
Mon Oct  5 09:11:27 2015 daemon.notice netifd: Interface 'pwan' is disabled
Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1753.970000] usb 1-1: new high-speed USB device number 10 using ehci-platform
Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1754.270000] usb 1-1: reset high-speed USB device number 10 using ehci-platform
Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1754.430000] ieee80211 phy9: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1754.460000] ieee80211 phy9: rt2x00_set_rf: Info - RF chipset 0005 detected
Mon Oct  5 09:11:27 2015 kern.debug kernel: [ 1754.470000] ieee80211 phy9: Selected rate control algorithm 'minstrel_ht'

(...and of course the connection is not established and it just remains as if I did not even try to connect)

FYI, I could use this same device for the same network on a Raspberry PI B without problem.
I am trying to do this on a TP-Link TL-WR842N/ND v2 which already has a wifi adapter but not powerful enough to get the signal from 1km away, which is why I am using this USB wifi antenna. I do can connect with the internal wifi adapter but the signal is so low that it looses the connection all the time.
I also could use the USB port to plug a printer and it was working correctly so I don't think it's an USB issue.

Here is some more information:

# uname -a
Linux bnh-lek 3.18.20 #1 Fri Sep 4 21:55:57 CEST 2015 mips GNU/Linux
# cat /etc/openwrt_release 
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='15.05'
DISTRIB_REVISION='r46767'
DISTRIB_CODENAME='chaos_calmer'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer 15.05'
DISTRIB_TAINTS=''

Thanks in advance for any help given, I am stuck again on this problem and this time I don't want to give up ;-)

(Last edited by huafu on 5 Oct 2015, 03:21)

what exactly disconnects? wireless connection or the usb itself?

Hi dagg,

Thanks a lot for answering. As I said, the wifi connection is not even established. In the logs you can see

Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1753.550000] usb 1-1: USB disconnect, device number 9

right after I try to establish the wifi connection.

So I can use the device to scan for wifi AP around, but I can't connect to any of them. Anytime I try it simply act as if I unplugged the USB device.

Lemme know if you need any more information.

huafu wrote:

Hi dagg,

Thanks a lot for answering. As I said, the wifi connection is not even established. In the logs you can see

Mon Oct  5 09:11:27 2015 kern.info kernel: [ 1753.550000] usb 1-1: USB disconnect, device number 9

right after I try to establish the wifi connection.

So I can use the device to scan for wifi AP around, but I can't connect to any of them. Anytime I try it simply act as if I unplugged the USB device.

Lemme know if you need any more information.

it seems like I'm having the same issue but with usb hdds, I think it is a bug in the kernel as I see the same behavior in my openelec streamer which has kernel 3.18.10

on my desktop (kernel 4.2.3), it doesn't happen. will try any see how to open a bug on this

daggs wrote:

it seems like I'm having the same issue but with usb hdds, I think it is a bug in the kernel as I see the same behavior in my openelec streamer which has kernel 3.18.10

on my desktop (kernel 4.2.3), it doesn't happen. will try any see how to open a bug on this

Hi daggs, check that your USB is having enough power to handle the HDD, that might be it (try putting it behind a powered hub). It may work on your computer just because it is delivering more power.

Anyway, I've compiled r47142 which has a 4.1.10 kernel and also included all options to have more debugging for my wifi usb driver. Nothing changed, same issue :-/

(Last edited by huafu on 8 Oct 2015, 03:26)

same to me,
did you found any solution?

I think the issue is that usb wifi adapter doesn't get enough current from the router, try using a usb hub with a charger. that worked for me for MR3040

The discussion might have continued from here.