The C Source, Patches and (shudder!) Bugs
Post Reply
paint
Posts: 4
Joined: 05 Feb 2016, 22:14

Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by paint » 05 Feb 2016, 22:55

Let me prefix this by stating that I do not have much knowledge in this area of things or linux in general. I did find a bug and a workaround and figured it was only appropriate to post here.

I have an Asus RT-N56u running Padavan's firmware (https://bitbucket.org/padavan/rt-n56u/). This firmware has usb_ModeSwitch 2.3.0 included in it.

I have a MHS291L(VW) that I was trying to use with my router, but was having issues with usb_ModeSwitch working.

In the router, when I enable usb modem support and connect my MHS291L, I get the following log:

(from router log)

Code: Select all

Feb  5 20:58:15 syslogd started: BusyBox v1.24.1
Feb  5 20:58:15 RT-N56U: firmware version: 3.4.3.9-099
Feb  5 20:58:15 kernel: klogd started: BusyBox v1.24.1 (2016-01-31 21:51:57 KRAT)
Feb  5 20:58:15 kernel: Linux version 3.4.110 (padavan@hms) (gcc version 4.4.7 (GCC) ) #4 Sun Jan 31 23:34:32 KRAT 2016
Feb  5 20:58:15 kernel: Ralink SoC: RT3883, RevID: 0105, RAM: DDR2, XTAL: 40MHz
Feb  5 20:58:15 kernel: CPU/OCP/SYS frequency: 500/166/166 MHz
Feb  5 20:58:15 kernel: CPU revision is: 0001974c (MIPS 74Kc)
Feb  5 20:58:15 kernel: Determined physical RAM map:
Feb  5 20:58:15 kernel:  memory: 08000000 @ 00000000 (usable)
Feb  5 20:58:15 kernel: Zone PFN ranges:
Feb  5 20:58:15 kernel:   Normal   0x00000000 -> 0x00008000
Feb  5 20:58:15 kernel: Movable zone start PFN for each node
Feb  5 20:58:15 kernel: Early memory PFN ranges
Feb  5 20:58:15 kernel:     0: 0x00000000 -> 0x00008000
Feb  5 20:58:15 kernel: On node 0 totalpages: 32768
Feb  5 20:58:15 kernel: free_area_init_node: node 0, pgdat 8032d9e0, node_mem_map 81000000
Feb  5 20:58:15 kernel:   Normal zone: 256 pages used for memmap
Feb  5 20:58:15 kernel:   Normal zone: 0 pages reserved
Feb  5 20:58:15 kernel:   Normal zone: 32512 pages, LIFO batch:7
Feb  5 20:58:15 kernel: Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Feb  5 20:58:15 kernel: Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Feb  5 20:58:15 kernel: pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Feb  5 20:58:15 kernel: pcpu-alloc: [0] 0 
Feb  5 20:58:15 kernel: Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Feb  5 20:58:15 kernel: Kernel command line: console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=squashfs
Feb  5 20:58:15 kernel: PID hash table entries: 512 (order: -1, 2048 bytes)
Feb  5 20:58:15 kernel: Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Feb  5 20:58:15 kernel: Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Feb  5 20:58:15 kernel: Writing ErrCtl register=00000000
Feb  5 20:58:15 kernel: Readback ErrCtl register=00000000
Feb  5 20:58:15 kernel: Memory: 126264k/131072k available (2839k kernel code, 4808k reserved, 416k data, 196k init, 0k highmem)
Feb  5 20:58:15 kernel: NR_IRQS:40
Feb  5 20:58:15 kernel: console [ttyS0] enabled
Feb  5 20:58:15 kernel: Calibrating delay loop... 249.34 BogoMIPS (lpj=498688)
Feb  5 20:58:15 kernel: pid_max: default: 32768 minimum: 301
Feb  5 20:58:15 kernel: Mount-cache hash table entries: 512
Feb  5 20:58:15 kernel: NET: Registered protocol family 16
Feb  5 20:58:15 kernel: bio: create slab <bio-0> at 0
Feb  5 20:58:15 kernel: SCSI subsystem initialized
Feb  5 20:58:15 kernel: usbcore: registered new interface driver usbfs
Feb  5 20:58:15 kernel: usbcore: registered new interface driver hub
Feb  5 20:58:15 kernel: usbcore: registered new device driver usb
Feb  5 20:58:15 kernel: PCI host bridge to bus 0000:00
Feb  5 20:58:15 kernel: pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
Feb  5 20:58:15 kernel: pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
Feb  5 20:58:15 kernel: pci 0000:00:00.0: [1814:0802] type 01 class 0x060400
Feb  5 20:58:15 kernel: pci 0000:00:00.0: reg 0x14: [mem 0x20100000-0x2010ffff]
Feb  5 20:58:15 kernel: pci 0000:00:00.0: supports D1
Feb  5 20:58:15 kernel: pci 0000:00:00.0: PME# supported from D0 D1 D3hot
Feb  5 20:58:15 kernel: pci 0000:01:00.0: [1814:3091] type 00 class 0x028000
Feb  5 20:58:15 kernel: pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff]
Feb  5 20:58:15 kernel: pci 0000:01:00.0: PME# supported from D0 D3hot
Feb  5 20:58:15 kernel: pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
Feb  5 20:58:15 kernel: pci 0000:00:00.0: BAR 1: assigned [mem 0x20100000-0x2010ffff]
Feb  5 20:58:15 kernel: pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x2000ffff]
Feb  5 20:58:15 kernel: pci 0000:00:00.0: PCI bridge to [bus 01-01]
Feb  5 20:58:15 kernel: pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
Feb  5 20:58:15 kernel: Switching to clocksource MIPS
Feb  5 20:58:15 kernel: NET: Registered protocol family 2
Feb  5 20:58:15 kernel: IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
Feb  5 20:58:15 kernel: TCP established hash table entries: 4096 (order: 3, 32768 bytes)
Feb  5 20:58:15 kernel: TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
Feb  5 20:58:15 kernel: TCP: Hash tables configured (established 4096 bind 4096)
Feb  5 20:58:15 kernel: TCP: reno registered
Feb  5 20:58:15 kernel: UDP hash table entries: 256 (order: 0, 4096 bytes)
Feb  5 20:58:15 kernel: NET: Registered protocol family 1
Feb  5 20:58:15 kernel: PCI: CLS 32 bytes, default 32
Feb  5 20:58:15 kernel: squashfs: version 4.0 (2009/01/31) Phillip Lougher
Feb  5 20:58:15 kernel: msgmni has been set to 246
Feb  5 20:58:15 kernel: io scheduler noop registered (default)
Feb  5 20:58:15 kernel: Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
Feb  5 20:58:15 kernel: serial8250: ttyS0 at MMIO 0x10000c00 (irq = 12) is a 16550A
Feb  5 20:58:15 kernel: Ralink GPIO driver initialized. Number of GPIO: 96, GPIO mode: 0000185D
Feb  5 20:58:15 kernel: loop: module loaded
Feb  5 20:58:15 kernel: ralink flash device: 0x1000000 at 0x1c000000
Feb  5 20:58:15 kernel: Ralink SoC physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
Feb  5 20:58:15 kernel: Ralink SoC physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Feb  5 20:58:15 kernel: Amd/Fujitsu Extended Query Table at 0x0040
Feb  5 20:58:15 kernel:   Amd/Fujitsu Extended Query version 1.1.
Feb  5 20:58:15 kernel: number of CFI chips: 1
Feb  5 20:58:15 kernel: Creating 7 MTD partitions on "Ralink SoC physically mapped flash":
Feb  5 20:58:15 kernel: 0x000000000000-0x000000030000 : "Bootloader"
Feb  5 20:58:15 kernel: 0x000000030000-0x000000040000 : "Config"
Feb  5 20:58:15 kernel: 0x000000040000-0x000000050000 : "Factory"
Feb  5 20:58:15 kernel: 0x000000050000-0x0000001787f0 : "Kernel"
Feb  5 20:58:15 kernel: 0x0000001787f0-0x0000007f0000 : "RootFS"
Feb  5 20:58:15 kernel: 0x0000007f0000-0x000000800000 : "Storage"
Feb  5 20:58:15 kernel: 0x000000050000-0x000000800000 : "Firmware_Stub"
Feb  5 20:58:15 kernel: tun: Universal TUN/TAP device driver, 1.6
Feb  5 20:58:15 kernel: tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Feb  5 20:58:15 kernel: Ralink APSoC Ethernet Driver v3.2.2 (raeth)
Feb  5 20:58:15 kernel: raeth: PDMA RX ring 256, PDMA TX ring 512. Max packet size 1536
Feb  5 20:58:15 kernel: raeth: NAPI support, weight 32
Feb  5 20:58:15 kernel: raeth: Byte Queue Limits (BQL) support
Feb  5 20:58:15 kernel: PPP generic driver version 2.4.2
Feb  5 20:58:15 kernel: PPP MPPE Compression module registered
Feb  5 20:58:15 kernel: NET: Registered protocol family 24
Feb  5 20:58:15 kernel: PPTP driver version 0.8.5
Feb  5 20:58:15 kernel: Realtek RTL8367 GigaPHY Switch Driver v2.9.
Feb  5 20:58:15 kernel: rtl8367 - hw bridge: W|LLLL
Feb  5 20:58:15 kernel: usbcore: registered new interface driver libusual
Feb  5 20:58:15 kernel: nf_conntrack version 0.5.0 (16384 buckets, 32768 max)
Feb  5 20:58:15 kernel: xt_time: kernel timezone is -0000
Feb  5 20:58:15 kernel: Bridge firewalling registered
Feb  5 20:58:15 kernel: gre: GRE over IPv4 demultiplexor driver
Feb  5 20:58:15 kernel: ip_tables: (C) 2000-2006 Netfilter Core Team
Feb  5 20:58:15 kernel: TCP: cubic registered
Feb  5 20:58:15 kernel: NET: Registered protocol family 10
Feb  5 20:58:15 kernel: ip6_tables: (C) 2000-2006 Netfilter Core Team
Feb  5 20:58:15 kernel: IPv6 over IPv4 tunneling driver
Feb  5 20:58:15 kernel: NET: Registered protocol family 17
Feb  5 20:58:15 kernel: L2TP core driver, V2.0
Feb  5 20:58:15 kernel: PPPoL2TP kernel driver, V2.0
Feb  5 20:58:15 kernel: 8021q: 802.1Q VLAN Support v1.8
Feb  5 20:58:15 kernel: ASUS NVRAM, v0.08. Available space: 61440. Integrity: OK
Feb  5 20:58:15 kernel: VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Feb  5 20:58:15 kernel: Freeing unused kernel memory: 196k freed
Feb  5 20:58:15 kernel: Algorithmics/MIPS FPU Emulator v1.5
Feb  5 20:58:15 kernel: rt2860v2_ap: module license 'Proprietary' taints kernel.
Feb  5 20:58:15 kernel: APSoC AP Driver version: 2.7.2.0
Feb  5 20:58:15 kernel: PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
Feb  5 20:58:15 kernel: RT309x AP Driver version: 2.7.1.5
Feb  5 20:58:15 kernel: usbcore: registered new interface driver usblp
Feb  5 20:58:15 kernel: Initializing USB Mass Storage driver...
Feb  5 20:58:15 kernel: usbcore: registered new interface driver usb-storage
Feb  5 20:58:15 kernel: USB Mass Storage support registered.
Feb  5 20:58:15 kernel: usbcore: registered new interface driver cdc_ether
Feb  5 20:58:15 kernel: usbcore: registered new interface driver rndis_host
Feb  5 20:58:15 kernel: usbcore: registered new interface driver cdc_wdm
Feb  5 20:58:15 kernel: usbcore: registered new interface driver qmi_wwan
Feb  5 20:58:15 kernel: usbcore: registered new interface driver cdc_ncm
Feb  5 20:58:15 kernel: usbcore: registered new interface driver huawei_cdc_ncm
Feb  5 20:58:15 kernel: usbcore: registered new interface driver cdc_mbim
Feb  5 20:58:15 kernel: usbcore: registered new interface driver sierra_net
Feb  5 20:58:15 kernel: usbcore: registered new interface driver usbserial
Feb  5 20:58:15 kernel: usbcore: registered new interface driver usbserial_generic
Feb  5 20:58:15 kernel: USB Serial support registered for generic
Feb  5 20:58:15 kernel: usbserial: USB Serial Driver core
Feb  5 20:58:15 kernel: usbcore: registered new interface driver qcserial
Feb  5 20:58:15 kernel: USB Serial support registered for Qualcomm USB modem
Feb  5 20:58:15 kernel: usbcore: registered new interface driver sierra
Feb  5 20:58:15 kernel: USB Serial support registered for Sierra USB modem
Feb  5 20:58:15 kernel: usbcore: registered new interface driver option
Feb  5 20:58:15 kernel: USB Serial support registered for GSM modem (1-port)
Feb  5 20:58:15 kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Feb  5 20:58:15 kernel: ehci-platform ehci-platform: Generic Platform EHCI Controller
Feb  5 20:58:15 kernel: ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
Feb  5 20:58:15 kernel: ehci-platform ehci-platform: irq 18, io mem 0x101c0000
Feb  5 20:58:15 kernel: ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
Feb  5 20:58:15 kernel: usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Feb  5 20:58:15 kernel: usb usb1: Product: Generic Platform EHCI Controller
Feb  5 20:58:15 kernel: usb usb1: Manufacturer: Linux 3.4.110 ehci_hcd
Feb  5 20:58:15 kernel: usb usb1: SerialNumber: ehci-platform
Feb  5 20:58:15 kernel: hub 1-0:1.0: USB hub found
Feb  5 20:58:15 kernel: hub 1-0:1.0: 2 ports detected
Feb  5 20:58:15 kernel: ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Feb  5 20:58:15 kernel: ohci-platform ohci-platform: Generic Platform OHCI Controller
Feb  5 20:58:15 kernel: ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
Feb  5 20:58:15 kernel: ohci-platform ohci-platform: irq 18, io mem 0x101c1000
Feb  5 20:58:15 kernel: usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
Feb  5 20:58:15 kernel: usb usb2: Product: Generic Platform OHCI Controller
Feb  5 20:58:15 kernel: usb usb2: Manufacturer: Linux 3.4.110 ohci_hcd
Feb  5 20:58:15 kernel: usb usb2: SerialNumber: ohci-platform
Feb  5 20:58:15 kernel: hub 2-0:1.0: USB hub found
Feb  5 20:58:15 kernel: hub 2-0:1.0: 2 ports detected
Feb  5 20:58:15 kernel: usb 1-2: new high-speed USB device number 2 using ehci-platform
Feb  5 20:58:15 kernel: usb 1-2: New USB device found, idVendor=10a9, idProduct=6080
Feb  5 20:58:15 kernel: usb 1-2: Product: PANTECH MHS291LVW
Feb  5 20:58:15 kernel: usb 1-2: Manufacturer: Pantech, Incorporated
Feb  5 20:58:15 kernel: usb 1-2: SerialNumber: PTMHS291LVW20527980
Feb  5 20:58:15 kernel: scsi0 : usb-storage 1-2:1.0
Feb  5 20:58:15 kernel: raeth: HW IP/TCP/UDP checksum RX/TX offload enabled
Feb  5 20:58:15 kernel: raeth: HW VLAN TX offload enabled
Feb  5 20:58:15 kernel: raeth: HW Scatter/Gather TX offload enabled
Feb  5 20:58:15 kernel: rtl8367 - green ethernet: off
Feb  5 20:58:15 kernel: rtl8367 - set broadcast storm control rate as: 10240 kbps
Feb  5 20:58:17 kernel: device eth2 entered promiscuous mode
Feb  5 20:58:18 kernel: scsi 0:0:0:0: CD-ROM            PANTECH  CD-ROM           0000 PQ: 0 ANSI: 2
Feb  5 20:58:18 kernel: scsi 0:0:0:0: Attached scsi generic sg0 type 5
Feb  5 20:58:18 usb_modeswitch: switch device 10a9:6080 on 001/002
Feb  5 20:58:18 kernel: br0: port 1(eth2) entered forwarding state
Feb  5 20:58:20 kernel: rtl8367 - IGMP/MLD snooping: 1
Feb  5 20:58:20 dnsmasq[481]: started, version 2.75 cachesize 1024
Feb  5 20:58:20 dnsmasq[481]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-scripts TFTP no-conntrack ipset no-auth no-DNSSEC no-loop-detect no-inotify
Feb  5 20:58:20 dnsmasq-dhcp[481]: DHCP, IP range 192.168.2.2 -- 192.168.2.244, lease time 1d
Feb  5 20:58:20 dnsmasq-dhcp[481]: DHCP, sockets bound exclusively to interface br0
Feb  5 20:58:20 dnsmasq[481]: read /etc/hosts - 3 addresses
Feb  5 20:58:20 dnsmasq[481]: read /etc/storage/dnsmasq/hosts - 0 addresses
Feb  5 20:58:20 dnsmasq-dhcp[481]: read /etc/dnsmasq/dhcp/dhcp-hosts.rc
Feb  5 20:58:20 kernel: eth3: ===> VirtualIF_open
Feb  5 20:58:21 kernel: br0: port 1(eth2) entered forwarding state
Feb  5 20:58:21 kernel: Ralink HW NAT v2.52.0 Module Enabled, FoE Size: 16384
Feb  5 20:58:21 RT-N56U: Hardware NAT/Routing: Enabled, IPoE/PPPoE offload [WAN]<->[LAN/WLAN]
Feb  5 20:58:21 RT-N56U: Hardware NAT/Routing: IPv4 UDP flow offload - OFF
Feb  5 20:58:21 DHCP WAN Client: starting on eth3 ...
Feb  5 20:58:21 miniupnpd[520]: version 1.9 starting UPnP-IGD ext if eth3 BOOTID=1454705901
Feb  5 20:58:21 miniupnpd[520]: HTTP listening on port 23328
Feb  5 20:58:21 httpd[514]: Server listening port 80 (HTTP).
Feb  5 20:58:48 login[541]: root login on 'pts/0'
(from dmesg)

Code: Select all

RT-N56U login: admin
Password:


BusyBox v1.24.1 (2016-01-31 21:51:57 KRAT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/root # dmesg
Linux version 3.4.110 (padavan@hms) (gcc version 4.4.7 (GCC) ) #4 Sun Jan 31 23:34:32 KRAT 2016

Ralink SoC: RT3883, RevID: 0105, RAM: DDR2, XTAL: 40MHz
CPU/OCP/SYS frequency: 500/166/166 MHz
CPU revision is: 0001974c (MIPS 74Kc)
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00008000
Movable zone start PFN for each node
Early memory PFN ranges
    0: 0x00000000 -> 0x00008000
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat 8032d9e0, node_mem_map 81000000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32512 pages, LIFO batch:7
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=squashfs
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 126264k/131072k available (2839k kernel code, 4808k reserved, 416k data, 196k init, 0k highmem)
NR_IRQS:40
console [ttyS0] enabled
Calibrating delay loop... 249.34 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
pci 0000:00:00.0: [1814:0802] type 01 class 0x060400
pci 0000:00:00.0: reg 0x14: [mem 0x20100000-0x2010ffff]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:01:00.0: [1814:3091] type 00 class 0x028000
pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff]
pci 0000:01:00.0: PME# supported from D0 D3hot
pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
pci 0000:00:00.0: BAR 1: assigned [mem 0x20100000-0x2010ffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x2000ffff]
pci 0000:00:00.0: PCI bridge to [bus 01-01]
pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
PCI: CLS 32 bytes, default 32
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 246
io scheduler noop registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000c00 (irq = 12) is a 16550A
Ralink GPIO driver initialized. Number of GPIO: 96, GPIO mode: 0000185D
loop: module loaded
ralink flash device: 0x1000000 at 0x1c000000
Ralink SoC physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
Ralink SoC physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.1.
number of CFI chips: 1
Creating 7 MTD partitions on "Ralink SoC physically mapped flash":
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x0000001787f0 : "Kernel"
0x0000001787f0-0x0000007f0000 : "RootFS"
0x0000007f0000-0x000000800000 : "Storage"
0x000000050000-0x000000800000 : "Firmware_Stub"
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Ralink APSoC Ethernet Driver v3.2.2 (raeth)
raeth: PDMA RX ring 256, PDMA TX ring 512. Max packet size 1536
raeth: NAPI support, weight 32
raeth: Byte Queue Limits (BQL) support
PPP generic driver version 2.4.2
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPTP driver version 0.8.5
Realtek RTL8367 GigaPHY Switch Driver v2.9.
rtl8367 - hw bridge: W|LLLL
usbcore: registered new interface driver libusual
nf_conntrack version 0.5.0 (16384 buckets, 32768 max)
xt_time: kernel timezone is -0000
Bridge firewalling registered
gre: GRE over IPv4 demultiplexor driver
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
8021q: 802.1Q VLAN Support v1.8
ASUS NVRAM, v0.08. Available space: 61440. Integrity: OK
VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Freeing unused kernel memory: 196k freed
Algorithmics/MIPS FPU Emulator v1.5
rt2860v2_ap: module license 'Proprietary' taints kernel.
APSoC AP Driver version: 2.7.2.0
PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
RT309x AP Driver version: 2.7.1.5
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver qmi_wwan
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver huawei_cdc_ncm
usbcore: registered new interface driver cdc_mbim
usbcore: registered new interface driver sierra_net
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
USB Serial support registered for generic
usbserial: USB Serial Driver core
usbcore: registered new interface driver qcserial
USB Serial support registered for Qualcomm USB modem
usbcore: registered new interface driver sierra
USB Serial support registered for Sierra USB modem
usbcore: registered new interface driver option
USB Serial support registered for GSM modem (1-port)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform ehci-platform: Generic Platform EHCI Controller
ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
ehci-platform ehci-platform: irq 18, io mem 0x101c0000
ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: Product: Generic Platform EHCI Controller
usb usb1: Manufacturer: Linux 3.4.110 ehci_hcd
usb usb1: SerialNumber: ehci-platform
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform ohci-platform: Generic Platform OHCI Controller
ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
ohci-platform ohci-platform: irq 18, io mem 0x101c1000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: Product: Generic Platform OHCI Controller
usb usb2: Manufacturer: Linux 3.4.110 ohci_hcd
usb usb2: SerialNumber: ohci-platform
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-2: new high-speed USB device number 2 using ehci-platform
usb 1-2: New USB device found, idVendor=10a9, idProduct=6080
usb 1-2: Product: PANTECH MHS291LVW
usb 1-2: Manufacturer: Pantech, Incorporated
usb 1-2: SerialNumber: PTMHS291LVW20527980
scsi0 : usb-storage 1-2:1.0
raeth: HW IP/TCP/UDP checksum RX/TX offload enabled
raeth: HW VLAN TX offload enabled
raeth: HW Scatter/Gather TX offload enabled
rtl8367 - green ethernet: off
rtl8367 - set broadcast storm control rate as: 10240 kbps
device eth2 entered promiscuous mode
scsi 0:0:0:0: CD-ROM            PANTECH  CD-ROM           0000 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5
br0: port 1(eth2) entered forwarding state
br0: port 1(eth2) entered forwarding state
rtl8367 - IGMP/MLD snooping: 1
eth3: ===> VirtualIF_open
br0: port 1(eth2) entered forwarding state
Ralink HW NAT v2.52.0 Module Enabled, FoE Size: 16384
/home/root #
It looks like my modem was being detected by modeswitch, but never switching over. I tried messing around with the modeswitch command manually, and I'm not sure exactly what I am doing, but I do know I can repeat the actions to below with the result being my modem correctly connecting.

I tried running this command through telnet
usb_modeswitch -F 1 -s 5 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
which results to this output

Code: Select all

/home/root # usb_modeswitch -F 1 -s 5 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1
Success check enabled, max. wait time 5 seconds

Look for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 015 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Waiting for auto-switch of Pantech modem ...

Check for mode switch (max. 5 times, once per second) ...
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No new devices in target mode or class found

Mode switch has failed. Bye!
I've tried changing the -s to 30 to give more time, but it made no difference.

I then tried running the following command
usb_modeswitch -F 2 -s 5 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
which resulted in this output

Code: Select all

/home/root # usb_modeswitch -F 2 -s 5 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1
Success check enabled, max. wait time 5 seconds

Look for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 015 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Send Pantech control message, wValue 2 ...
 Error: Pantech control message failed (error -9). Abort
At this point, I've checked my router gui, but still no connection.

I then try running this command again:
usb_modeswitch -F 1 -s 5 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
and this time it works!

Code: Select all

/home/root # usb_modeswitch -F 1 -s 5 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1
Success check enabled, max. wait time 5 seconds

Look for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 021 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Waiting for auto-switch of Pantech modem ...

Check for mode switch (max. 5 times, once per second) ...
 Search for target devices ...
  found USB ID 10a9:6085
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001

Found target device 022 on bus 001

Target device description data
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
 Found correct target device

Mode switch succeeded. Bye!
I go back to my webUI and can verify this my modem is now detected and I can use it.


Below in the telnet info and dmesg for the following process:
Disconnected and reconnected the MHS291L > Reboot Router > ran command with -F 1 > ran command with -F 2 > reran command with -F 1

Session Data

Code: Select all

RT-N56U login: admin
Password:


BusyBox v1.24.1 (2016-01-31 21:51:57 KRAT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/root # usb_modeswitch -F 1 -s 3 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1
Success check enabled, max. wait time 3 seconds

Look for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 002 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Waiting for auto-switch of Pantech modem ...

Check for mode switch (max. 3 times, once per second) ...
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Search for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No new devices in target mode or class found

Mode switch has failed. Bye!

/home/root # usb_modeswitch -F 2 -s 3 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1
Success check enabled, max. wait time 3 seconds

Look for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 002 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Send Pantech control message, wValue 2 ...
 Error: Pantech control message failed (error -9). Abort

/home/root # usb_modeswitch -F 1 -s 3 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1
Success check enabled, max. wait time 3 seconds

Look for target devices ...
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 002 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Waiting for auto-switch of Pantech modem ...

Check for mode switch (max. 3 times, once per second) ...
 Search for target devices ...
  found USB ID 10a9:6085
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001

Found target device 003 on bus 001

Target device description data
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW20527980
-------------------------
 Found correct target device

Mode switch succeeded. Bye!
dmesg

Code: Select all

/home/root # dmesg
Linux version 3.4.110 (padavan@hms) (gcc version 4.4.7 (GCC) ) #4 Sun Jan 31 23:34:32 KRAT 2016

Ralink SoC: RT3883, RevID: 0105, RAM: DDR2, XTAL: 40MHz
CPU/OCP/SYS frequency: 500/166/166 MHz
CPU revision is: 0001974c (MIPS 74Kc)
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00008000
Movable zone start PFN for each node
Early memory PFN ranges
    0: 0x00000000 -> 0x00008000
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat 8032d9e0, node_mem_map 81000000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32512 pages, LIFO batch:7
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=squashfs
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 126264k/131072k available (2839k kernel code, 4808k reserved, 416k data, 196k init, 0k highmem)
NR_IRQS:40
console [ttyS0] enabled
Calibrating delay loop... 249.34 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
pci 0000:00:00.0: [1814:0802] type 01 class 0x060400
pci 0000:00:00.0: reg 0x14: [mem 0x20100000-0x2010ffff]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:01:00.0: [1814:3091] type 00 class 0x028000
pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff]
pci 0000:01:00.0: PME# supported from D0 D3hot
pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
pci 0000:00:00.0: BAR 1: assigned [mem 0x20100000-0x2010ffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x2000ffff]
pci 0000:00:00.0: PCI bridge to [bus 01-01]
pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
PCI: CLS 32 bytes, default 32
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 246
io scheduler noop registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000c00 (irq = 12) is a 16550A
Ralink GPIO driver initialized. Number of GPIO: 96, GPIO mode: 0000185D
loop: module loaded
ralink flash device: 0x1000000 at 0x1c000000
Ralink SoC physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
Ralink SoC physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.1.
number of CFI chips: 1
Creating 7 MTD partitions on "Ralink SoC physically mapped flash":
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x0000001787f0 : "Kernel"
0x0000001787f0-0x0000007f0000 : "RootFS"
0x0000007f0000-0x000000800000 : "Storage"
0x000000050000-0x000000800000 : "Firmware_Stub"
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Ralink APSoC Ethernet Driver v3.2.2 (raeth)
raeth: PDMA RX ring 256, PDMA TX ring 512. Max packet size 1536
raeth: NAPI support, weight 32
raeth: Byte Queue Limits (BQL) support
PPP generic driver version 2.4.2
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPTP driver version 0.8.5
Realtek RTL8367 GigaPHY Switch Driver v2.9.
rtl8367 - hw bridge: W|LLLL
usbcore: registered new interface driver libusual
nf_conntrack version 0.5.0 (16384 buckets, 32768 max)
xt_time: kernel timezone is -0000
Bridge firewalling registered
gre: GRE over IPv4 demultiplexor driver
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
8021q: 802.1Q VLAN Support v1.8
ASUS NVRAM, v0.08. Available space: 61440. Integrity: OK
VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Freeing unused kernel memory: 196k freed
Algorithmics/MIPS FPU Emulator v1.5
rt2860v2_ap: module license 'Proprietary' taints kernel.
APSoC AP Driver version: 2.7.2.0
PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
RT309x AP Driver version: 2.7.1.5
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver qmi_wwan
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver huawei_cdc_ncm
usbcore: registered new interface driver cdc_mbim
usbcore: registered new interface driver sierra_net
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
USB Serial support registered for generic
usbserial: USB Serial Driver core
usbcore: registered new interface driver qcserial
USB Serial support registered for Qualcomm USB modem
usbcore: registered new interface driver sierra
USB Serial support registered for Sierra USB modem
usbcore: registered new interface driver option
USB Serial support registered for GSM modem (1-port)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform ehci-platform: Generic Platform EHCI Controller
ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
ehci-platform ehci-platform: irq 18, io mem 0x101c0000
ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: Product: Generic Platform EHCI Controller
usb usb1: Manufacturer: Linux 3.4.110 ehci_hcd
usb usb1: SerialNumber: ehci-platform
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform ohci-platform: Generic Platform OHCI Controller
ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
ohci-platform ohci-platform: irq 18, io mem 0x101c1000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: Product: Generic Platform OHCI Controller
usb usb2: Manufacturer: Linux 3.4.110 ohci_hcd
usb usb2: SerialNumber: ohci-platform
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-2: new high-speed USB device number 2 using ehci-platform
usb 1-2: New USB device found, idVendor=10a9, idProduct=6080
usb 1-2: Product: PANTECH MHS291LVW
usb 1-2: Manufacturer: Pantech, Incorporated
usb 1-2: SerialNumber: PTMHS291LVW20527980
scsi0 : usb-storage 1-2:1.0
raeth: HW IP/TCP/UDP checksum RX/TX offload enabled
raeth: HW VLAN TX offload enabled
raeth: HW Scatter/Gather TX offload enabled
rtl8367 - green ethernet: off
rtl8367 - set broadcast storm control rate as: 10240 kbps
device eth2 entered promiscuous mode
scsi 0:0:0:0: CD-ROM            PANTECH  CD-ROM           0000 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5
br0: port 1(eth2) entered forwarding state
br0: port 1(eth2) entered forwarding state
rtl8367 - IGMP/MLD snooping: 1
eth3: ===> VirtualIF_open
br0: port 1(eth2) entered forwarding state
Ralink HW NAT v2.52.0 Module Enabled, FoE Size: 16384
usb 1-2: USB disconnect, device number 2
usb 1-2: new high-speed USB device number 3 using ehci-platform
usb 1-2: New USB device found, idVendor=10a9, idProduct=6085
usb 1-2: Product: PANTECH MHS291LVW
usb 1-2: Manufacturer: Pantech, Incorporated
usb 1-2: SerialNumber: PTMHS291LVW20527980
rndis_host 1-2:1.0: weth0: register 'rndis_host' at usb-ehci-platform-2, RNDIS device, d2:57:85:79:92:62
eth3: ===> VirtualIF_close
eth3: ===> VirtualIF_open
/home/root #

I am happy to have this working, but unfortunately, I must do this process manually every time. If someone could help to resolve this issue, I would appreciate it!

I am willing to provide more information, try some additional things, but I will need detailed instructions as this is not my forte. It looks like the router firmware has busybox installed to give an idea of what commands I have access to.

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by LOM » 06 Feb 2016, 03:22

Hmm..
It seems you've become victim of a code change we made for a similar type of modem.

Please try one switch only and check the usb id with lsusb after a few seconds:

usb_modeswitch -F 2 -v 10a9 -p 6080 -V 10a9 -P 6085 -W

It is even better if you can send that cmd without enabling usb modem support, it would guarantee that the router firmware doesn't start switching before or while you are running the manual cmd.

paint
Posts: 4
Joined: 05 Feb 2016, 22:14

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by paint » 06 Feb 2016, 04:23

I have disabled usb modem support and rebooted the router. Unfortunately, it appears lsusb command has been disabled. I will post the content of /proc/bus/usb/devices instead.

Post Boot - Pre Command
/ # cat /proc/bus/usb/devices

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ohci_hcd
S: Product=Generic Platform OHCI Controller
S: SerialNumber=ohci-platform
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= 2 Ivl=255ms

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=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ehci_hcd
S: Product=Generic Platform EHCI Controller
S: SerialNumber=ehci-platform
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#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04f9 ProdID=002a Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-5240
S: SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=10a9 ProdID=6080 Rev= 2.28
S: Manufacturer=Pantech, Incorporated
S: Product=PANTECH MHS291LVW
S: SerialNumber=PTMHS291LVW20527980
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us


suggested command: usb_modeswitch -F 2 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
/ # usb_modeswitch -F 2 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x10a9
DefaultProduct= 0x6080
TargetVendor= 0x10a9
TargetProduct= 0x6085
PantechMode=1

Look for target devices ...
found USB ID 04f9:002a
found USB ID 10a9:6080
vendor ID matched
found USB ID 1d6b:0002
found USB ID 1d6b:0001
No devices in target mode or class found
Look for default devices ...
found USB ID 04f9:002a
found USB ID 10a9:6080
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 003 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
Product: PANTECH MHS291LVW
Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
No active driver found. Detached before or never attached
Send Pantech control message, wValue 2 ...
Error: Pantech control message failed (error -9). Abort
devices after suggested command
/ # cat /proc/bus/usb/devices

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ohci_hcd
S: Product=Generic Platform OHCI Controller
S: SerialNumber=ohci-platform
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= 2 Ivl=255ms

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=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ehci_hcd
S: Product=Generic Platform EHCI Controller
S: SerialNumber=ehci-platform
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#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04f9 ProdID=002a Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-5240
S: SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=10a9 ProdID=6080 Rev= 2.28
S: Manufacturer=Pantech, Incorporated
S: Product=PANTECH MHS291LVW
S: SerialNumber=PTMHS291LVW20527980
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

/ # cat /proc/bus/usb/devices

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ohci_hcd
S: Product=Generic Platform OHCI Controller
S: SerialNumber=ohci-platform
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= 2 Ivl=255ms

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=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ehci_hcd
S: Product=Generic Platform EHCI Controller
S: SerialNumber=ehci-platform
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#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04f9 ProdID=002a Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-5240
S: SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=10a9 ProdID=6080 Rev= 2.28
S: Manufacturer=Pantech, Incorporated
S: Product=PANTECH MHS291LVW
S: SerialNumber=PTMHS291LVW20527980
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
I checked this repeatedly for about 1 minute, the prodID always stayed at 6080


After waiting a minute, I went ahead and ran: usb_modeswitch -F 1 -v 10a9 -p 6080 -V 10a9 -P 6085 -W

command log
/ # usb_modeswitch -F 1 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x10a9
DefaultProduct= 0x6080
TargetVendor= 0x10a9
TargetProduct= 0x6085
PantechMode=1

Look for target devices ...
found USB ID 04f9:002a
found USB ID 10a9:6080
vendor ID matched
found USB ID 1d6b:0002
found USB ID 1d6b:0001
No devices in target mode or class found
Look for default devices ...
found USB ID 04f9:002a
found USB ID 10a9:6080
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 003 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
Product: PANTECH MHS291LVW
Serial No.: PTMHS291LVW20527980
-------------------------
Looking for active driver ...
No active driver found. Detached before or never attached
Waiting for auto-switch of Pantech modem ...
-> Run lsusb to note any changes. Bye!
devices
/ # cat /proc/bus/usb/devices

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ohci_hcd
S: Product=Generic Platform OHCI Controller
S: SerialNumber=ohci-platform
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= 2 Ivl=255ms

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=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.04
S: Manufacturer=Linux 3.4.110 ehci_hcd
S: Product=Generic Platform EHCI Controller
S: SerialNumber=ehci-platform
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#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04f9 ProdID=002a Rev= 1.00
S: Manufacturer=Brother
S: Product=HL-5240
S: SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=10a9 ProdID=6085 Rev= 2.28
S: Manufacturer=Pantech, Incorporated
S: Product=PANTECH MHS291LVW
S: SerialNumber=PTMHS291LVW20527980

C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
A: FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=02 Prot=01
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=(none)
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 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#= 2 Alt= 0 #EPs= 3 Cls=02(comm.) Sub=e0 Prot=11 Driver=(none)
E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none)
E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=e0 Prot=10 Driver=(none)
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
It does appear the command with '-F 1' must run after command with '-F 2' for the ProdID to change from 6080>6085

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by LOM » 06 Feb 2016, 07:17

paint wrote:
It does appear the command with '-F 1' must run after command with '-F 2' for the ProdID to change from 6080>6085
Yes and that makes this even more strange since -F 1 does not do any switching, it just waits for the device to switch by itself.
Can you please change the -F 2 to -F 4 and check if that makes any difference.
If not then run the additional -F 1 cmd and check if usb id changes, if it does then please show me the cat from devices for that new id.

paint
Posts: 4
Joined: 05 Feb 2016, 22:14

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by paint » 06 Feb 2016, 16:12

I ran the command with -F 4, the ProdID did not change. I then tried running the command with -F 1, the ProdID was still 6080.

Code: Select all

RT-N56U login: admin
Password:


BusyBox v1.24.1 (2016-01-31 21:51:57 KRAT) built-in shell (ash)
Enter 'help' for a list of built-in commands.
==============================
Before any commands ran
==============================
/home/root # cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.04
S:  Manufacturer=Linux 3.4.110 ohci_hcd
S:  Product=Generic Platform OHCI Controller
S:  SerialNumber=ohci-platform
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=   2 Ivl=255ms

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=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.04
S:  Manufacturer=Linux 3.4.110 ehci_hcd
S:  Product=Generic Platform EHCI Controller
S:  SerialNumber=ehci-platform
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#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04f9 ProdID=002a Rev= 1.00
S:  Manufacturer=Brother
S:  Product=HL-5240
S:  SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=10a9 ProdID=6080 Rev= 2.28
S:  Manufacturer=Pantech, Incorporated
S:  Product=PANTECH MHS291LVW
S:  SerialNumber=PTMHS291LVW0123456789ABCDEF
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
/home/root #

==============================================
Command with -F 4
==============================================
/home/root # usb_modeswitch -F 4 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1

Look for target devices ...
  found USB ID 04f9:002a
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 04f9:002a
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 005 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
Bogus Class/InterfaceClass: 0x02/0x08

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW0123456789ABCDEF
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Send Pantech control message, wValue 4 ...
 Error: Pantech control message failed (error -9). Abort

==========================================
Devices after -F 4 command ran
==========================================

/home/root # cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.04
S:  Manufacturer=Linux 3.4.110 ohci_hcd
S:  Product=Generic Platform OHCI Controller
S:  SerialNumber=ohci-platform
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=   2 Ivl=255ms

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=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.04
S:  Manufacturer=Linux 3.4.110 ehci_hcd
S:  Product=Generic Platform EHCI Controller
S:  SerialNumber=ehci-platform
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#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04f9 ProdID=002a Rev= 1.00
S:  Manufacturer=Brother
S:  Product=HL-5240
S:  SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=10a9 ProdID=6080 Rev= 2.28
S:  Manufacturer=Pantech, Incorporated
S:  Product=PANTECH MHS291LVW
S:  SerialNumber=PTMHS291LVW0123456789ABCDEF
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

===========================================================
Command ran with -F 1
===========================================================
# usb_modeswitch -F 1 -v 10a9 -p 6080 -V 10a9 -P 6085 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x10a9
DefaultProduct= 0x6080
TargetVendor=   0x10a9
TargetProduct=  0x6085
PantechMode=1

Look for target devices ...
  found USB ID 04f9:002a
  found USB ID 10a9:6080
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 04f9:002a
  found USB ID 10a9:6080
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 005 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
Bogus Class/InterfaceClass: 0x02/0x08

USB description data (for identification)
-------------------------
Manufacturer: Pantech, Incorporated
     Product: PANTECH MHS291LVW
  Serial No.: PTMHS291LVW0123456789ABCDEF
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Waiting for auto-switch of Pantech modem ...
-> Run lsusb to note any changes. Bye!

===========================================================
Devices after -F 1 command
===========================================================
/home/root # cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 3.04
S:  Manufacturer=Linux 3.4.110 ohci_hcd
S:  Product=Generic Platform OHCI Controller
S:  SerialNumber=ohci-platform
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=   2 Ivl=255ms

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=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.04
S:  Manufacturer=Linux 3.4.110 ehci_hcd
S:  Product=Generic Platform EHCI Controller
S:  SerialNumber=ehci-platform
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#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04f9 ProdID=002a Rev= 1.00
S:  Manufacturer=Brother
S:  Product=HL-5240
S:  SerialNumber=G6J526163
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=10a9 ProdID=6080 Rev= 2.28
S:  Manufacturer=Pantech, Incorporated
S:  Product=PANTECH MHS291LVW
S:  SerialNumber=PTMHS291LVW0123456789ABCDEF
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
/home/root #


LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by LOM » 07 Feb 2016, 07:10

paint wrote:I ran the command with -F 4, the ProdID did not change. I then tried running the command with -F 1, the ProdID was still 6080.
ok, this shows that MHS291L does not have multiple modes like its cousin UML295.
UML295 also switches mode automatically after a few seconds but MHS291L does not.

MHS291L should switch with a single cmd (the -F 2) and I have seen it do so in a dd-wrt thread, it even showed the same libusb error -9 as in your usb_modeswitch log but it did switch nevertheless.

Have you tried the dongle in the other usb port of your RT-N56U?
Do you have a linux desktop machine you can test the switching on?
There is something really strange in switching being successful after sending a cmd ( -F 1) which does not send any data to the dongle but just waits for the dongle to switch.

@Josh
We need to change the config file for 10a9:6080 so it behaves like before, ie change PantechMode=1 to PantechMode=2. I have put it into the to-do-list for next data package..

paint
Posts: 4
Joined: 05 Feb 2016, 22:14

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by paint » 07 Feb 2016, 07:32

I've tried both USB ports on the router with the same results. I will try to get Linux running on a PC this week and test it.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Issue with usb_ModeSwitch and MHS291L (and workaround)

Post by Josh » 08 Feb 2016, 04:39

LOM wrote:@Josh
We need to change the config file for 10a9:6080
Noted.

Post Reply