Apalis T30 Angstrom Ralink RT2870 Driver

We have an ASUSTek AC51 USB wireless dongle which uses the Mediatek MT7610/Ralink RT2870 chipset.

I am not currently able to get this working on our Toradex 3.1.10 kernel, running on an Ixora carrier board. The USB device is detected but no wlanX device is ever installed:

[ 1664.355041] usb 1-1: New USB device found, idVendor=0b05, idProduct=17d1
[ 1664.382967] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1664.396299] usb 1-1: Product: WiFi
[ 1664.399709] usb 1-1: Manufacturer: MediaTek
[ 1664.403893] usb 1-1: SerialNumber: 1.0

Here is the lsusb -v output:

Bus 001 Device 005: ID 0b05:17d1 ASUSTek Computer, Inc. AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610/Ralink RT2870]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0b05 ASUSTek Computer, Inc.
  idProduct          0x17d1 AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610/Ralink RT2870]
  bcdDevice            1.00
  iManufacturer           1 MediaTek
  iProduct                2 WiFi
  iSerial                 3 1.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           74
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              160mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           8
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol    255
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x08  EP 8 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      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               1
      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               1
      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               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x09  EP 9 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           12
  bNumDeviceCaps          1
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      HIRD Link Power Management (LPM) Supported
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Running ifconfig:

enp1s0    Link encap:Ethernet  HWaddr 00:14:2D:29:71:FB
          inet addr:192.168.0.147  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34254 errors:0 dropped:138 overruns:0 frame:0
          TX packets:8416 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29787756 (28.4 MiB)  TX bytes:563147 (549.9 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:251 errors:0 dropped:0 overruns:0 frame:0
          TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:20430 (19.9 KiB)  TX bytes:20430 (19.9 KiB)

rndis0    Link encap:Ethernet  HWaddr EA:4D:95:BB:00:BC
          inet addr:192.168.11.1  Bcast:192.168.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Have any of the Toradex team managed to get such a device up and running?

What exact hardware and software versions of things are you talking about?

I don’t think any such is supported out-of-the-vox by any of our BSPs though.

I used this chipset on a different kernel before. You may need to load the firmware for RT2870, something like this:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/log/rt2870.bin
You can either add the firmware to your image, or embed it into your kernel config.
https://www.toradex.com/community/questions/1309/adding-wifi-driver-to-the-kernel.html

You also may need to bring the adapter up.
ifconfig wlan0 up

I also had problems with various version of that driver. You may not get good performance in speed, depending on kernel and driver version. It’s been a couple years since though, perhaps they have improved the driver.

@marcel.tx Versions already mentioned: V1.1A of the Apalis T30 and kernel version 3.1.10 bitbaked from an older openembedded version (I need to confirm exactly which version of oe was used). This was not bitbaked by me however I’m trying to shoe-horn in this USB wi-fi adapter.

@kswain Thanks for the info. What I’ve done so far is taken the “backports” as per the Toradex guide and compiled + pushed the modules (including the rt2870usb plus relevant firmware) to the target.

I can modprobe the rt2800usb kernel module and load up all of the dependencies however, I never get a wlan0 device - ifconfig wlan0 up complains about an unknown device.

As per my output above, the device is detected correctly as a USB device, I just cannot get the device to install. I think all of the modules are configured correctly.

I am not that familiar with 3.x kernel version.

Another thing to try is go to
./kernel/linux/Documentation and do a grep -R “RT28” or similar to find any relevant document information. There might be a special command line parameter to use for insmod to load the driver. I had that happen to me once before. The newer 4.14.y kernel I am using needs ifconfig mlan0 up, not wlan0. I think it’s probably wlan0 for the 3.x kernels though.

Thanks for the pointers - I’ll have a look in the documentation, see if there is anything useful in there.

I would move to a later version of the kernel however, the version we have runs with the EGLFS backend (implemented by a previous developer) and all our Qt software is built around this. Unfortunately for now, I’m stuck with this older version.

Thanks again for your help.

Can you try running our 2.8b5 BSP and connecting that usb wifi?

@dominik.tx I will have to try this aside from the current version. Unfortunately I need to somehow get this integrated with setup I have at the moment.

Sure, but if that would work you could just integrate our latest backports into your older stuff and should be all set.

@marcel.tx I already attempted to integrate the latest backports but the end result was still the same - no device installed but modules loaded ok.

But did you ever try with stock BSP 2.8b5? As otherwise, we do not know whether it is a matter of your integration or already an issue of (our) backports.

@marcel.tx No, just the backports. Testing 2.8b5 is on the list…

Ok, may I suggest doing that as the next step now then?

@marcel.tx Indeed I shall however it won’t be this week. Will post back once I’ve had chance to try