[solved] Micromax MMX352G 3G Modem on WNDR4700

I want use my "Micromax MMX352G 3G Modem" with "BSNL 3G SIM" but I am unable to connect the modem for internet.

Hostname MANIROUTER
Model Netgear WNDR4700/WNDR4720 Series
Architecture APM821XX
Firmware Version OpenWrt 19.07.1 r10911-c155900f66 / LuCI openwrt-19.07 branch git-20.039.36269-8b16835

Help-page: https://openwrt.org/docs/guide-user/network/wan/wwan/3gdongle

This is how I connect on windows https://www.youtube.com/watch?v=_4YYVy0-m7A

# usbmode -l
Found device: 1c9e:f000 (Manufacturer: "USB Modem", Product: "USB Modem", Serial: "1234567890ABCDEF")
#usbmode -s -v
Failed to send switch message
#dmesg | tail -4
[ 1015.477053] usb 2-2.1: USB disconnect, device number 3
[ 1022.468725] usb 2-2.1: new high-speed USB device number 8 using xhci_hcd
[ 1022.563403] usb-storage 2-2.1:1.0: USB Mass Storage device detected
[ 1022.578479] scsi host1: usb-storage 2-2.1:1.0
# dmesg | grep serial
[    0.155110] 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 37, base_baud = 347222) is a TI16750
[   11.430539] usbcore: registered new interface driver usbserial
[   11.436428] usbcore: registered new interface driver usbserial_generic
[   11.443014] usbserial: USB Serial support registered for generic
[   11.783420] usbserial: USB Serial support registered for GSM modem (1-port)
# lsusb -tv
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 8, If 0, Class=Mass Storage, Driver=, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M

I am unable to see any device like /dev/ttyUSB? only delvice like /dev/ttyS[0-15]

Micromax 352G Data Card (White)

Device Throughput: Upto 7.2 Mbps
Expandable Memory Capacity: 8 GB
6 Pin 3GPP 31.101, 3GPP 31.102
SMS Support

Model Name: 352G
Sales Package: USB Modem, Quick start guide
Device Throughput: Upto 7.2 Mbps
Voice Support: No Call Support
Expandable Memory Capacity: 8 GB
Phone Book Support: Yes
SMS Support: Yes
Memory Card Slot Support: microSD Card
Operating System: Windows 2000 SP4, Windows XP SP2, Windows Vista, Windows 7, Mac OS X 10.4.9 or higher
Power Souce: USB
GPRS: Class 10, 85.6 Kbps
External Interface: USB 2.0

Product Details:
Color: White
SIM or UIM Support: 6 Pin 3GPP 31.101, 3GPP 31.102
Indicator: RGB LED
Network Type: GSM, EDGE, UMTS
Form Factor: Rotating USB dongle
Antenna Type: Internal
UMTS 3G BW: 2100
Edge: Class 12, 237 Kbps
HSUPA: 3GPP Release 6, 5.76 Mbps UL
Other System Requirements: AT Interface: 3GPP TS27.005, 3GPP TS27.007 supported
Installation Features: Zero-CD installation
Other Features: APN Auto management supported, Complete session statistics supported, Field test data supported

Please help me.

On ubuntu 18.04.3 LTS I connected

[  186.516168] usb 2-1: new high-speed USB device number 6 using xhci_hcd
[  186.666530] usb 2-1: New USB device found, idVendor=1c9e, idProduct=f000
[  186.666548] usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[  186.666552] usb 2-1: Product: USB Modem
[  186.666554] usb 2-1: Manufacturer: USB Modem
[  186.666557] usb 2-1: SerialNumber: 1234567890ABCDEF
[  186.706973] usb-storage 2-1:1.0: USB Mass Storage device detected
[  186.707881] scsi host4: usb-storage 2-1:1.0
[  186.708969] usbcore: registered new interface driver usb-storage
[  186.711189] usbcore: registered new interface driver uas
#lsusb
Bus 002 Device 010: ID 1c9e:9605 OMEGA TECHNOLOGY
#lsusb -vt 
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
    |__ Port 1: Dev 10, If 0, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 10, If 1, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 10, If 2, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 10, If 3, Class=Vendor Specific Class, Driver=option, 480M
    |__ Port 1: Dev 10, If 4, Class=Mass Storage, Driver=usb-storage, 480M

https://www.draisberghof.de/usb_modeswitch/device_reference.txt

#cat /etc/usb_modeswitch.d/1c9e\:f000
########################################################
# Micromax MMX 300G BSNL 3G Modem

DefaultVendor=0x1c9e
DefaultProduct=0xf000

TargetVendor=0x1c9e
TargetProductList="9063,9603,9000,9605"

CheckSuccess=20

MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
#dmesg
[ 1994.938764] usb 2-1: new high-speed USB device number 17 using xhci_hcd
[ 1995.089249] usb 2-1: New USB device found, idVendor=1c9e, idProduct=f000
[ 1995.089253] usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 1995.089255] usb 2-1: Product: USB Modem
[ 1995.089256] usb 2-1: Manufacturer: USB Modem
[ 1995.089258] usb 2-1: SerialNumber: 1234567890ABCDEF
[ 1995.091810] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 1995.092804] scsi host4: usb-storage 2-1:1.0
[ 1996.120217] scsi 4:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[ 1996.122812] sr 4:0:0:0: [sr0] scsi-1 drive
[ 1996.123296] sr 4:0:0:0: Attached scsi CD-ROM sr0
[ 1996.125954] sr 4:0:0:0: Attached scsi generic sg2 type 5
[ 1998.187804] usb 2-1: USB disconnect, device number 17
[ 1998.566045] usb 2-1: new high-speed USB device number 18 using xhci_hcd
[ 1998.716963] usb 2-1: New USB device found, idVendor=1c9e, idProduct=9605
[ 1998.716966] usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 1998.716968] usb 2-1: Product: USB Modem
[ 1998.716969] usb 2-1: Manufacturer: USB Modem
[ 1998.716971] usb 2-1: SerialNumber: 1234567890ABCDEF
[ 1999.331174] option 2-1:1.0: GSM modem (1-port) converter detected
[ 1999.331487] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1999.331996] option 2-1:1.1: GSM modem (1-port) converter detected
[ 1999.332245] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1999.332665] option 2-1:1.2: GSM modem (1-port) converter detected
[ 1999.332924] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 1999.333338] option 2-1:1.3: GSM modem (1-port) converter detected
[ 1999.333572] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 1999.333963] usb-storage 2-1:1.4: USB Mass Storage device detected
[ 1999.339354] scsi host4: usb-storage 2-1:1.4
[ 2000.356726] scsi 4:0:0:0: Direct-Access     USBModem Disk             2.31 PQ: 0 ANSI: 2
[ 2000.357636] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 2000.363623] sd 4:0:0:0: [sdc] Attached SCSI removable disk

Now working on both windows 10 64bit, and ubuntu 18.04.3 x64

looks like we have to install "kmod-usb-storage-uas" form software channel

installed kmod-usb-storage-uas but still not working

My converted custom json from this.

{
	"messages" : [
		"55534243123456788000000080000606f50402527000000000000000000000",
],
"devices" : {
		"1c9e:f000": {
			"*": {
				"t_vendor": 7326,
				"t_product": [ 9063, 9603, 9000, 9605 ],
				"msg": [ 0 ]
			}
		},
	}
}

form ubuntu I found that
1c9e:f000 (Before ejecting) 1c9e:9605 (After ejecting),

# usb-devices
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1c9e ProdID=9605 Rev=00.00
S:  Manufacturer=USB Modem
S:  Product=USB Modem
S:  SerialNumber=1234567890ABCDEF
C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

So far unable to work in LEDE/OpenWRT 19.0.1; but working on ubuntu 18.04.3 LTS and Windows XP/7/8/10

@hnyman help me.

Open Host Controller Interface (OHCI) is an open standard.
Universal Host Controller Interface (UHCI) is a proprietary interface created by Intel for USB 1.x (full and low speeds).
The Enhanced Host Controller Interface (EHCI) is a high-speed controller standard applicable to USB 2.0. UHCI- and OHCI-based systems, as existed previously, entailed greater complexity and costs than necessary.
Extensible Host Controller Interface (xHCI) is the newest host controller standard that improves speed, power efficiency and virtualization over its predecessors.
Virtual Host Controller Interface (VHCI) refers to a virtual controller that may export virtual USB devices not backed by physical devices. For instance, on Linux, VHCI controllers are used to expose USB devices from other machines, attached using the USB/IP protocol.

Installed
kmod-usb-ehci kmod-usb-ohci kmod-usb2
but still not working

should be like

Port 1: Dev 8, If 0, Class=Mass Storage, Driver=usb-storage, 480M

but unable to so ...

From what I remember, I only had to install 3G protocol and the USB drivers and my 3G USB was successfully identified and started working. I did this in v15.05.x so I'm not sure why this is not working for you.

Will you convert the below usb_modeswitch.d to equivalent usbmode-json

Once again removing the file /etc/usb_modeswitch.d/1c9e\:f000 resulted in unable to detect as modem, and out put as shown below on Ubuntu

# dmesg
[13938.496998] usb 2-3: new high-speed USB device number 21 using xhci_hcd
[13938.647731] usb 2-3: New USB device found, idVendor=1c9e, idProduct=f000
[13938.647737] usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[13938.647741] usb 2-3: Product: USB Modem
[13938.647744] usb 2-3: Manufacturer: USB Modem
[13938.647746] usb 2-3: SerialNumber: 1234567890ABCDEF
[13938.650424] usb-storage 2-3:1.0: USB Mass Storage device detected
[13938.651229] scsi host4: usb-storage 2-3:1.0
[13939.670912] scsi 4:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[13939.673726] sr 4:0:0:0: [sr0] scsi-1 drive
[13939.674248] sr 4:0:0:0: Attached scsi CD-ROM sr0
[13939.674603] sr 4:0:0:0: Attached scsi generic sg2 type 5

while current OpenWrt output on RasPi2v1.1 (yes I have put WNDR4700 aside for while, it is backbone for my home network)

# dmesg
[  875.621011] usb 1-1.2: new high-speed USB device number 7 using dwc_otg
[  875.763362] usb 1-1.2: New USB device found, idVendor=1c9e, idProduct=f000
[  875.773434] usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[  875.783905] usb 1-1.2: Product: USB Modem
[  875.790976] usb 1-1.2: Manufacturer: USB Modem
[  875.798390] usb 1-1.2: SerialNumber: 1234567890ABCDEF
[  875.809110] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[  875.818372] scsi host0: usb-storage 1-1.2:1.0

after restoring file /etc/usb_modeswitch.d/1c9e\:f000 on Ubuntu resulted in proper functioning of USB 3G Modem

# dmesg
[14555.470281] usb 2-3: new high-speed USB device number 24 using xhci_hcd
[14555.620930] usb 2-3: New USB device found, idVendor=1c9e, idProduct=f000
[14555.620936] usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[14555.620939] usb 2-3: Product: USB Modem
[14555.620942] usb 2-3: Manufacturer: USB Modem
[14555.620945] usb 2-3: SerialNumber: 1234567890ABCDEF
[14555.625885] usb-storage 2-3:1.0: USB Mass Storage device detected
[14555.626336] scsi host4: usb-storage 2-3:1.0
[14556.636712] scsi 4:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[14556.639813] sr 4:0:0:0: [sr0] scsi-1 drive
[14556.640283] sr 4:0:0:0: Attached scsi CD-ROM sr0
[14556.640579] sr 4:0:0:0: Attached scsi generic sg2 type 5
[14558.853062] usb 2-3: USB disconnect, device number 24
[14559.225179] usb 2-3: new high-speed USB device number 25 using xhci_hcd
[14559.371226] usb 2-3: New USB device found, idVendor=1c9e, idProduct=9605
[14559.371231] usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[14559.371234] usb 2-3: Product: USB Modem
[14559.371236] usb 2-3: Manufacturer: USB Modem
[14559.371238] usb 2-3: SerialNumber: 1234567890ABCDEF
[14560.000540] option 2-3:1.0: GSM modem (1-port) converter detected
[14560.000911] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB0
[14560.001523] option 2-3:1.1: GSM modem (1-port) converter detected
[14560.001758] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB1
[14560.002173] option 2-3:1.2: GSM modem (1-port) converter detected
[14560.002484] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB2
[14560.002913] option 2-3:1.3: GSM modem (1-port) converter detected
[14560.003148] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB3
[14560.003490] usb-storage 2-3:1.4: USB Mass Storage device detected
[14560.004204] scsi host4: usb-storage 2-3:1.4

What is missing on Openwrt is phase2 and phase3 below:
[phase1-ok_on_opewrt]

[  875.621011] usb 1-1.2: new high-speed USB device number 7 using dwc_otg
[  875.763362] usb 1-1.2: New USB device found, idVendor=1c9e, idProduct=f000
[  875.773434] usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[  875.783905] usb 1-1.2: Product: USB Modem
[  875.790976] usb 1-1.2: Manufacturer: USB Modem
[  875.798390] usb 1-1.2: SerialNumber: 1234567890ABCDEF
[  875.809110] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[  875.818372] scsi host0: usb-storage 1-1.2:1.0

{phase2-to-achive}

[15022.020948] scsi 4:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[15022.023647] sr 4:0:0:0: [sr0] scsi-1 drive
[15022.026331] sr 4:0:0:0: Attached scsi CD-ROM sr0
[15022.028136] sr 4:0:0:0: Attached scsi generic sg2 type 5
[15024.246571] usb 2-3: USB disconnect, device number 26
[15024.628309] usb 2-3: new high-speed USB device number 27 using xhci_hcd
[15024.780983] usb 2-3: New USB device found, idVendor=1c9e, idProduct=9605
[15024.780988] usb 2-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[15024.780991] usb 2-3: Product: USB Modem
[15024.780994] usb 2-3: Manufacturer: USB Modem
[15024.780996] usb 2-3: SerialNumber: 1234567890ABCDEF

{phase3--to-achive}

[15025.391745] option 2-3:1.0: GSM modem (1-port) converter detected
[15025.392062] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB0
[15025.392598] option 2-3:1.1: GSM modem (1-port) converter detected
[15025.393044] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB1
[15025.393466] option 2-3:1.2: GSM modem (1-port) converter detected
[15025.393780] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB2
[15025.394206] option 2-3:1.3: GSM modem (1-port) converter detected
[15025.394516] usb 2-3: GSM modem (1-port) converter now attached to ttyUSB3
[15025.394857] usb-storage 2-3:1.4: USB Mass Storage device detected
[15025.395669] scsi host4: usb-storage 2-3:1.4
[15026.406830] scsi 4:0:0:0: Direct-Access     USBModem Disk             2.31 PQ: 0 ANSI: 2
[15026.407618] sd 4:0:0:0: Attached scsi generic sg2 type 0
[15026.412609] sd 4:0:0:0: [sdc] Attached SCSI removable disk

kernel missing some usb-storage module, but I don't which one to install from software.

On RasPi2Bv1.1

cat /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#= 13 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1c9e ProdID=f000 Rev= 0.00
S:  Manufacturer=USB Modem
S:  Product=USB Modem
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

On Ubuntu during working condition

cat /sys/kernel/debug/usb/devices
T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 29 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1c9e ProdID=9605 Rev= 0.00
S:  Manufacturer=USB Modem
S:  Product=USB Modem
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
# cat /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 10 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1c9e ProdID=f000 Rev= 0.00
S:  Manufacturer=USB Modem
S:  Product=USB Modem
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

# demesg | tail -9
[ 1455.034835] usb 1-1.4: new high-speed USB device number 10 using dwc_otg
[ 1455.177132] usb 1-1.4: New USB device found, idVendor=1c9e, idProduct=f000
[ 1455.187069] usb 1-1.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 1455.197485] usb 1-1.4: Product: USB Modem
[ 1455.204469] usb 1-1.4: Manufacturer: USB Modem
[ 1455.211859] usb 1-1.4: SerialNumber: 1234567890ABCDEF
[ 1455.222198] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 1455.231747] scsi host0: usb-storage 1-1.4:1.0
[ 1456.296337] scsi 0:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2

# cat /sys/bus/usb-serial/drivers/option1/new_id

====================after.usb-modeswitch.installed====================

# demesg | tail -9
[ 2173.847702] usb 1-1.4: USB disconnect, device number 10
[ 2182.843741] usb 1-1.4: new high-speed USB device number 11 using dwc_otg
[ 2182.986227] usb 1-1.4: New USB device found, idVendor=1c9e, idProduct=f000
[ 2182.995990] usb 1-1.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 2183.006186] usb 1-1.4: Product: USB Modem
[ 2183.012968] usb 1-1.4: Manufacturer: USB Modem
[ 2183.020155] usb 1-1.4: SerialNumber: 1234567890ABCDEF
[ 2183.030541] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 2183.039331] scsi host0: usb-storage 1-1.4:1.0

# cat /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 10 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1c9e ProdID=f000 Rev= 0.00
S:  Manufacturer=USB Modem
S:  Product=USB Modem
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

# cat /sys/bus/usb-serial/drivers/option1/new_id

Driver=(none) | Something bad is doing mode usb-modeswitch

# cat /etc/hotplug.d/usb/20-usb_mode 
/etc/init.d/usbmode start

I did it. Using permutation n combination, and studding the various output of Ubuntu and OpenWrt, I found the correct json file as below:

{
	"messages" : [
		"55534243123456788000000080000606f50402527000000000000000000000",
],
"devices" : {
		"1c9e:f000": {
			"*": {
				"t_vendor": 7326,
				"t_product": [ 38405 ],
				"msg": [ 0 ],
				"wait": 20
			},
		},
	}
}

dmesg output on RasPi2v1.1

[22732.224154] usb 1-1.4: new high-speed USB device number 21 using dwc_otg
[22732.366546] usb 1-1.4: New USB device found, idVendor=1c9e, idProduct=f000
[22732.376192] usb 1-1.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[22732.386322] usb 1-1.4: Product: USB Modem
[22732.393081] usb 1-1.4: Manufacturer: USB Modem
[22732.400246] usb 1-1.4: SerialNumber: 1234567890ABCDEF
[22732.410595] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[22732.419327] scsi host0: usb-storage 1-1.4:1.0
[22733.445691] scsi 0:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[22743.191769] usb 1-1.4: USB disconnect, device number 21
[22743.544184] usb 1-1.4: new high-speed USB device number 22 using dwc_otg
[22743.686688] usb 1-1.4: New USB device found, idVendor=1c9e, idProduct=9605
[22743.696332] usb 1-1.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[22743.706462] usb 1-1.4: Product: USB Modem
[22743.713223] usb 1-1.4: Manufacturer: USB Modem
[22743.720390] usb 1-1.4: SerialNumber: 1234567890ABCDEF
[22744.266768] option 1-1.4:1.0: GSM modem (1-port) converter detected
[22744.276721] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[22744.287449] option 1-1.4:1.1: GSM modem (1-port) converter detected
[22744.295999] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
[22744.305789] option 1-1.4:1.2: GSM modem (1-port) converter detected
[22744.314703] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2
[22744.324661] option 1-1.4:1.3: GSM modem (1-port) converter detected
[22744.333387] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB3
[22744.343368] usb-storage 1-1.4:1.4: USB Mass Storage device detected
[22744.352492] scsi host0: usb-storage 1-1.4:1.4
[22745.365701] scsi 0:0:0:0: Direct-Access     USBModem Disk             2.31 PQ: 0 ANSI: 2
[22745.381762] sd 0:0:0:0: [sda] Attached SCSI removable disk
root@RasPi2# lsusb -vt
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 4: Dev 24, If 1, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 24, If 4, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 4: Dev 24, If 2, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 24, If 0, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 24, If 3, Class=Vendor Specific Class, Driver=option, 480M

On Ubuntu

user@KXYZ-LP:~$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/11 [Micromax] Micromax MMX352G 3G USB Modem
user@KXYZ-LP:~$ mmcli -m 11
  --------------------------
  General  |      dbus path: /org/freedesktop/ModemManager1/Modem/11
           |      device id: 8c00009c90000d5d3600000d439f00009f8b0d6 (#changed-privacy)
  --------------------------
  Hardware |   manufacturer: Micromax
           |          model: Micromax MMX352G 3G USB Modem
           |       revision: LQA0083.1.4_MG32
           |      supported: gsm-umts
           |        current: gsm-umts
           |   equipment id: 910000055200008 (#changed-privacy)
  --------------------------
  System   |         device: /sys/devices/pci0000:00/0000:00:14.0/usb2/2-1
           |        drivers: option1
           |         plugin: Longcheer
           |   primary port: ttyUSB3
           |          ports: ttyUSB1 (at), ttyUSB3 (at)
  --------------------------
  Status   | unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |          state: registered
           |    power state: on
           |    access tech: hsupa
           | signal quality: 20% (recent)
  --------------------------
  Modes    |      supported: allowed: 2g; preferred: none
           |                 allowed: 3g; preferred: none
           |                 allowed: 2g, 3g; preferred: 2g
           |                 allowed: 2g, 3g; preferred: 3g
           |        current: allowed: 2g, 3g; preferred: 3g
  --------------------------
  IP       |      supported: ipv4, ipv6
  --------------------------
  3GPP     |           imei: 910000010000111 (#changed-privacy)
           |    operator id: 40570
           |  operator name: IDEA
           |   registration: home
  --------------------------
  SIM      |      dbus path: /org/freedesktop/ModemManager1/SIM/11

from this I guess

ubuntu log

20:53:46 nm-dispatcher: req:1 'down' [ttyUSB3]: start running ordered scripts...
20:53:46 nm-dispatcher: req:1 'down' [ttyUSB3]: start running ordered scripts...
20:53:46 nm-dispatcher: req:1 'down' [ttyUSB3]: new request (1 scripts)

is right modem for Luci Configuration

{
	"messages" : [
		"55534243123456788000000080000606f50402527000000000000000000000",
],
"devices" : {
		"1c9e:f000": {
			"*": {
				"t_vendor": 7326,
				"t_product": [ 38405 ],
				"msg": [ 0 ],
				"wait": 20
			},
		},
	}
}
# cat /etc/config/network
config interface 'mmx3'
	option proto '3g'
	option ipv6 'auto'
	option apn 'internet'
	option dialnumber '*99***1#'
	option service 'umts'
	option device '/dev/ttyUSB3'

on interface

Luci 3g configuration with IDEA SIM (India)

1 Like

The only help that I got is from my ubuntu pc.

list of packages installed

kmod-usb-serial-option
	Dependencies:
		kernel INSTALLED
		kmod-usb-core INSTALLED
		kmod-nls-base INSTALLED
		kmod-usb-serial (13.8 KB) NOT INSTALLED
		kmod-usb-serial-wwan (4.9 KB) NOT INSTALLED

luci-proto-3g
	Dependencies:
		comgt (19.8 KB) NOT INSTALLED
		chat (8.1 KB) NOT INSTALLED

usb-modeswitch
	Dependencies:
		libubox20191228 INSTALLED
		libblobmsg-json INSTALLED
		libjson-c2 INSTALLED
		libpthread INSTALLED
		libgcc1 INSTALLED
		librt INSTALLED
		libusb-1.0-0 (25.3 KB) NOT INSTALLED

after installing replace the content of "/etc/usb-mode.json" to

You can also reduce wait to 5, I did not decreases more then that.

also working with value "wait": 5

reboot openwrt

1 Like

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