Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
Killerbug
Posts: 4
Joined: 28 Jul 2014, 16:37

Huawei K3772 not switching

Post by Killerbug » 30 Jul 2014, 15:49

Hi all,

I'm using a Vodafone Huawei K3772 3g dongle.

I found the configuration as following:

Code: Select all

# Vodafone / Huawei K3772

DefaultVendor= 0x12d1
DefaultProduct=0x1526

TargetVendor=  0x12d1
TargetProduct= 0x14cf

MessageContent="55534243123456780000000000000011062000000100000000000000000000"
When I run it on my minimal Linux platform the modeswitch hangs:

Code: Select all

# usb_modeswitch -v 12d1 -p 1526 -V 12d1 -P 14cf -m 0f -M 5553424312345678000000
0000000011062000000100000000000000000000 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1526
TargetVendor=   0x12d1
TargetProduct=  0x14cf
MessageEndpoint=0x0f
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0

Look for target devices ...
  found USB ID 0000:0000
  found USB ID 12d1:1526
   vendor ID matched
  found USB ID 0000:0000
 No devices in target mode or class found
Look for default devices ...
  found USB ID 0000:0000
  found USB ID 12d1:1526
   vendor ID matched
   product ID matched
  found USB ID 0000:0000
 Found devices in default mode (1)
Access device 003 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x0f (out) and 0x81 (in)
Any suggestions to why it hangs? The last lines of strace are the following:

Code: Select all

write(1, "Look for default devices ...\n", 29Look for default devices ...
) = 29
stat("/proc/bus/usb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/proc/bus/usb", O_RDONLY)         = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
getdents(5, /* 5 entries */, 3933)      = 84
stat("/proc/bus/usb/002", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/usb/002", O_RDONLY)     = 6
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
brk(0x455000)                           = 0x455000
getdents(6, /* 3 entries */, 3933)      = 48
getdents(6, 0x7fbfcb98, 3933out of memory
)           = 0
close(6)                                = 0
stat("/proc/bus/usb/001", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/usb/001", O_RDONLY)     = 6
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
getdents(6, /* 4 entries */, 3933)      = 64
getdents(6, 0x7fbfcb98, 3933out of memory
)           = 0
close(6)                                = 0
getdents(5, 0x7fbfcb98, 3933out of memory
)           = 0
close(5)                                = 0
write(1, "   product ID matched\n", 22   product ID matched
) = 22
write(1, " Found devices in default mode ("..., 35 Found devices in default mode (1)
) = 35
write(1, "Access device 003 on bus 001\n", 29Access device 003 on bus 001
) = 29
open("/proc/bus/usb/001/003", O_RDWR)   = 5
write(4, "\1", 1)                       = 1
read(3, "\1", 1)                        = 1
write(1, "Current configuration number is "..., 34Current configuration number is 1
) = 34
write(1, "Use interface number 0\n", 23Use interface number 0
) = 23
write(1, "Use endpoints 0x0f (out) and 0x8"..., 39Use endpoints 0x0f (out) and 0x81 (in)
) = 39
clock_gettime(CLOCK_MONOTONIC, {14376, 149782637}) = 0
ioctl(5, USBDEVFS_SUBMITURB, 0x451200)  = 0
clock_gettime(CLOCK_MONOTONIC, {14376, 153095682}) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLOUT, revents=POLLOUT}], 2, 997) = 1
ioctl(5, USBDEVFS_REAPURBNDELAY, 0x7fbfea80) = 0
clock_gettime(CLOCK_MONOTONIC, {14376, 158219999}) = 0
ioctl(5, USBDEVFS_SUBMITURB, 0x451200)  = 0
clock_gettime(CLOCK_MONOTONIC, {14376, 161716104}) = 0
Any help would be appriciated. I'm running the latest version of usb_modeswitch (self compiled).

Greetings,
Killerbug

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

Re: Huawei K3772 not switching

Post by Josh » 30 Jul 2014, 17:16

What happens if you just leave the endpoint parameter away?

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

Re: Huawei K3772 not switching

Post by LOM » 30 Jul 2014, 17:32

I bet it will work without the endpoint given, endpoint 0f is not likely to be right. 01 is more likely.

@Killerbug

Can you get me a interface/endpoint listing of the device, either lsusb -v -d 12d1:1526 or
cat /proc/bus/usb/devices

I have a listing for the device but it is made with the crappy shell script usb-devices which filters out almost all useful info :(

Killerbug
Posts: 4
Joined: 28 Jul 2014, 16:37

Re: Huawei K3772 not switching

Post by Killerbug » 31 Jul 2014, 08:49

Hi,

Thanks for your responses.

When I run it without the end point I get the following:

Code: Select all

usb_modeswitch -v 12d1 -p 1526 -V 12d1 -P 14cf -M 55534243123456780000000000000011062000000100000000000000000000 -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1526
TargetVendor=   0x12d1
TargetProduct=  0x14cf
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0

Look for target devices ...
  found USB ID 0000:0000
  found USB ID 12d1:1526
   vendor ID matched
  found USB ID 0000:0000
 No devices in target mode or class found
Look for default devices ...
  found USB ID 0000:0000
  found USB ID 12d1:1526
   vendor ID matched
   product ID matched
  found USB ID 0000:0000
 Found devices in default mode (1)
Access device 003 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
lsusb -v -d 12d1:1526 (doesn't give much, the linux enviroment is minimal)

Code: Select all

0000:0000 (bus 2, device 1)
12d1:1526 (bus 1, device 3)
0000:0000 (bus 1, device 1)
cat /proc/bus/usb/devices

Code: Select all

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 1
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=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.21 ohci_hcd
S:  Product=RT3xxx OHCI Controller
S:  SerialNumber=rt3xxx-ohci
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= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.21 ehci_hcd
S:  Product=Ralink EHCI Host Controller
S:  SerialNumber=rt3xxx
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#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1526 Rev= 1.02
S:  Manufacturer=Vodafone (Huawei)
S:  Product=Vodafone Mobile Broadband (Huawei)
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

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

Re: Huawei K3772 not switching

Post by LOM » 31 Jul 2014, 14:11

So endpoint 01 is the correct one and also what usb_modeswitch picks when not forced to use your manually defined endpoint.
Is there any difference in strace now?
Does it switch if you run the usb_modeswitch cmd two times in a row?

You can simplify the cmd line since you are using the latest usb_modeswitch version:
usb_modeswitch -v 12d1 -p 1526 -J -W

Killerbug
Posts: 4
Joined: 28 Jul 2014, 16:37

Re: Huawei K3772 not switching

Post by Killerbug » 01 Aug 2014, 10:01

Hi,

Thanks for your reaction. Running the command multiple times doens't help either.

When I run the shorted command I get:

Code: Select all

usb_modeswitch -v 12d1 -p 1526 -J -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1526
HuaweiNewMode=1
NeedResponse=0

Look for default devices ...
  found USB ID 0000:0000
  found USB ID 12d1:1526
   vendor ID matched
   product ID matched
  found USB ID 0000:0000
 Found devices in default mode (1)
Access device 002 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

# usb_modeswitch -v 12d1 -p 1526 -J -W
Take all parameters from the command line


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

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1526
HuaweiNewMode=1
NeedResponse=0

Look for default devices ...
  found USB ID 0000:0000
  found USB ID 12d1:1526
   vendor ID matched
   product ID matched
  found USB ID 0000:0000
 Found devices in default mode (1)
Access device 002 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
Here is a full strace log

Code: Select all

strace -Ff usb_modeswitch -v 12d1 -p 1526 -J -W
execve("/usr/sbin/usb_modeswitch", ["usb_modeswitch", "-v", "12d1", "-p", "1526", "-J", "-W"], [/* 7 vars */]) = 0
svr4_syscall()                          = -1 ERRNO_4090 (Unknown error 4090)
stat("//etc/ld.so.cache", 0x7f9c4b00) = -1 ENOENT (No such file or directory)
open("/lib/libusb.so.1.0.0", O_RDONLY)  = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\340\26"..., 4096) = 4096
old_mmap(NULL, 315392, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaef000
old_mmap(0x2aaef000, 47268, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aaef000
old_mmap(0x2ab3a000, 4480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x2ab3a000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\320\256"..., 4096) = 4096
old_mmap(NULL, 630784, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab3c000
old_mmap(0x2ab3c000, 342660, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab3c000
old_mmap(0x2abcf000, 7772, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x53000) = 0x2abcf000
old_mmap(0x2abd1000, 16984, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2abd1000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0@5\0\000"..., 4096) = 4096
old_mmap(NULL, 348160, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2abd6000
old_mmap(0x2abd6000, 58920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2abd6000
old_mmap(0x2ac24000, 19696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x2ac24000
old_mmap(0x2ac29000, 8176, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac29000
close(3)                                = 0
munmap(0x2aaaf000, 4096)                = 0
mprotect(0x2ab3a000, 4096, PROT_READ)   = 0
mprotect(0x2abcf000, 4096, PROT_READ)   = 0
mprotect(0x2aaed000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
getpid()                                = 785
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=1073741823}) = 0
rt_sigaction(SIGRT_0, {0x4000000, [], SA_STACK|SA_INTERRUPT|SA_NOCLDWAIT|0x2bcea54}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {0x4000000, [], SA_STACK|SA_INTERRUPT|SA_SIGINFO|SA_NOCLDWAIT|0x2bceb24}, NULL, 16) = 0
rt_sigaction(SIGRT_2, {0x4000000, [], SA_STACK|SA_INTERRUPT|SA_NOCLDWAIT|0x2bcecd0}, NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0
brk(0)                                  = 0x451000
brk(0x452000)                           = 0x452000
rt_sigaction(SIGTERM, {0x14000000, [], SA_SIGINFO|0x404c70}, {SIG_DFL}, 16) = 0
write(1, "Take all parameters from the com"..., 43Take all parameters from the command line

) = 43
write(1, "\n * usb_modeswitch: handle USB d"..., 70
 * usb_modeswitch: handle USB devices with multiple modes
 * Version ) = 70
write(1, "2.2.0 (C) Josua Dietze 2014\n * B"..., 962.2.0 (C) Josua Dietze 2014
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

) = 96
write(1, "DefaultVendor=  0x12d1\n", 23DefaultVendor=  0x12d1
) = 23
write(1, "DefaultProduct= 0x1526\n", 23DefaultProduct= 0x1526
) = 23
write(1, "HuaweiNewMode=1\n", 16HuaweiNewMode=1
)       = 16
write(1, "NeedResponse=0\n", 15NeedResponse=0
)        = 15
write(1, "\n", 1
)                       = 1
stat("/dev/bus/usb", 0x7f9c4ad8)        = -1 ENOENT (No such file or directory)
stat("/proc/bus/usb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/proc/bus/usb", O_RDONLY)         = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
brk(0x453000)                           = 0x453000
getdents(3, /* 5 entries */, 3933)      = 84
close(3)                                = 0
stat("/sys/bus/usb/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
pipe([0, 0])                            = 3
write(1, "Look for default devices ...\n", 29Look for default devices ...
) = 29
stat("/sys/bus/usb/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/sys/bus/usb/devices", O_RDONLY)  = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
getdents(5, /* 8 entries */, 3933)      = 140
stat("/sys/bus/usb/devices/1-1/descriptors", 0x7f9c3af8) = -1 ENOENT (No such file or directory)
open("/sys/bus/usb/devices/1-1/busnum", O_RDONLY) = -1 ENOENT (No such file or directory)
close(5)                                = 0
stat("/proc/bus/usb", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/proc/bus/usb", O_RDONLY)         = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
getdents(5, /* 5 entries */, 3933)      = 84
stat("/proc/bus/usb/002", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/usb/002", O_RDONLY)     = 6
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
brk(0x454000)                           = 0x454000
getdents(6, /* 3 entries */, 3933)      = 48
open("/proc/bus/usb/002/001", O_RDWR)   = 7
ioctl(7, USBDEVFS_CONTROL, 0x7f9c3b58)  = 1
read(7, "\22\1\20\1\t\0\0@\0\0\0\0\6\2\3\2\1\1", 18) = 18
open("/proc/bus/usb/002/001", O_RDONLY) = 8
lseek(8, 18, SEEK_SET)                  = 18
read(8, "\t\2\31\0\1\1", 6)             = 6
close(8)                                = 0
lseek(7, 18, SEEK_SET)                  = 18
read(7, "\t\2\31\0\1\1\0\340", 8)       = 8
lseek(7, 18, SEEK_SET)                  = 18
read(7, "\t\2\31\0\1\1\0\340\0\t\4\0\0\1\t\0\0\0\7\5\201\3\2\0\377"..., 25) = 25
close(7)                                = 0
getdents(6, 0x7f9c2bd8, 3933out of memory
)           = 0
close(6)                                = 0
stat("/proc/bus/usb/001", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/bus/usb/001", O_RDONLY)     = 6
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
getdents(6, /* 4 entries */, 3933)      = 64
open("/proc/bus/usb/001/002", O_RDWR)   = 7
ioctl(7, USBDEVFS_CONTROL, 0x7f9c3b58)  = 1
read(7, "\22\1\0\2\0\0\0@\321\22&\25\2\1\2\1\0\1", 18) = 18
open("/proc/bus/usb/001/002", O_RDONLY) = 8
lseek(8, 18, SEEK_SET)                  = 18
read(8, "\t\2 \0\1\1", 6)               = 6
close(8)                                = 0
lseek(7, 18, SEEK_SET)                  = 18
read(7, "\t\2 \0\1\1\0\200", 8)         = 8
lseek(7, 18, SEEK_SET)                  = 18
read(7, "\t\2 \0\1\1\0\200\372\t\4\0\0\2\10\6P\0\7\5\1\2\0\2\0\7"..., 32) = 32
close(7)                                = 0
open("/proc/bus/usb/001/001", O_RDWR)   = 7
ioctl(7, USBDEVFS_CONTROL, 0x7f9c3b58)  = 1
read(7, "\22\1\0\2\t\0\1@\0\0\0\0\6\2\3\2\1\1", 18) = 18
open("/proc/bus/usb/001/001", O_RDONLY) = 8
lseek(8, 18, SEEK_SET)                  = 18
read(8, "\t\2\31\0\1\1", 6)             = 6
close(8)                                = 0
lseek(7, 18, SEEK_SET)                  = 18
read(7, "\t\2\31\0\1\1\0\340", 8)       = 8
lseek(7, 18, SEEK_SET)                  = 18
read(7, "\t\2\31\0\1\1\0\340\0\t\4\0\0\1\t\0\0\0\7\5\201\3\4\0\f"..., 25) = 25
close(7)                                = 0
getdents(6, 0x7f9c2bd8, 3933out of memory
)           = 0
close(6)                                = 0
getdents(5, 0x7f9c2bd8, 3933out of memory
)           = 0
close(5)                                = 0
write(1, "  found USB ID 0000:0000\n", 25  found USB ID 0000:0000
) = 25
write(1, "  found USB ID 12d1:1526\n", 25  found USB ID 12d1:1526
) = 25
write(1, "   vendor ID matched\n", 21   vendor ID matched
)  = 21
write(1, "   product ID matched\n", 22   product ID matched
) = 22
write(1, "  found USB ID 0000:0000\n", 25  found USB ID 0000:0000
) = 25
write(1, " Found devices in default mode ("..., 35 Found devices in default mode (1)
) = 35
write(1, "Access device 002 on bus 001\n", 29Access device 002 on bus 001
) = 29
open("/proc/bus/usb/001/002", O_RDWR)   = 5
write(4, "\1", 1)                       = 1
read(3, "\1", 1)                        = 1
write(1, "Current configuration number is "..., 34Current configuration number is 1
) = 34
write(1, "Use interface number 0\n", 23Use interface number 0
) = 23
write(1, "Use endpoints 0x01 (out) and 0x8"..., 39Use endpoints 0x01 (out) and 0x81 (in)
) = 39
clock_gettime(CLOCK_MONOTONIC, {71, 271709482}) = 0
ioctl(5, USBDEVFS_SUBMITURB, 0x451200)  = 0
clock_gettime(CLOCK_MONOTONIC, {71, 275275399}) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLOUT, revents=POLLOUT}], 2, 997) = 1
ioctl(5, USBDEVFS_REAPURBNDELAY, 0x7f9c4ac0) = 0
clock_gettime(CLOCK_MONOTONIC, {71, 280121237}) = 0
ioctl(5, USBDEVFS_SUBMITURB, 0x451200)  = 0
clock_gettime(CLOCK_MONOTONIC, {71, 283482415}) = 0
Any ideas?
Last edited by Killerbug on 11 Aug 2014, 08:41, edited 1 time in total.

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

Re: Huawei K3772 not switching

Post by LOM » 01 Aug 2014, 18:40

Killerbug wrote: Any ideas?
No real good ideas but there are some question marks for the strace, the out of memory error you get when libusb reads the directory entries and also the poll call where fd 3 is an already closed file.
The getdents line(s) should had been:
getdents(6, 0x7f9c2bd8, 3933) = 0
so who else is writing to the console and complaining about "out of memory"?

Which libusb version did you use for building libusb.so, 1.0.18? If not, rebuild the lib.

The last lines of your strace is from usb_modeswitch attempting to read device description, ie Manufacturer name, Product, and Serial number something which is a trivial operation that shouldn't hang.

Other things to look for is of course updating the kernel to at least 2.6.32 which is a long time supported kernel which still get bugs fixed, 2.6.21 is so yesterday..
I am also not a big fan of Ralinks OHCI driver, the RT3xxx_EHCI driver is at least slightly more stable so switch to that one if you can.

Killerbug
Posts: 4
Joined: 28 Jul 2014, 16:37

Re: Huawei K3772 not switching

Post by Killerbug » 11 Aug 2014, 08:40

Hi,

I found a workaround by going back a few versions. The dongle is now happily switching.

Thanks for the help tho.

Greetings,
Killerbug

Post Reply