How to use Xiaomi Mi A1 with Linksys WRT1900AC for USB tethering?

Hi,

I have a Xiaomi Mi A1 Android 10 phone, and I have a Linksys WRT1900AC v1 router.
The WRT1900AC router is currently running OpenWRT 19.07.2 r10947-65030d81f3 .

I want to share my Mi A1 phone's Internet connection with my router, due to my normal broadband being disconnected due to some issues for the next few days, so that my router can access the Internet via my phone's connection.

I have followed the instructions here: https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering but nothing is happening.

And after installing the kernel drivers, and plugging in my Mi A1 phone, I have rebooted the router.

By nothing is happening, I mean, my dmesg doesn't show my Mi A1 phone being connected to the router via its USB port.

If I connect my Mi A1 phone to my Windows computer, the Mi A1 phone offers options (via its menu) to switch to USB tethering, etc, but if I connect the phone to the router, no such option is offered on my phone.

Can anyone help me to figure out how I can enable my router to access my phone's Internet please?

Here's the dmesg | grep usb output:

 dmesg | grep usb
[    0.020120] usbcore: registered new interface driver usbfs
[    0.020168] usbcore: registered new interface driver hub
[    0.020214] usbcore: registered new device driver usb
[    1.121503] orion-ehci f1050000.usb: EHCI Host Controller
[    1.126934] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[    1.134609] orion-ehci f1050000.usb: irq 25, io mem 0xf1050000
[    1.161169] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[    1.225285] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.242130] usbcore: registered new interface driver usb-storage
[   10.844901] usbcore: registered new interface driver cdc_wdm
[   10.858124] usbcore: registered new interface driver ipheth
[   10.899660] usbcore: registered new interface driver usbserial
[   10.905617] usbcore: registered new interface driver usbserial_generic
[   10.912235] usbserial: USB Serial support registered for generic
[   10.928177] usbcore: registered new interface driver cdc_ether
[   10.948268] usbcore: registered new interface driver qmi_wwan
[   10.955025] usbcore: registered new interface driver rndis_host
[   10.963446] usbcore: registered new interface driver option
[   10.969106] usbserial: USB Serial support registered for GSM modem (1-port)

Here's the cat output

 cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.14
S:  Manufacturer=Linux 4.14.171 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=f1050000.usb
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.14
S:  Manufacturer=Linux 4.14.171 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 4.14
S:  Manufacturer=Linux 4.14.171 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

usbmuxd -v output is empty.

Ok, the URLs given in my post works, if I use a HTC Nexus One connected to the USB port of my Linksys WRT1900AC, running OpenWRT 19.07.2 r10947-65030d81f3 and switch the Nexus One to enable the mobile network and USB tethering in one of its menu settings (No need to do any special code).

So I must conclude that Xiaomi Mi A1 doesn't signify that it's on USB tethering mode.

All of the commands I had used earlier works:
dmesg | grep usb shows:

[ 6230.423745] usb 2-2: new high-speed USB device number 7 using xhci_hcd
[ 6230.636940] rndis_host 2-2:1.0 usb0: register 'rndis_host' at usb-0000:01:00.0-2, RNDIS device, 22:89:39:bb:44:3a

lsusb -v output:

Bus 002 Device 007: ID 18d1:4e14 Google Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x18d1 Google Inc.
  idProduct          0x4e14
  bcdDevice            2.27
  iManufacturer           1 Google, Inc.
  iProduct                2 Nexus One
  iSerial                 3 HT01TP800750
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           98
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       6 Ethernet Networking
      bFunctionProtocol       0
      iFunction               6 RNDIS
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      3 RNDIS
      iInterface              4 RNDIS Communications Control
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 01
      ** UNRECOGNIZED:  04 24 02 00
      ** UNRECOGNIZED:  05 24 06 00 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              5 RNDIS Ethernet Data
      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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66
      bInterfaceProtocol      1
      iInterface              0
      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               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
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

cat /sys/kernel/debug/usb/devices

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=18d1 ProdID=4e14 Rev= 2.27
S:  Manufacturer=Google, Inc.
S:  Product=Nexus One
S:  SerialNumber=HT01TP800750
C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

usbmuxd -v output is empty, but what's important is that USB tethering works on Linksys WRT1900AC v1.

Ok, turned out I was using a bad cable. It could charge, but couldn't transfer data, or something.

With a different cable, now Xiaomi Mi A1 can be used to tether the Linksys WRT1900AC to the phone's Internet connection.

dmesg | grep usb:

[ 8738.225316] usb 1-1: USB disconnect, device number 7
[ 8738.230513] rndis_host 1-1:1.0 usb0: unregister 'rndis_host' usb-f1050000.usb-1, RNDIS device
[ 8743.597370] usb 1-1: new high-speed USB device number 8 using orion-ehci
[ 8743.802474] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-f1050000.usb-1, RNDIS device, 4e:38:4f:c1:07:b1

Here's logread -f when Xiaomi is network enabled and USB tethering got enabled:

Fri Apr  3 16:53:55 2020 kern.info kernel: [ 8473.334977] usb 1-1: new high-speed USB device number 7 using orion-ehci
Fri Apr  3 16:53:55 2020 kern.info kernel: [ 8473.540793] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-f1050000.usb-1, RNDIS device, 2a:2d:91:d8:67:06

cat /sys/kernel/debug/usb/devices:

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  7 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2717 ProdID=ff80 Rev= 3.18
S:  Manufacturer=Android
S:  Product=Android
S:  SerialNumber=286301fa9805
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

lsusb -v:

Bus 001 Device 007: ID 2717:ff80 Xiaomi Inc. Mi/Redmi series (RNDIS)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x2717 Xiaomi Inc.
  idProduct          0xff80 Mi/Redmi series (RNDIS)
  bcdDevice            3.18
  iManufacturer           1 Android
  iProduct                2 Android
  iSerial                 3 286301fa9805
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           75
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass        224 Wireless
      bFunctionSubClass       1 Radio Frequency
      bFunctionProtocol       3 RNDIS
      iFunction              10 RNDIS
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      3 RNDIS
      iInterface              8 RNDIS Communications Control
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 01
      ** UNRECOGNIZED:  04 24 02 00
      ** UNRECOGNIZED:  05 24 06 00 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              9 RNDIS Ethernet Data
      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
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)

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.