[MTCB Software Development] oddyutza:
Hey guys,

I'm using the latest frimware from Malay and i have a LTE dongle, a Huawei K5160 which i plan to use on a KLD rk3188 android 4.4.4 HU. As there's an issue with multiple storage devices when using the back usb ports. i need to change the modem from the eth mode to the serial mode, therefore i've cooked the following file:

/etc/usb_modeswitch.d/12d1_1f1e

##Huawei K5160

DefaultVendor= 0x12d1

DefaultProduct= 0x1f1e

MessageContent="55534243123456780000000000000011063000000000000000000000000000"

12d1:1f1e can retain the same id after usb_modeswitch because it has dual configs and usb_modeswitch will select config #2 if your system has cdc_mbim drivers installed.

The device will only be switched to a new usb id when the system does not have cdc_mbim drivers. As per this statement my device is switched to 12d1:157f - Ethernet mode

MBIM can be disabled by using : DisableMBIMGlobal=1 parameter on /etc/usb_modeswitch.conf - surprise i've added the file as it was missing and nothing changed, even if i reboot the HU.

My questions as follows:

1. is it possible to use the K5160 in serial (modem) mode and NOT in ethernet mode

2. is it possible to disable MBIM, if yes how?

3. how can i use this modem without affecting my usb storage

NB: here is dmesg output from a normal boot process using the storage and the modem connected to the back usb ports:

...

5>[ 7.262817] scsi 0:0:0:0: Direct-Access ASMT 2115 0 PQ: 0 ANSI: 6

<5>[ 7.264561] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)

<5>[ 7.265416] sd 0:0:0:0: [sda] Write Protect is off

<7>[ 7.265434] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00

<5>[ 7.266163] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

<6>[ 7.269933] sda:

<5>[ 7.272412] sd 0:0:0:0: [sda] Attached SCSI disk

<7>[ 7.302185] SELinux: 512 avtab hash slots, 1600 rules.

<7>[ 7.303008] SELinux: 512 avtab hash slots, 1600 rules.

<7>[ 7.303032] SELinux: 1 users, 2 roles, 288 types, 1 bools, 1 sens, 1024 cats

<7>[ 7.303054] SELinux: 84 classes, 1600 rules

<3>[ 7.313893] android_usb: already disabled

<6>[ 7.316935] adb_open

<4>[ 7.385671] rk fb use 3 buffers

<5>[ 7.533577] type=1403 audit(1486359237.230:4): policy loaded auid=4294967295 ses=4294967295

<6>[ 7.598675] EXT4-fs (mtdblock8): re-mounted. Opts: (null)

<6>[ 7.626042] EXT4-fs (mtdblock8): re-mounted. Opts: (null)

<6>[ 7.632432] rk30-lcdc rk30-lcdc.0: blank mode:0

<6>[ 7.719472] EXT4-fs (mtdblock8): re-mounted. Opts: (null)

<6>[ 7.762567] EXT4-fs (mtdblock8): re-mounted. Opts: (null)

<4>[ 8.073967] rpt_boot_android true

<6>[ 12.322476] usb 2-1.3: new high speed USB device number 5 using usb20_host

<6>[ 12.423812] usb 2-1.3: New USB device found, idVendor=12d1, idProduct=1f1e

<6>[ 12.423837] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3

<6>[ 12.423860] usb 2-1.3: Product: Vodafone (Huawei)

<6>[ 12.423879] usb 2-1.3: Manufacturer: Vodafone (Huawei)

<6>[ 12.423895] usb 2-1.3: SerialNumber: 0123456789ABCDEF

<4>[ 12.467080] --mtc usb storage 2-1.3 12d1 1f1e

<6>[ 12.467338] scsi1 : usb-storage 2-1.3:1.0

<6>[ 12.602293] usb 2-1.3: USB disconnect, device number 5

<4>[ 12.602479] --mtc usb storage remove 2-1.3

<4>[ 12.603775] ####usbdev_remove####

<6>[ 13.352605] usb 2-1.3: new high speed USB device number 6 using usb20_host

<6>[ 13.453312] usb 2-1.3: New USB device found, idVendor=12d1, idProduct=157f

<6>[ 13.453337] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

<6>[ 13.453358] usb 2-1.3: Product: Vodafone (Huawei)

<6>[ 13.453376] usb 2-1.3: Manufacturer: Vodafone (Huawei)

<6>[ 13.613705] cdc_ether 2-1.3:1.0: eth0: register 'cdc_ether' at usb-usb20_host-1.3, CDC Ethernet Device, 0c:5b:8f:27:9a:64

<4>[ 13.615063] --mtc usb storage 2-1.3 12d1 157f

<6>[ 13.615282] scsi2 : usb-storage 2-1.3:1.2

<5>[ 14.617704] scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2

<5>[ 14.621927] sd 2:0:0:0: [sdb] Attached SCSI removable disk

...