Activation Codes and Methods, Hardware Details, Sniffing
wodgey
Posts: 26
Joined: 16 May 2019, 08:14

"LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 10:04

I've got a "KuWfi 4g LTE unlocked USB dongle" (This one ---->>> https://www.amazon.co.uk/KuWFi-100Mbps- ... way&sr=8-9 )

and it won;t switch into Ethernet adaptor mode.

It has vid/pid of 161c:f010 when in CD mode and I have noted that in windows that it has 161c:f101 when in Ethernet mode.

When I use usb_modeswitch -v 161c -p f010 -W -K

Code: Select all

sudo usb_modeswitch -v 161c -p f010 -W -K
[sudo] password for roger:  
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x161c
DefaultProduct= 0xf010

StandardEject=1

Look for default devices ...
  found USB ID 17ef:1003
  found USB ID 8087:0024
  found USB ID 1d6b:0002
  found USB ID 1d6b:0003
  found USB ID 161c:f010
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 04f2:b217
  found USB ID 0a5c:217f
  found USB ID 147e:2016
  found USB ID 8087:0024
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 007 on bus 003
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 8
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: manufacturer
     Product: LTE MIFI
  Serial No.: 0123456789

-------------------------
Sending standard EJECT sequence
Looking for active drivers ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 1 (CSW) ...
 Response successfully read (13 bytes), status 0
Trying to send message 2 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 2 (CSW) ...
 Response successfully read (13 bytes), status 0
Trying to send message 3 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 3 (CSW) ...
 Response successfully read (13 bytes), status 1
Trying to send message 4 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 4 (CSW) ...
 Response successfully read (13 bytes), status 1
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
Running lsusb shows these values don't change.

Code: Select all

lsusb
Bus 002 Device 003: ID 17ef:1003 Lenovo Integrated Smart Card Reader
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 007: ID 161c:f010  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)
Bus 001 Device 004: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I've tried changing -K for -H, -J, -X etc but nothing has any effect. please help

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 10:23

wodgey wrote: When I use usb_modeswitch -v 161c -p f010 -W -K
/snip/
wodgey wrote: I've tried changing -K for -H, -J, -X etc but nothing has any effect. please help

Try usb_modeswitch -v 161c -p f010 -W -M 55534243123456780000000000000606f50402527000000000000000000000

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 10:41

LOM wrote:
wodgey wrote: When I use usb_modeswitch -v 161c -p f010 -W -K
/snip/
wodgey wrote: I've tried changing -K for -H, -J, -X etc but nothing has any effect. please help

Try usb_modeswitch -v 161c -p f010 -W -M 55534243123456780000000000000606f50402527000000000000000000000

AMAZING. That has caused progress.

It is looking like a Network Adaptor now but doesn't give me an IP address or show as an interface

Code: Select all

$ sudo lsusb -v -d 161c:f101

Bus 003 Device 009: ID 161c:f101  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x161c 
  idProduct          0xf101 
  bcdDevice            2.32
  iManufacturer           2 manufacturer
  iProduct                3 LTE MIFI
  iSerial                 4 0123456789

  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           88
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      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        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              6 CDC Ethernet Control Model (ECM)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 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     0x02  EP 2 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)
ifconfig shows only my onboard LAN and wifi cards

Code: Select all

$ ifconfig
enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether f0:de:f1:a5:7e:44  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf4a00000-f4a20000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 25645  bytes 3225933 (3.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25645  bytes 3225933 (3.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.119  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fd6d:7a2b:ddd0:0:35e2:ec32:25de:ab92  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::22b8:cf29:8c89:f5cb  prefixlen 64  scopeid 0x20<link>
        inet6 fd6d:7a2b:ddd0:0:b79d:9e73:a979:481a  prefixlen 64  scopeid 0x0<global>
        inet6 fd6d:7a2b:ddd0::943  prefixlen 128  scopeid 0x0<global>
        ether 24:77:03:26:d1:40  txqueuelen 1000  (Ethernet)
        RX packets 2245792  bytes 3203378793 (3.2 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1190053  bytes 127299663 (127.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 11:06

wodgey wrote:
It is looking like a Network Adaptor now but doesn't give me an IP address or show as an interface
That's because no driver has bound to the device.
Interface #0 is likely a serial interface and interface #1 is the network adapter interface, this is either a qmi_wwan
interface or a proprietary driver (not available in linux) interface.

What happens if you change the 70 in the switch msg to 71? Do you get a different interface layout?

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 11:17

LOM wrote:
wodgey wrote:
It is looking like a Network Adaptor now but doesn't give me an IP address or show as an interface
What happens if you change the 70 in the switch msg to 71? Do you get a different interface layout?
I don't understand.

do you mean editing the message string to be this????

Code: Select all

sudo usb_modeswitch -v 161c -p f010 -W -M 55534243123456780000000000000606f50402527100000000000000000000 
that has made no changes to ifconfig, only showing WLAN, LAN and LO


edit2add:
sudo lsusb shows this --

Code: Select all

$ sudo lsusb -v -d 161c:f101

Bus 003 Device 017: ID 161c:f101  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x161c 
  idProduct          0xf101 
  bcdDevice            2.32
  iManufacturer           2 manufacturer
  iProduct                3 LTE MIFI
  iSerial                 4 0123456789

  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          111
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      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        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              6 CDC Ethernet Control Model (ECM)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 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     0x02  EP 2 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         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              1 Mass Storage
      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     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
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)

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 11:21

wodgey wrote:
LOM wrote:
wodgey wrote:
It is looking like a Network Adaptor now but doesn't give me an IP address or show as an interface
What happens if you change the 70 in the switch msg to 71? Do you get a different interface layout?
I don't understand.

do you mean editing the message string to be this????

Code: Select all

sudo usb_modeswitch -v 161c -p f010 -W -M 55534243123456780000000000000606f50402527100000000000000000000 
that has made no changes to ifconfig, only showing WLAN, LAN and LO
It is way to early for something to appear in ifconfig, did the verbose lsusb listing look same like before when you had 70 in the switch msg?
If you had a successful switch using 71 then I expect a different interface layout after switching..

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 11:24

ok, saw your edit. You got an additional interface, a mass storage interface for the built-in tf/sd card reader.
What if you change to 72?

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 11:29

LOM wrote:ok, saw your edit. You got an additional interface, a mass storage interface for the built-in tf/sd card reader.
What if you change to 72?


No :( (Shoulkd I try changing to 3, 4, 5 etc??)
sudo usb_modeswitch -v 161c -p f010 -W -M 55534243123456780000000000000606f50402527200000000000000000000
doesn;t trigger the switch

Code: Select all

roger@novo:~/Music/driver$ sudo lsusb
Bus 002 Device 003: ID 17ef:1003 Lenovo Integrated Smart Card Reader
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 018: ID 161c:f010  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)
Bus 001 Device 004: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
roger@novo:~/Music/driver$ sudo lsusb -v -d 161c:f010

Bus 003 Device 018: ID 161c:f010  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x161c 
  idProduct          0xf010 
  bcdDevice            2.32
  iManufacturer           2 manufacturer
  iProduct                3 LTE MIFI
  iSerial                 4 0123456789

  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              1 Mass Storage
      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               1
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)

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 11:44

ok, so you have 2 configurations in the dongles firmware to choose between , one with and one without the usb mass storage interface, use the first one (70).

Afterh having switched the dongle then bind the serial driver (named option) to the interfaces:

echo "161c f101" > /sys/bus/usb-serial/drivers/option1/new_id

and show me the 8-9 lines from your dmesg where ttyUSB devices gets created by the above cmd.

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 11:53

LOM wrote:ok, so you have 2 configurations in the dongles firmware to choose between , one with and one without the usb mass storage interface, use the first one (70).

Afterh having switched the dongle then bind the serial driver (named option) to the interfaces:

echo "161c f101" > /sys/bus/usb-serial/drivers/option1/new_id

and show me the 8-9 lines from your dmesg where ttyUSB devices gets created by the above cmd.
That command returned "permission denied" even when using sudo permissions ALTHOUGH the string is in the file when cat'ing

Code: Select all

$ sudo cat /sys/bus/usb-serial/drivers/option1/new_id
161c f101


last 15-20 lines in dmesg

Code: Select all

[35092.048261] usb-storage 3-1:1.0: USB Mass Storage device detected
[35092.048708] scsi host7: usb-storage 3-1:1.0
[35093.077036] scsi 7:0:0:0: CD-ROM            LTE      Hotspot          2.31 PQ: 0 ANSI: 2
[35093.077916] sr 7:0:0:0: Power-on or device reset occurred
[35093.078381] sr 7:0:0:0: [sr1] scsi3-mmc drive: 0x/0x caddy
[35093.078774] sr 7:0:0:0: Attached scsi CD-ROM sr1
[35093.078973] sr 7:0:0:0: Attached scsi generic sg3 type 5
[35093.338334] ISO 9660 Extensions: Microsoft Joliet Level 1
[35093.338581] ISOFS: changing to secondary root
[35097.149197] usb 3-1: USB disconnect, device number 31
[35097.581624] usb 3-1: new high-speed USB device number 32 using xhci_hcd
[35097.737722] usb 3-1: New USB device found, idVendor=161c, idProduct=f101
[35097.737725] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[35097.737726] usb 3-1: Product: LTE MIFI
[35097.737727] usb 3-1: Manufacturer: manufacturer
[35097.737728] usb 3-1: SerialNumber: 0123456789
               
[35097.755524] option 3-1:1.0: GSM modem (1-port) converter detected
[35097.755742] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
[35097.761468] option 3-1:1.1: GSM modem (1-port) converter detected
[35097.761610] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 12:06

wodgey wrote:
That command returned "permission denied" even when using sudo permissions ALTHOUGH the string is in the file when cat'ing

Code: Select all

$ sudo cat /sys/bus/usb-serial/drivers/option1/new_id
161c f101

[35097.755524] option 3-1:1.0: GSM modem (1-port) converter detected
[35097.755742] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
[35097.761468] option 3-1:1.1: GSM modem (1-port) converter detected
[35097.761610] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
[/code]
Now you want to unbind the option driver from interface #1 and instead bind the qmi_wwan driver to it.

echo "3-1:1.1" > /sys/bus/usb/drivers/option/unbind

echo "161c f101" > /sys/bus/usb/drivers/qmi_wwan/new_id


If interface #1 is intended for qmi_wwan then you should be able to communicate with it.
You must have libqmi installed together with ModemManager and Network Manager.
Your dmesg log should show qmi_wwan and cdc_wdm binding to interface #1

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 12:12

LOM wrote:
wodgey wrote:
That command returned "permission denied" even when using sudo permissions ALTHOUGH the string is in the file when cat'ing

Code: Select all

$ sudo cat /sys/bus/usb-serial/drivers/option1/new_id
161c f101

[35097.755524] option 3-1:1.0: GSM modem (1-port) converter detected
[35097.755742] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
[35097.761468] option 3-1:1.1: GSM modem (1-port) converter detected
[35097.761610] usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
[/code]
Now you want to unbind the option driver from interface #1 and instead bind the qmi_wwan driver to it.

echo "3-1:1.1" > /sys/bus/usb/drivers/option/unbind

echo "161c f101" > /sys/bus/usb/drivers/qmi_wwan/new_id


If interface #1 is intended for qmi_wwan then you should be able to communicate with it.
You must have libqmi installed together with ModemManager and Network Manager.
Your dmesg log should show qmi_wwan and cdc_wdm binding to interface #1
I cannot write to these files. permission denied :(
I will reboot and retry

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: "LTE MIFI" won't switch modes

Post by LOM » 16 May 2019, 12:30

You must have the modules option.ko and qmi_wwan.ko loaded in memory before you use their new_id functions!

modprobe option
modprobe qmi_wwan
modprobe cdc_wdm

then
lsmod to confirm they are loaded.

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 12:35

LOM wrote:You must have the modules option.ko and qmi_wwan.ko loaded in memory before you use their new_id functions!

modprobe option
modprobe qmi_wwan
modprobe cdc_wdm

then
lsmod to confirm they are loaded.

I cannot complete this stage

Code: Select all

echo "3-1:1.1" > /sys/bus/usb/drivers/option/unbind

echo "161c f101" > /sys/bus/usb/drivers/qmi_wwan/new_id
as permission is denied.



lsmod shows

Code: Select all

$ sudo su
root@novo:/home/roger# modprobe option
root@novo:/home/roger# modprobe qmi_wwan
root@novo:/home/roger# modprobe cdc_wdm
root@novo:/home/roger# lsmod
Module                  Size  Used by
qmi_wwan               32768  0
cdc_wdm                20480  1 qmi_wwan
usbnet                 45056  1 qmi_wwan
mii                    16384  1 usbnet
option                 53248  0
usb_wwan               20480  1 option
usbserial              45056  2 option,usb_wwan
nls_iso8859_1          16384  1
rfcomm                 77824  16
md4                    16384  0
nls_utf8               16384  2
cifs                  720896  4
fscache                61440  1 cifs
ccm                    20480  6
bnep                   20480  2
nvidia_uvm            757760  0
wmi_bmof               16384  0
binfmt_misc            20480  1
intel_rapl             20480  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
arc4                   16384  2
kvm_intel             204800  0
uvcvideo               86016  0
videobuf2_vmalloc      16384  1 uvcvideo
snd_hda_codec_conexant    24576  1
kvm                   593920  1 kvm_intel
snd_hda_codec_generic    73728  1 snd_hda_codec_conexant
videobuf2_memops       16384  1 videobuf2_vmalloc
irqbypass              16384  1 kvm
iwldvm                229376  0
crct10dif_pclmul       16384  0
crc32_pclmul           16384  0
btusb                  45056  0
btrtl                  16384  1 btusb
ghash_clmulni_intel    16384  0
mac80211              778240  1 iwldvm
videobuf2_v4l2         24576  1 uvcvideo
btbcm                  16384  1 btusb
pcbc                   16384  0
nvidia_drm             40960  2
videobuf2_core         40960  2 uvcvideo,videobuf2_v4l2
btintel                16384  1 btusb
nvidia_modeset       1048576  5 nvidia_drm
snd_hda_intel          40960  3
videodev              184320  3 uvcvideo,videobuf2_core,videobuf2_v4l2
bluetooth             548864  41 btrtl,btintel,bnep,btbcm,rfcomm,btusb
aesni_intel           188416  5
snd_hda_codec         126976  3 snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec_generic
media                  40960  2 uvcvideo,videodev
ecdh_generic           24576  1 bluetooth
nvidia              14376960  193 nvidia_modeset,nvidia_uvm
aes_x86_64             20480  1 aesni_intel
snd_hda_core           81920  4 snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec,snd_hda_codec_generic
crypto_simd            16384  1 aesni_intel
snd_hwdep              20480  1 snd_hda_codec
glue_helper            16384  1 aesni_intel
iwlwifi               278528  1 iwldvm
snd_pcm                98304  3 snd_hda_intel,snd_hda_codec,snd_hda_core
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel,aesni_intel
snd_seq_midi           16384  0
joydev                 24576  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            32768  1 snd_seq_midi
input_leds             16384  0
intel_cstate           20480  0
intel_rapl_perf        16384  0
serio_raw              16384  0
snd_seq                65536  2 snd_seq_midi_event,snd_seq_midi
cfg80211              622592  3 iwlwifi,mac80211,iwldvm
thinkpad_acpi          94208  1
ipmi_devintf           20480  0
ipmi_msghandler        53248  2 nvidia,ipmi_devintf
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
nvram                  16384  1 thinkpad_acpi
snd_timer              32768  2 snd_seq,snd_pcm
lpc_ich                24576  0
snd                    81920  17 snd_hda_intel,snd_hwdep,snd_hda_codec_conexant,snd_seq,snd_hda_codec,snd_timer,thinkpad_acpi,snd_rawmidi,snd_hda_codec_generic,snd_seq_device,snd_pcm
shpchp                 36864  0
mei_me                 40960  0
mei                    90112  1 mei_me
soundcore              16384  1 snd
wmi                    24576  1 wmi_bmof
mac_hid                16384  0
sch_fq_codel           20480  6
parport_pc             36864  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
ip_tables              28672  0
x_tables               40960  1 ip_tables
autofs4                40960  2
btrfs                1122304  0
xor                    24576  1 btrfs
zstd_compress         163840  1 btrfs
raid6_pq              114688  1 btrfs
dm_mirror              24576  0
dm_region_hash         20480  1 dm_mirror
dm_log                 20480  2 dm_mirror,dm_region_hash
mmc_block              36864  3
i915                 1617920  3
i2c_algo_bit           16384  1 i915
drm_kms_helper        167936  2 i915,nvidia_drm
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
firewire_ohci          40960  0
fb_sys_fops            16384  1 drm_kms_helper
psmouse               147456  0
e1000e                249856  0
sdhci_pci              28672  0
ahci                   36864  7
firewire_core          65536  1 firewire_ohci
drm                   401408  6 i915,nvidia_drm,drm_kms_helper
sdhci                  49152  1 sdhci_pci
libahci                32768  1 ahci
crc_itu_t              16384  1 firewire_core
ptp                    20480  1 e1000e
pps_core               20480  1 ptp
video                  40960  2 thinkpad_acpi,i915

wodgey
Posts: 26
Joined: 16 May 2019, 08:14

Re: "LTE MIFI" won't switch modes

Post by wodgey » 16 May 2019, 12:42

wodgey wrote:I cannot complete this stage

Code: Select all

echo "3-1:1.1" > /sys/bus/usb/drivers/option/unbind

echo "161c f101" > /sys/bus/usb/drivers/qmi_wwan/new_id
as permission is denied.

I have this directory structure

Code: Select all

roger@novo:/sys/bus/usb/drivers$ ls
btusb  cdc_wdm  hub  option  qmi_wwan  usb  usbfs  usbserial_generic  uvcvideo

Post Reply