[SOLVED] 3g/LTE modem (Qualcomm MDM9200) - USB modeswitch problem

Hello,

Device: TL-WDR4300 v1.7
OS: OpenWRT 15.05.1
Modem: M-Life ML0700 LTE modem, with Qualcomm MDM9200 chipset

OpenWRT USB support OK without installing anything:

root@OpenWrt:~# lsusb
Bus 001 Device 003: ID 05c6:f000 Qualcomm, Inc.
root@OpenWrt:~# dmesg | grep usb
[ 3.510000] usbcore: registered new interface driver usbfs
[ 3.510000] usbcore: registered new interface driver hub
[ 3.520000] usbcore: registered new device driver usb
[ 3.910000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 5.090000] usb 1-1.2: new high-speed USB device number 3 using ehci-platform

Installing the necessary packages:
opkg install comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch usb-modeswitch-data

Modem support comes up:

root@OpenWrt:~# dmesg | grep usb
[ 3.510000] usbcore: registered new interface driver usbfs
[ 3.510000] usbcore: registered new interface driver hub
[ 3.520000] usbcore: registered new device driver usb
[ 3.910000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 5.090000] usb 1-1.2: new high-speed USB device number 3 using ehci-platform
[ 769.520000] usb 1-1.2: USB disconnect, device number 3
[ 1183.130000] usbcore: registered new interface driver usbserial
[ 1183.130000] usbcore: registered new interface driver usbserial_generic
[ 1183.140000] usbserial: USB Serial support registered for generic
[ 1183.290000] usbcore: registered new interface driver option
[ 1183.300000] usbserial: USB Serial support registered for GSM modem (1-port)

Plugging the modem in:
[ 1306.350000] usb 1-1.2: new high-speed USB device number 4 using ehci-platform

Automatic mode switch is not working, modem is in mass storage mode, so there are no /dev/ttyUSB* devices...

root@OpenWrt:~# lsusb
Bus 001 Device 004: ID 05c6:f000 Qualcomm, Inc.

If I put the modem to my notebook with Ubuntu the modem switches to 05c6:6000 and everything is OK.

So I copy the config file /usr/share/usb_modeswitch/configPack.tar.gz from Ubuntu and extract. There is a file in the archive with the proper VID and PID with the following content:

# Siptune LM-75 ("LinuxModem"), EWangshikong 4G
TargetVendor=0x05c6
TargetProductList="0016,6000,9000"
StandardEject=1
MessageContent="5553424308306384c000000080000671030000000000000000000000000000"

Upon these I create a custom config file:

{
        "messages" : [
                "5553424308306384c000000080000671030000000000000000000000000000",
],
"devices" : {
                "05c6:f000": {
                        "*": {
                                "t_vendor": 05c6,
                                "t_product": [ 6000 ],
                                "msg": [ 0 ]
                        }
                },
        }
}

But I can not load it:

root@OpenWrt:~# usbmode -l
Found device: 05c6:f000 (Manufacturer: "Qualcomm, Incorporated", Product: "Qualcomm CDMA Technologies MSM", Serial: "1234567890ABCDEF")
root@OpenWrt:~# usbmode -s -v -c /etc/usb-mode-customMDM9200.json
Failed to load config file

At this point I am out of ideas, if there are anybody - an OpenWRT guru or developer - I would be grateful for some advice.
Thank you in advance!

There's no point debugging (or even discussing) this on 15.05.1, which hasn't been maintained for over 3 years and has quite a few pretty serious known security issues by now.

Give 18.06.1 a try and start over again, there's a good chance that it might just work.

I've just finished with it. Still no ttyUSB* because device is still in mass storage mode.
Tried the custom file again without success:

root@OpenWrt:~# usbmode -l
Found device: 05c6:f000 (Manufacturer: "Qualcomm, Incorporated", Product: "Qualcomm CDMA Technologies MSM", Serial: "1234567890ABCDEF")
root@OpenWrt:~# usbmode -s -v -c /etc/usb-mode-customMDM9200.json
Failed to load config file

Version:

root@OpenWrt:~# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='18.06.1'
DISTRIB_REVISION='r7258-5eb055306f'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 18.06.1 r7258-5eb055306f'
DISTRIB_TAINTS=''

logread tells me nothing about "Failed to load config file".
Is there any source to get information about the failure?

Do not be paranoic, i have the best results witc CC15051

That's not well formed JSON. Try removing a couple of extra commas and quote the hex numbers as strings.

You are right bmork! I was so deeply in that modeswitch files, that I did not even notice the syntax. Thank you very much!

The well formed and working config is the following:

{

	"messages": [

		"5553424308306384c000000080000671030000000000000000000000000000"

	],

	"devices": {

		"05c6:f000": {

			"*": {

				"t_vendor": "05c6",

				"t_product": "6000",

				"msg": [0]

			}

		}

	}

}

With this, the device switches to modem perfectly.

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