LT4120 modem does not work

How to make LT4120 modem work with OpenWrt? Other modems (EM7455 and L850-GL) work fine. Additionally the following packages were installed:

stty
kmod-usb-serial-qualcomm
luci-proto-qmi
kmod-usb-net-rndis
usb-modeswitch

Now the modem is without sim-card. Here is the OpenWrt log:

> Tue Feb 13 15:08:02 2024 kern.info kernel: [  519.201672] usb 1-1: new high-speed USB device number 4 using xhci-mtk
> Tue Feb 13 15:08:02 2024 kern.info kernel: [  519.432986] cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-1e1c0000.xhci-1, CDC Ethernet Device, ba:06:b7:c8:25:f0
> Tue Feb 13 15:08:02 2024 kern.info kernel: [  519.709768] cdc_ether 1-1:2.0 usb0: unregister 'cdc_ether' usb-1e1c0000.xhci-1, CDC Ethernet Device
> Tue Feb 13 15:08:03 2024 kern.warn kernel: [  519.833334] usb 1-1: usbfs: process 6444 (usbmode) did not claim interface 1 before use
> Tue Feb 13 15:08:03 2024 kern.warn kernel: [  520.044234] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
> Tue Feb 13 15:08:03 2024 kern.warn kernel: [  520.152477] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
> Tue Feb 13 15:08:03 2024 kern.warn kernel: [  520.283816] usb 1-1: usbfs: process 6613 (usbmode) did not claim interface 1 before use
> Tue Feb 13 15:08:03 2024 kern.warn kernel: [  520.494852] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
> Tue Feb 13 15:08:03 2024 kern.warn kernel: [  520.603163] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
> Tue Feb 13 15:08:04 2024 kern.warn kernel: [  520.817807] usb 1-1: usbfs: process 6768 (usbmode) did not claim interface 1 before use
> Tue Feb 13 15:08:04 2024 kern.warn kernel: [  521.028585] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
> Tue Feb 13 15:08:04 2024 kern.warn kernel: [  521.136795] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0

And here is the log from the Rooter firmware. Everything seems to be working correctly here (QMI + AT-port):


> Tue Aug 31 22:22:50 2021 kern.info kernel: [  178.735374] usb 1-1: new high-speed USB device number 2 using xhci-mtk
> Tue Aug 31 22:22:50 2021 kern.info kernel: [  178.930144] cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-1e1c0000.xhci-1, CDC Ethernet Device, 8a:c6:84:17:bc:83
> Tue Aug 31 22:22:50 2021 user.notice usb-modeswitch : Device 1-1
> Tue Aug 31 22:22:50 2021 user.notice usb-modeswitch : Add : 1-1: Manufacturer=HP Product=HP_lt4120_Snapdragon_X5_LTE Serial=0123456789ABCDEF 03f0 9d1d
> Tue Aug 31 22:22:50 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:22:50 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: * Start of Modem Detection and Connection Information
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: * Product=HP_lt4120_Snapdragon_X5_LTE 03f0 9d1d
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: Found Modem at 1-1 in Cfg#= 2 from 3 available
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: * Found MBIM Modem at 1-1 with Config of 3
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:22:51 2021 user.notice usb-modeswitch 1: Switching Modem at 1-1 to QMI by selecting Cfg# 1
> Tue Aug 31 22:22:51 2021 kern.info kernel: [  180.411186] cdc_ether 1-1:2.0 usb0: unregister 'cdc_ether' usb-1e1c0000.xhci-1, CDC Ethernet Device
> Tue Aug 31 22:22:52 2021 kern.info kernel: [  181.530466] option 1-1:1.0: GSM modem (1-port) converter detected
> Tue Aug 31 22:22:52 2021 kern.info kernel: [  181.537418] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.547537] qmi_wwan 1-1:1.1: cdc-wdm0: USB WDM device
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.554846] qmi_wwan 1-1:1.1 wwan0: register 'qmi_wwan' at usb-1e1c0000.xhci-1, WWAN/QMI device, 3a:0f:a4:6b:d4:db
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.566668] option 1-1:1.2: GSM modem (1-port) converter detected
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.573527] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.582053] option 1-1:1.3: GSM modem (1-port) converter detected
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.588890] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.597417] option 1-1:1.4: GSM modem (1-port) converter detected
> Tue Aug 31 22:22:53 2021 kern.info kernel: [  181.604450] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: * Modem at 1-1 switched to : 03f0:9d1d
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:23:03 2021 user.notice Protofind 03f0/9d1d: Number Interfaces w/drivers : 5
> Tue Aug 31 22:23:03 2021 user.notice Protofind 03f0/9d1d: Driver Name : 0 option
> Tue Aug 31 22:23:03 2021 user.notice Protofind 03f0/9d1d: Driver Name : 1 qmi_wwan
> Tue Aug 31 22:23:03 2021 user.notice Protofind 03f0/9d1d: Driver Name : 2 option
> Tue Aug 31 22:23:03 2021 user.notice Protofind 03f0/9d1d: Driver Name : 3 option
> Tue Aug 31 22:23:03 2021 user.notice Protofind 03f0/9d1d: Driver Name : 4 option
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:23:03 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:23:04 2021 user.notice usb-modeswitch 1: * ProtoFind returns : 2
> Tue Aug 31 22:23:04 2021 user.notice usb-modeswitch 1: *
> Tue Aug 31 22:23:04 2021 user.notice usb-modeswitch 1: *****************************************************************
> Tue Aug 31 22:23:04 2021 user.notice usb-modeswitch 1: Found Modem 1
> Tue Aug 31 22:23:04 2021 user.notice usb-modeswitch 1: Connecting a QMI Modem
> Tue Aug 31 22:23:04 2021 user.notice Create Connection 1: Start Connection
> Tue Aug 31 22:23:04 2021 user.notice Create Connection 1: Modem 1 WDM Device : cdc-wdm0
> Tue Aug 31 22:23:04 2021 user.notice Create Connection 1: Modem
> Tue Aug 31 22:23:05 2021 user.notice Create Connection 1: Start QMI Connection
> Tue Aug 31 22:23:10 2021 user.notice Create Connection 1: Modem 1 QMI Comm Port : /dev/ttyUSB1
> Tue Aug 31 22:23:10 2021 user.notice PreConnect 1: Running PreConnect script
> Tue Aug 31 22:23:25 2021 user.notice Get Profile 1: Modem 1 is  QUALCOMM INCORPORATED 4087
> Tue Aug 31 22:23:25 2021 user.notice Get Profile 1: Warning: IMSI cannot be read - SIM card missing or locked?
> Tue Aug 31 22:23:25 2021 user.notice Get Profile 1: Default Profile Used
> Tue Aug 31 22:23:27 2021 user.notice SimLock 1: No SIM
> Tue Aug 31 22:23:27 2021 user.notice Create Connection 1:  SIM Error

Hi.
It works.
Just make a quick search for LT4120 over the forum.
user @Lebedev is the tip.

Yes, it works (MBIM without at-port). Except I still need an at-port, but I don't have one.

Tue Feb 13 19:27:37 2024 kern.info kernel: [   20.652819] usb 1-1: new high-speed USB device number 2 using xhci-mtk
Tue Feb 13 19:27:37 2024 kern.info kernel: [   20.897694] cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-1e1c0000.xhci-1, CDC Ethernet Device, 06:6b:f2:ce:d6:fc
Tue Feb 13 19:27:38 2024 kern.warn kernel: [   21.326189] usb 1-1: usbfs: interface 0 claimed by cdc_ether while 'usbmode' sets config #3
Tue Feb 13 19:27:38 2024 kern.info kernel: [   21.334738] cdc_ether 1-1:2.0 usb0: unregister 'cdc_ether' usb-1e1c0000.xhci-1, CDC Ethernet Device
Tue Feb 13 19:27:38 2024 kern.err kernel: [   21.414887] xhci-mtk 1e1c0000.xhci: drop_ep_quirk high-speed ep2in intr, mpkt:16, interval:9/32ms
Tue Feb 13 19:27:38 2024 kern.info kernel: [   21.544224] cdc_mbim 1-1:3.0: cdc-wdm0: USB WDM device
Tue Feb 13 19:27:38 2024 kern.info kernel: [   21.551054] cdc_mbim 1-1:3.0 wwan0: register 'cdc_mbim' at usb-1e1c0000.xhci-1, CDC MBIM, e6:11:0a:8e:cd:09

How can I switch this modem to QMI mode with at-port? In Rooter firmware it is possible, and in OpenWrt it is also must be possible.

You need to switch it to Configuration #1.
See LTE Modem Firmware (QMI)

Then use https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle

"config: 1" and "mode": "QMI" are not working.

Tue Feb 13 21:33:40 2024 kern.info kernel: [ 7357.912017] usb 1-1: new high-speed USB device number 6 using xhci-mtk
Tue Feb 13 21:33:40 2024 kern.info kernel: [ 7358.140364] cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-1e1c0000.xhci-1, CDC Ethernet Device, 5a:1e:f2:ff:b2:ca
Tue Feb 13 21:33:40 2024 kern.info kernel: [ 7358.417276] cdc_ether 1-1:2.0 usb0: unregister 'cdc_ether' usb-1e1c0000.xhci-1, CDC Ethernet Device
Tue Feb 13 21:33:40 2024 kern.warn kernel: [ 7358.503434] usb 1-1: usbfs: process 17980 (usbmode) did not claim interface 1 before use
Tue Feb 13 21:33:40 2024 kern.warn kernel: [ 7358.716473] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
Tue Feb 13 21:33:40 2024 kern.warn kernel: [ 7358.824813] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #1
Tue Feb 13 21:33:41 2024 kern.warn kernel: [ 7358.994341] usb 1-1: usbfs: process 18149 (usbmode) did not claim interface 1 before use
Tue Feb 13 21:33:41 2024 kern.warn kernel: [ 7359.205216] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
Tue Feb 13 21:33:41 2024 kern.warn kernel: [ 7359.313571] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #1
Tue Feb 13 21:33:41 2024 kern.warn kernel: [ 7359.572446] usb 1-1: usbfs: process 18304 (usbmode) did not claim interface 1 before use
Tue Feb 13 21:33:41 2024 kern.warn kernel: [ 7359.783492] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
Tue Feb 13 21:33:42 2024 kern.warn kernel: [ 7359.891684] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #1
Tue Feb 13 21:35:13 2024 kern.info kernel: [ 7451.267012] usb 1-1: USB disconnect, device number 6
Tue Feb 13 21:35:13 2024 kern.err kernel: [ 7451.272988] xhci-mtk 1e1c0000.xhci: drop_ep_quirk high-speed ep2in intr, mpkt:16, interval:9/32ms


Tue Feb 13 21:35:31 2024 kern.info kernel: [ 7469.381401] usb 1-1: new high-speed USB device number 7 using xhci-mtk
Tue Feb 13 21:35:31 2024 kern.info kernel: [ 7469.614540] cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-1e1c0000.xhci-1, CDC Ethernet Device, a6:75:e5:13:9a:a3
Tue Feb 13 21:35:32 2024 kern.info kernel: [ 7469.878514] cdc_ether 1-1:2.0 usb0: unregister 'cdc_ether' usb-1e1c0000.xhci-1, CDC Ethernet Device
Tue Feb 13 21:35:32 2024 kern.warn kernel: [ 7469.952461] usb 1-1: usbfs: process 18706 (usbmode) did not claim interface 1 before use
Tue Feb 13 21:35:32 2024 kern.warn kernel: [ 7470.302381] usb 1-1: usbfs: process 18826 (usbmode) did not claim interface 1 before use
Tue Feb 13 21:35:32 2024 kern.warn kernel: [ 7470.669817] usb 1-1: usbfs: process 18928 (usbmode) did not claim interface 1 before use
Tue Feb 13 21:35:33 2024 kern.warn kernel: [ 7471.043697] usb 1-1: usbfs: process 19033 (usbmode) did not claim interface 1 before use
at^slmode?
^SLMODE:30-LTE Only
OK

at^setmode? //From the manual for LT4220
ERROR

at^setmode=2
ERROR

ati
Manufacturer: QUALCOMM INCORPORATED
Model: 4087
Revision: T77W595.F0.0.0.6.5.GC.028  1  [Jul 06 2016 23:00:00]
SVN: 19
IMEI: 354577091513647
+GCAP: +CGSM
OK

Disable usb_modeswitch and switch manually (to cfg 1) as shown here: HP LT4211 Support - #19 by AndrewZ

Wed Feb 14 07:27:10 2024 kern.info kernel: [ 262.247856] usb 1-1: new high-speed USB device number 2 using xhci-mtk

echo -1 >/sys/bus/usb/devices/1-1/bConfigurationValue
echo 1 >/sys/bus/usb/devices/1-1/bConfigurationValue
Wed Feb 14 07:37:43 2024 kern.info kernel: [  895.352120] usb 1-1: new high-speed USB device number 3 using xhci-mtk
Wed Feb 14 07:39:14 2024 kern.err kernel: [  986.198269] xhci-mtk 1e1c0000.xhci: drop_ep_quirk high-speed ep2in intr, mpkt:16, interval:9/32ms
Wed Feb 14 07:39:30 2024 kern.err kernel: [ 1002.600699] xhci-mtk 1e1c0000.xhci: drop_ep_quirk high-speed ep3in intr, mpkt:8, interval:9/32ms
Wed Feb 14 07:39:30 2024 kern.info kernel: [ 1002.611843] qmi_wwan 1-1:1.1: cdc-wdm0: USB WDM device
Wed Feb 14 07:39:30 2024 kern.info kernel: [ 1002.618814] qmi_wwan 1-1:1.1 wwan0: register 'qmi_wwan' at usb-1e1c0000.xhci-1, WWAN/QMI device, 26:57:a8:04:92:2c
root@OpenWrt:~# ls /dev/tty*
/dev/tty     /dev/ttyS10  /dev/ttyS13  /dev/ttyS2   /dev/ttyS5   /dev/ttyS8
/dev/ttyS0   /dev/ttyS11  /dev/ttyS14  /dev/ttyS3   /dev/ttyS6   /dev/ttyS9
/dev/ttyS1   /dev/ttyS12  /dev/ttyS15  /dev/ttyS4   /dev/ttyS7
root@OpenWrt:~#

There are no at-ports.

root@OpenWrt:~# cat /sys/kernel/debug/usb/devices

T:  Bus=01 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= 5.15
S:  Manufacturer=Linux 5.15.137 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=1e1c0000.xhci
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=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  3
P:  Vendor=03f0 ProdID=9d1d Rev= 2.28
S:  Manufacturer=HP
S:  Product=HP lt4120 Snapdragon X5 LTE
S:  SerialNumber=0123456789ABCDEF
C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=89(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C:  #Ifs= 2 Cfg#= 2 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=
E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C:  #Ifs= 3 Cfg#= 3 Atr=e0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=
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= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=32ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1
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= 5.15
S:  Manufacturer=Linux 5.15.137 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=1e1c0000.xhci
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
root@OpenWrt:~# 

03f0:9d1d is not known to option driver, so you need to add it manually:
echo "03f0 9d1d" > /sys/bus/usb-serial/drivers/option1/new_id

What to specify instead of "???" in the first line?

[ "${PRODUCT}" = "03f0/9d1d/???" ] && {

	logger -t hotplug "/sys/bus/usb/devices/${DEVICENAME}/bConfigurationValue"
	echo 1 > /sys/bus/usb/devices/"${DEVICENAME}"/bConfigurationValue
	echo "03f0 9d1d" > /sys/bus/usb-serial/drivers/option1/new_id
 }

Why 03f0:9d1d is not known to option driver? Bug?

What if I also need to use a modem like E3372 or MF79U? Do I have to install and remove usb_modeswitch all the time? In Rooter firmware usb_modeswitch does not interfere with LT4120 operation (log in the first post).

Because no one has been interested enough to invest time in testing and submitting a patch for the driver.

Which is no surprise. There are probably very few users running Linux on a host with that modem, given that it (officially, first hand) only can be bought as part of a laptop with Windows. And it does mostly work without the option driver, so most of those few users are probably happy. Or at least not aware that they should be unhappy.

A bit surprising that the modem has qmi_wwan support though. Most QMI modems are usually added to both drivers at the same time. But it's up to the user submitting the patch(es). And there were no USB descriptors or any oher info about the modem in the qmi_wwan patch, so we'd have to guess that the option patch was missing:

Not that it would have mattered. Patches are always handled individually for each of these drivers since there are maintained in different subsystems (net and usb).

228 :slight_smile:

/etc/hotplug.d/usb/11-LT4120.sh

if echo "${PRODUCT}" | grep -E -o -q -i "3f0/9d1d"; then
         if ! grep -E -o -q -i "1" "/sys/bus/usb/devices/${DEVICENAME}/bConfigurationValue"; then
                 logger -t hotplug "/sys/bus/usb/devices/${DEVICENAME}/bConfigurationValue"
                 echo 1 > /sys/bus/usb/devices/"${DEVICENAME}"/bConfigurationValue
         fi
         if ! grep -E -o -q -i "03f0 9d1d" "/sys/bus/usb-serial/drivers/option1/new_id"; then
                 echo "03f0 9d1d" > /sys/bus/usb-serial/drivers/option1/new_id
         fi
 fi

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