Huawei E3131 3G USB modem issue on BBB

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Huawei E3131 3G USB modem issue on BBB

Postby GrisLv » Wed Feb 15, 2017 3:05 pm

Hello,

I have an issue with my Huawei E3131 3G USB modem connected to BeagleBone Black. When modem is connected directly to the board, usb_modeswitch fails. However, when connected via passive USB hub, everything works as expected.

Here's how it looks:

$this->bbcode_second_pass_code('', '# uname -a
Linux alarm 4.9.9-1-ARCH #1 Sat Feb 11 18:27:47 MST 2017 armv7l GNU/Linux
')

This is dmesg output before modem is plugged in:
$this->bbcode_second_pass_code('', '# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.9-1-ARCH (builduser@leming) (gcc version 6.3.1 20170109 (GCC) ) #1 Sat Feb 11 18:27:47 MST 2017
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black
[ 0.000000] cma: Reserved 48 MiB at 0x9d000000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 131072
[ 0.000000] free_area_init_node: node 0, pgdat c0dc92c4, node_mem_map dcb61000
[ 0.000000] Normal zone: 1152 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 131072 pages, LIFO batch:31
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon)
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=ttyO0,115200n8 coherent_pool=1M bone_capemgr.enable_partno=BB-I2C1 root=PARTUUID=16e6fcad-01 rw rootwait fixrtc
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 455700K/524288K available (7168K kernel code, 981K rwdata, 3664K rodata, 1024K init, 786K bss, 19436K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf800000 - 0xbfe00000 ( 6 MB)
.text : 0xc0008000 - 0xc0800000 (8160 kB)
.init : 0xc0c00000 - 0xc0d00000 (1024 kB)
.data : 0xc0d00000 - 0xc0df5650 ( 982 kB)
.bss : 0xc0df7000 - 0xc0ebbb20 ( 787 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000012] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000029] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000038] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000860] clocksource_probe: no matching clocksources found
[ 0.001021] Console: colour dummy device 80x30
[ 0.001044] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.001050] This ensures that you still see kernel messages. Please
[ 0.001054] update your kernel commandline.
[ 0.001071] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.089101] pid_max: default: 32768 minimum: 301
[ 0.089327] Security Framework initialized
[ 0.089511] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.089520] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090367] CPU: Testing write buffer coherency: ok
[ 0.090419] ftrace: allocating 33604 entries in 66 pages
[ 0.172568] Setting up static identity map for 0x80100000 - 0x8010004c
[ 0.176576] devtmpfs: initialized
[ 0.189930] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.190287] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.193640] xor: measuring software checksum speed
[ 0.289072] arm4regs : 1223.600 MB/sec
[ 0.389066] 8regs : 1096.000 MB/sec
[ 0.489067] 32regs : 1089.200 MB/sec
[ 0.589068] neon : 1774.000 MB/sec
[ 0.589074] xor: using function: neon (1774.000 MB/sec)
[ 0.589089] pinctrl core: initialized pinctrl subsystem
[ 0.590686] NET: Registered protocol family 16
[ 0.593464] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.604796] omap_hwmod: debugss: _wait_target_disable failed
[ 0.657511] cpuidle: using governor menu
[ 0.663201] OMAP GPIO hardware version 0.1
[ 0.675592] No ATAGs?
[ 0.675613] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.849287] raid6: int32x1 gen() 271 MB/s
[ 1.019070] raid6: int32x1 xor() 232 MB/s
[ 1.189178] raid6: int32x2 gen() 390 MB/s
[ 1.359128] raid6: int32x2 xor() 295 MB/s
[ 1.529137] raid6: int32x4 gen() 421 MB/s
[ 1.699176] raid6: int32x4 xor() 283 MB/s
[ 1.869081] raid6: int32x8 gen() 368 MB/s
[ 2.039086] raid6: int32x8 xor() 247 MB/s
[ 2.209105] raid6: neonx1 gen() 1465 MB/s
[ 2.379066] raid6: neonx1 xor() 848 MB/s
[ 2.549092] raid6: neonx2 gen() 1927 MB/s
[ 2.609065] random: fast init done
[ 2.719074] raid6: neonx2 xor() 1166 MB/s
[ 2.889086] raid6: neonx4 gen() 1222 MB/s
[ 3.059074] raid6: neonx4 xor() 871 MB/s
[ 3.229083] raid6: neonx8 gen() 1120 MB/s
[ 3.399090] raid6: neonx8 xor() 607 MB/s
[ 3.399097] raid6: using algorithm neonx2 gen() 1927 MB/s
[ 3.399103] raid6: .... xor() 1166 MB/s, rmw enabled
[ 3.399109] raid6: using intx1 recovery algorithm
[ 3.406348] edma 49000000.edma: TI EDMA DMA engine driver
[ 3.409894] SCSI subsystem initialized
[ 3.410162] libata version 3.00 loaded.
[ 3.410423] usbcore: registered new interface driver usbfs
[ 3.410485] usbcore: registered new interface driver hub
[ 3.410553] usbcore: registered new device driver usb
[ 3.410948] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[ 3.410992] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[ 3.411074] media: Linux media interface: v0.10
[ 3.411119] Linux video capture interface: v2.00
[ 3.411189] pps_core: LinuxPPS API ver. 1 registered
[ 3.411194] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 3.411213] PTP clock support registered
[ 3.411648] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 3.412586] NetLabel: Initializing
[ 3.412597] NetLabel: domain hash size = 128
[ 3.412602] NetLabel: protocols = UNLABELED CIPSOv4
[ 3.412659] NetLabel: unlabeled traffic allowed by default
[ 3.413221] clocksource: Switched to clocksource timer1
[ 3.489974] VFS: Disk quotas dquot_6.6.0
[ 3.490054] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 3.499891] NET: Registered protocol family 2
[ 3.500553] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 3.500595] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 3.500631] TCP: Hash tables configured (established 4096 bind 4096)
[ 3.500691] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 3.500717] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 3.500841] NET: Registered protocol family 1
[ 3.501293] RPC: Registered named UNIX socket transport module.
[ 3.501302] RPC: Registered udp transport module.
[ 3.501307] RPC: Registered tcp transport module.
[ 3.501312] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 3.502082] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 3.503843] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 3.504719] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 3.512646] zbud: loaded
[ 3.515518] NFS: Registering the id_resolver key type
[ 3.515557] Key type id_resolver registered
[ 3.515564] Key type id_legacy registered
[ 3.515579] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 3.515826] fuse init (API version 7.26)
[ 3.516319] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[ 3.522786] Key type asymmetric registered
[ 3.522803] Asymmetric key parser 'x509' registered
[ 3.523049] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 3.523182] io scheduler noop registered
[ 3.523191] io scheduler deadline registered
[ 3.523456] io scheduler cfq registered (default)
[ 3.524834] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 3.526337] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 3.527624] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[ 3.529898] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[ 4.286907] console [ttyS0] enabled
[ 4.291460] [drm] Initialized
[ 4.295459] usbcore: registered new interface driver dln2
[ 4.301791] libphy: Fixed MDIO Bus: probed
[ 4.373281] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 4.379411] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[ 4.385969] davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
[ 4.393599] libphy: 4a101000.mdio: probed
[ 4.397640] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[ 4.407480] cpsw 4a100000.ethernet: Detected MACID = 04:a3:16:b9:59:73
[ 4.415778] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.422371] ehci-platform: EHCI generic platform driver
[ 4.427797] ehci-omap: OMAP-EHCI Host Controller driver
[ 4.433401] usbcore: registered new interface driver uas
[ 4.438808] usbcore: registered new interface driver usb-storage
[ 4.444888] usbcore: registered new interface driver ums-cypress
[ 4.452826] 47401300.usb-phy supply vcc not found, using dummy regulator
[ 4.462860] musb-hdrc musb-hdrc.0.auto: Failed to request rx1.
[ 4.468832] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
[ 4.477577] 47401b00.usb-phy supply vcc not found, using dummy regulator
[ 4.487520] musb-hdrc musb-hdrc.1.auto: Failed to request rx1.
[ 4.493550] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
[ 4.509113] mousedev: PS/2 mouse device common for all mice
[ 4.515828] omap_rtc 44e3e000.rtc: already running
[ 4.520951] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[ 4.528646] i2c /dev entries driver
[ 4.533859] sdhci: Secure Digital Host Controller Interface driver
[ 4.540070] sdhci: Copyright(c) Pierre Ossman
[ 4.544865] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 4.650546] mmc0: host does not support reading read-only switch, assuming write-enable
[ 4.660624] mmc0: new high speed SDHC card at address 59b4
[ 4.666338] Synopsys Designware Multimedia Card Interface Driver
[ 4.672566] sdhci-pltfm: SDHCI platform and OF driver helper
[ 4.679001] mmcblk0: mmc0:59b4 00000 14.9 GiB
[ 4.688313] mmcblk0: p1
[ 4.692127] ledtrig-cpu: registered to indicate activity on CPUs
[ 4.698330] hidraw: raw HID events driver (C) Jiri Kosina
[ 4.704195] usbcore: registered new interface driver usbhid
[ 4.709826] usbhid: USB HID core driver
[ 4.713912] ashmem: initialized
[ 4.720376] remoteproc0: wkup_m3 is available
[ 4.724879] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 4.733885] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 4.746082] NET: Registered protocol family 10
[ 4.751567] mip6: Mobile IPv6
[ 4.754628] NET: Registered protocol family 17
[ 4.759177] Key type dns_resolver registered
[ 4.763492] mpls_gso: MPLS GSO support
[ 4.767450] omap_voltage_late_init: Voltage driver support not added
[ 4.774042] ThumbEE CPU extension supported.
[ 4.778374] Registering SWP/SWPB emulation handler
[ 4.783899] registered taskstats version 1
[ 4.788134] zswap: loaded using pool lzo/zbud
[ 4.794194] Btrfs loaded, crc32c=crc32c-generic
[ 4.799870] Key type encrypted registered
[ 4.813253] mmc1: new high speed MMC card at address 0001
[ 4.819259] mmcblk1: mmc1:0001 S10004 3.56 GiB
[ 4.824093] mmcblk1boot0: mmc1:0001 S10004 partition 1 4.00 MiB
[ 4.830270] mmcblk1boot1: mmc1:0001 S10004 partition 2 4.00 MiB
[ 4.837537] mmcblk1: p1 p2
[ 4.849569] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[ 4.860780] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[ 4.866560] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.873706] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 4.880604] at24 2-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.887840] at24 2-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.895012] at24 2-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.902166] at24 2-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.909110] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 4.915495] remoteproc0: powering up wkup_m3
[ 4.919903] remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[ 4.927425] remoteproc0: remote processor wkup_m3 is now up
[ 4.933114] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
[ 4.944516] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,00C0,3016BBBK1829'
[ 4.951784] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[ 4.984883] bone_capemgr bone_capemgr: slot #0: No cape found
[ 5.013234] bone_capemgr bone_capemgr: slot #1: No cape found
[ 5.043585] bone_capemgr bone_capemgr: slot #2: No cape found
[ 5.073944] bone_capemgr bone_capemgr: slot #3: No cape found
[ 5.079723] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-I2C1' VER 'N/A' PR '0'
[ 5.087773] bone_capemgr bone_capemgr: slot #4: override
[ 5.093110] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 5.100115] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-I2C1'
[ 5.109226] bone_capemgr bone_capemgr: initialized OK.
[ 5.122267] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 5.128115] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 5.136163] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 5.142982] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.150250] usb usb1: Product: MUSB HDRC host driver
[ 5.155244] usb usb1: Manufacturer: Linux 4.9.9-1-ARCH musb-hcd
[ 5.161185] usb usb1: SerialNumber: musb-hdrc.1.auto
[ 5.166829] hub 1-0:1.0: USB hub found
[ 5.170623] hub 1-0:1.0: 1 port detected
[ 5.176554] omap_rtc 44e3e000.rtc: setting system clock to 2017-02-15 14:01:26 UTC (1487167286)
[ 5.185340] of_cfs_init
[ 5.187906] of_cfs_init: OK
[ 5.191181] PM: Hibernation image not present or could not be loaded.
[ 5.192901] EXT4-fs (mmcblk0p1): couldn't mount as ext3 due to feature incompatibilities
[ 5.202096] EXT4-fs (mmcblk0p1): couldn't mount as ext2 due to feature incompatibilities
[ 5.225655] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 5.233907] VFS: Mounted root (ext4 filesystem) on device 179:1.
[ 5.244584] devtmpfs: mounted
[ 5.248798] Freeing unused kernel memory: 1024K (c0c00000 - c0d00000)
[ 5.813868] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 5.887880] systemd[1]: systemd 232 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[ 5.906571] systemd[1]: Detected architecture arm.
[ 5.944612] systemd[1]: Set hostname to <alarm>.
[ 6.163348] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[ 6.171941] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-I2C1-00A0.dtbo' loaded; overlay id #0
[ 6.572377] systemd[1]: Listening on udev Control Socket.
[ 6.604706] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 6.645828] systemd[1]: Created slice System Slice.
[ 6.674630] systemd[1]: Created slice system-getty.slice.
[ 6.707153] systemd[1]: Mounting Debug File System...
[ 6.747100] systemd[1]: Listening on udev Kernel Socket.
[ 6.774749] systemd[1]: Created slice User and Session Slice.
[ 8.354112] systemd-journald[109]: Received request to flush runtime journal from PID 1
[ 9.772768] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 10.956965] tda998x 0-0070: found TDA19988
[ 10.998063] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops [tda998x])
[ 11.076037] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 11.082750] [drm] No driver support for vblank timestamp query.
[ 11.346309] tilcdc 4830e000.lcdc: No connectors reported connected with modes
[ 11.536246] [drm] Cannot find any crtc or sizes - going 1024x768
[ 11.710279] Console: switching to colour frame buffer device 128x48
[ 11.949905] tilcdc 4830e000.lcdc: fb0: frame buffer device
[ 12.069695] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[ 12.317928] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[ 12.966416] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[ 13.621432] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[ 13.705840] omap-aes 53500000.aes: will run requests pump with realtime priority
[ 15.171931] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 15.239065] net eth0: initializing cpsw version 1.12 (0)
[ 15.326889] asoc-simple-card sound: hdmi-hifi.0 <-> 48038000.mcasp mapping ok
[ 15.363967] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=-1)
[ 15.406160] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 16.722300] random: crng init done
[ 17.493981] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 17.501907] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready')

After modem is plugged in, it's visible as mass storage device:
$this->bbcode_second_pass_code('', '# lsusb
Bus 001 Device 005: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
')

$this->bbcode_second_pass_code('', '# dmesg
.....
[ 583.815218] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 583.985814] usb 1-1: New USB device found, idVendor=12d1, idProduct=14fe
[ 583.992557] usb 1-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 583.999751] usb 1-1: Product: HUAWEI Mobile
[ 584.003950] usb 1-1: Manufacturer: HUAWEI
[ 584.017196] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 584.028009] scsi host0: usb-storage 1-1:1.0
[ 584.034554] usb-storage 1-1:1.1: USB Mass Storage device detected
[ 584.043802] scsi host1: usb-storage 1-1:1.1
[ 585.036319] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 585.082684] sr 0:0:0:0: [sr0] scsi-1 drive
[ 585.086899] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 585.104987] sr 0:0:0:0: Attached scsi CD-ROM sr0
[ 585.119259] scsi 1:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
[ 585.139996] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 585.491743] Buffer I/O error on dev sr0, logical block 1, async page read
[ 585.507785] Buffer I/O error on dev sr0, logical block 0, async page read
[ 585.516947] Buffer I/O error on dev sr0, logical block 2, async page read
[ 585.525213] Buffer I/O error on dev sr0, logical block 0, async page read
[ 585.533676] Buffer I/O error on dev sr0, logical block 0, async page read
[ 585.545620] Buffer I/O error on dev sr0, logical block 0, async page read
[ 585.552520] Buffer I/O error on dev sr0, logical block 1, async page read
[ 585.571476] Buffer I/O error on dev sr0, logical block 1, async page read
[ 585.579612] usb 1-1: USB disconnect, device number 2 <-- HERE COMES USB_MODESWITCH!
[ 585.592642] Buffer I/O error on dev sr0, logical block 512, async page read
[ 585.632963] Buffer I/O error on dev sr0, logical block 32767, async page read
[ 596.296063] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[ 596.476541] usb 1-1: New USB device found, idVendor=12d1, idProduct=14fe
[ 596.483286] usb 1-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 596.490483] usb 1-1: Product: HUAWEI Mobile
[ 596.494681] usb 1-1: Manufacturer: HUAWEI
[ 596.508002] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 596.515173] scsi host0: usb-storage 1-1:1.0
[ 596.523850] usb-storage 1-1:1.1: USB Mass Storage device detected
[ 596.531952] scsi host1: usb-storage 1-1:1.1
[ 597.605260] scsi 1:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
[ 597.615561] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 597.638752] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 597.648044] sr 0:0:0:0: [sr0] scsi-1 drive
[ 597.658929] sr 0:0:0:0: Attached scsi CD-ROM sr0')

Corresponding usb_modeswitch log:
$this->bbcode_second_pass_code('', '# cat /var/log/usb_modeswitch_1-1\:1.0

USB_ModeSwitch log from Wed Feb 15 14:11:05 UTC 2017

Use global config file: /etc/usb_modeswitch.conf

Started via systemd
Raw args from udev: _1-1:1.0

Use top device dir /sys/bus/usb/devices/1-1
Check class of first interface ...
Interface 0 class is 08.

----------------
USB values from sysfs:
manufacturer HUAWEI
product HUAWEI Mobile
serial
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /usr/share/usb_modeswitch/12d1:14fe /usr/share/usb_modeswitch/12d1:#linux
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/12d1:14fe
! matched. Read config data
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 2 -v 12d1 -p 14fe -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x14fe
TargetVendor= 0x12d1
TargetProductList="1506,150f,151d,1c1e"
HuaweiNewMode=1
System integration mode enabled

Use given bus/device number: 001/002 ...
Look for default devices ...
bus/device number matched
found USB ID 12d1:14fe
vendor ID matched
product ID matched
Found devices in default mode (1)
Get the current device configuration ...
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Using standard Huawei switching message
Looking for active driver ...
No active driver found. Detached before or never attached
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 reading failed (error -1)
Device is gone, skip any further commands
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
Wait for device file system (1 sec.) ...
Wait for device file system (2 sec.) ...
Wait for device file system (3 sec.) ...
Wait for device file system (4 sec.) ...
Wait for device file system (5 sec.) ...
Wait for device file system (6 sec.) ...
Wait for device file system (7 sec.) ...
Wait for device file system (8 sec.) ...
Wait for device file system (9 sec.) ...
Wait for device file system (10 sec.) ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...

Target config not matching - current values are
1-1:1.0/bInterfaceClass: 08
bConfigurationValue: 1
bNumConfigurations: 1
busnum: 1
devnum: 3
idProduct: 14fe
idVendor: 12d1
manufacturer: HUAWEI
product: HUAWEI Mobile
serial:

Mode switching may have failed. Exit')

It's clearly visible, that usb_modeswitch detected the modem and have tried to switch it from mass storage to the modem mode but for some reason have failed.

Now let's try to plug in the same modem via USB hub.

This is how USB hub is detected by Linux:
$this->bbcode_second_pass_code('', '# lsusb
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
')

$this->bbcode_second_pass_code('', '# dmesg
.....
[ 735.182958] usb 1-1: new high-speed USB device number 4 using musb-hdrc
[ 735.355768] usb 1-1: New USB device found, idVendor=05e3, idProduct=0610
[ 735.362511] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 735.369709] usb 1-1: Product: USB2.0 Hub
[ 735.373655] usb 1-1: Manufacturer: GenesysLogic
[ 735.388812] hub 1-1:1.0: USB hub found
[ 735.395878] hub 1-1:1.0: 4 ports detected
')

And now plugging in the modem:
$this->bbcode_second_pass_code('', '# dmesg
.....
[ 789.775083] usb 1-1.3: new high-speed USB device number 10 using musb-hdrc
[ 789.905617] usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
[ 789.912532] usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 789.919899] usb 1-1.3: Product: HUAWEI Mobile
[ 789.924271] usb 1-1.3: Manufacturer: HUAWEI
[ 789.936994] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 789.947177] scsi host0: usb-storage 1-1.3:1.0
[ 789.953770] usb-storage 1-1.3:1.1: USB Mass Storage device detected
[ 789.963292] scsi host1: usb-storage 1-1.3:1.1
[ 790.975907] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 791.006941] sr 0:0:0:0: [sr0] scsi-1 drive
[ 791.017641] sr 0:0:0:0: Attached scsi CD-ROM sr0
[ 791.050043] scsi 1:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
[ 791.078605] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 791.213361] usb 1-1.3: USB disconnect, device number 10
[ 796.975348] usb 1-1.3: new high-speed USB device number 11 using musb-hdrc
[ 797.106115] usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
[ 797.113031] usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 797.120401] usb 1-1.3: Product: HUAWEI Mobile
[ 797.124775] usb 1-1.3: Manufacturer: HUAWEI
[ 797.138542] usb-storage 1-1.3:1.4: USB Mass Storage device detected
[ 797.149749] scsi host0: usb-storage 1-1.3:1.4
[ 797.158003] usb-storage 1-1.3:1.5: USB Mass Storage device detected
[ 797.164647] scsi host1: usb-storage 1-1.3:1.5
[ 797.290838] usbcore: registered new interface driver usbserial
[ 797.333547] usbcore: registered new interface driver usbserial_generic
[ 797.352235] usbcore: registered new interface driver cdc_ncm
[ 797.360593] usbserial: USB Serial support registered for generic
[ 797.381850] usbcore: registered new interface driver cdc_wdm
[ 797.448284] usbcore: registered new interface driver option
[ 797.462671] usbserial: USB Serial support registered for GSM modem (1-port)
[ 797.496354] huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 58:2c:80:13:92:63
[ 797.502759] huawei_cdc_ncm 1-1.3:1.1: setting rx_max = 16384
[ 797.515871] huawei_cdc_ncm 1-1.3:1.1: setting tx_max = 16384
[ 797.521668] huawei_cdc_ncm 1-1.3:1.1: NDP will be placed at end of frame for this device.
[ 797.536858] huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
[ 797.547289] huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-musb-hdrc.1.auto-1.3, Huawei CDC NCM device, 58:2c:80:13:92:63
[ 797.561624] option 1-1.3:1.0: GSM modem (1-port) converter detected
[ 797.573859] usbcore: registered new interface driver huawei_cdc_ncm
[ 797.582308] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[ 797.611711] option 1-1.3:1.2: GSM modem (1-port) converter detected
[ 797.619537] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[ 797.635734] option 1-1.3:1.3: GSM modem (1-port) converter detected
[ 797.648376] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[ 798.172704] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 798.187577] sr 0:0:0:0: [sr0] scsi-1 drive
[ 798.197974] sr 0:0:0:0: Attached scsi CD-ROM sr0
[ 798.253604] scsi 1:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
[ 798.278733] sd 1:0:0:0: [sda] Attached SCSI removable disk')

And now it's successfully switched to modem mode!

$this->bbcode_second_pass_code('', '# lsusb
Bus 001 Device 011: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
')

Control serial ports are registered:
$this->bbcode_second_pass_code('', '# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2')

It's now visible to ModemManager:
$this->bbcode_second_pass_code('', '# mmcli -L

Found 1 modems:
/org/freedesktop/ModemManager1/Modem/0 [huawei] E3131
')

$this->bbcode_second_pass_code('', '# cat /var/log/usb_modeswitch_1-1.3\:1.0

USB_ModeSwitch log from Wed Feb 15 14:14:31 UTC 2017

Use global config file: /etc/usb_modeswitch.conf

Started via systemd
Raw args from udev: _1-1.3:1.0

Use top device dir /sys/bus/usb/devices/1-1.3
Check class of first interface ...
Interface 0 class is 08.

----------------
USB values from sysfs:
manufacturer HUAWEI
product HUAWEI Mobile
serial
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /usr/share/usb_modeswitch/12d1:14fe /usr/share/usb_modeswitch/12d1:#linux
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/12d1:14fe
! matched. Read config data
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 10 -v 12d1 -p 14fe -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x14fe
TargetVendor= 0x12d1
TargetProductList="1506,150f,151d,1c1e"
HuaweiNewMode=1
System integration mode enabled

Use given bus/device number: 001/010 ...
Look for default devices ...
bus/device number matched
found USB ID 12d1:14fe
vendor ID matched
product ID matched
Found devices in default mode (1)
Get the current device configuration ...
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Using standard Huawei switching message
Looking for active driver ...
No active driver found. Detached before or never attached
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 reading failed (error -1)
Device is gone, skip any further commands
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
Wait for device file system (1 sec.) ...
Wait for device file system (2 sec.) ...
Wait for device file system (3 sec.) ...
Wait for device file system (4 sec.) ...
Wait for device file system (5 sec.) ...
Read attributes ...
All attributes matched
Mode switching was successful, found 12d1:1506 (HUAWEI: HUAWEI Mobile)
Logger is /usr/bin/logger
Serial USB driver bound to interface 0
will try to guess and symlink modem port on next connect
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated

All done, exit')

CDC device drivers are loaded:
$this->bbcode_second_pass_code('', '# lsmod
Module Size Used by
huawei_cdc_ncm 2364 0
option 33721 0
cdc_wdm 12190 2 huawei_cdc_ncm
usb_wwan 8637 1 option
cdc_ncm 22152 1 huawei_cdc_ncm
usbnet 28988 2 huawei_cdc_ncm,cdc_ncm
mii 4101 1 usbnet
usbserial 33487 2 option,usb_wwan
sr_mod 13474 0
cdrom 49673 1 sr_mod
snd_soc_hdmi_codec 6223 1
omap_aes 12929 0
snd_soc_simple_card 6468 0
snd_soc_simple_card_utils 4357 1 snd_soc_simple_card
crypto_engine 5142 1 omap_aes
omap_sham 21739 0
snd_soc_davinci_mcasp 17083 2
snd_soc_omap 3221 1 snd_soc_davinci_mcasp
snd_soc_edma 1218 1 snd_soc_davinci_mcasp
snd_soc_core 148611 6 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_hdmi_codec,snd_soc_simple_card_utils,snd_soc_omap,snd_soc_simple_card
omap_rng 4572 0
rng_core 6854 1 omap_rng
snd_pcm_dmaengine 4432 2 snd_soc_omap,snd_soc_core
tilcdc 28218 0
snd_pcm 76446 5 snd_soc_davinci_mcasp,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_soc_omap,snd_soc_core
snd_timer 17279 1 snd_pcm
snd 54031 3 snd_timer,snd_soc_core,snd_pcm
soundcore 6363 1 snd
evdev 9971 1
tps65217_charger 4723 0
tda998x 12452 0
omap_wdt 4191 0
sch_fq_codel 7437 3
ip_tables 9985 0
x_tables 15954 1 ip_tables')

Does anyone has any ideas why this is happening?

Thanks.
GrisLv
 
Posts: 2
Joined: Wed Feb 15, 2017 2:37 pm

Re: Huawei E3131 3G USB modem issue on BBB

Postby razer » Mon Mar 06, 2017 5:05 pm

Maybe something related to USBv1 (beagle) versus USBv2 (modem), that your hub fix in a manner.
razer
 
Posts: 11
Joined: Sat May 30, 2015 9:08 am

Re: Huawei E3131 3G USB modem issue on BBB

Postby GrisLv » Fri Mar 10, 2017 9:12 am

It is for sure that this is a kernel/driver issue. I compiled 4.4.43-ti-r84 kernel (the same version that used on Raspberry Pi 3) and everything works fine: usb_modeswitch, cape manager, etc...
GrisLv
 
Posts: 2
Joined: Wed Feb 15, 2017 2:37 pm


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 1 guest