Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
link
Posts: 5
Joined: 25 Aug 2013, 09:57

huawei e352. automatic switch do not work. manual does

Post by link » 27 Aug 2013, 21:33

Hello,

$subj.
Each time I unplug/plug modem.
Automated mode:

Code: Select all

USB_ModeSwitch log from Sun Aug 25 10:52:49 2013

Using global config file: /etc/usb_modeswitch.conf

Raw args from udev: /3-1:1.0

Bus ID for device not given by udev.
 Trying to determine it from kernel name (3-1:1.0) ...
Using top device dir /sys/bus/usb/devices/3-1

USB dir exists: /sys/bus/usb/devices/3-1
Warning: USB attribute "serial" not readable.

SCSI dir exists: /sys/bus/usb/devices/3-1
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
----------------
USB values from sysfs:
  idVendor      12d1
  idProduct     1446
  manufacturer  Huawei Technologies
  product       HUAWEI Mobile
  serial        (null)
  bNumConfigurations    1
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching entries named: /usr/share/usb_modeswitch/12d1:1446*
Searching overriding entries named: /etc/usb_modeswitch.d/12d1:1446*
SCSI attributes not needed, moving on.

Using overriden config 12d1:1446 from collection /etc/usb_modeswitch.d
config: TargetVendor set to 12d1
config: TargetProduct set to 1506
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
! matched, now switching
Command to be run:
/usr/sbin/usb_modeswitch -I -W -D -s 20 -c /etc/usb_modeswitch.d/12d1:1446 -u -1   -v 12d1 -p 1446 2>&1

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

Reading config file: /etc/usb_modeswitch.d/12d1:1446

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.3 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1446
TargetVendor=   0x12d1
TargetProduct=  0x1506
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled


Looking for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Found device in default mode, class or configuration (1)
Accessing device 008 on bus 003 ...
Skipping the check for the current configuration
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01

Checking for mode switch (max. 20 times, once per second) ...
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1446
   found matching vendor ID
  searching devices, found USB ID 064e:c321
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04ca:3006
  searching devices, found USB ID 0bda:0129
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 No new devices in target mode or class found

Mode switch has failed. Bye.

fail:
--------------------------------
(end of usb_modeswitch output)

USB dir exists: /sys/bus/usb/devices/3-1
Warning: USB attribute "serial" not readable.

All done, exiting
manual:

Code: Select all

/usr/sbin/usb_modeswitch -I -v 12d1 -p 1446 -V 12d1 -C 1506 -M 55534243123456780000000000000011062000000100000000000000000000

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
   found matching product ID
 Found device in default mode, class or configuration (1)
Accessing device 008 on bus 003 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
 Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
Config:

Code: Select all

$ cat /etc/usb_modeswitch.d/12d1\:1446 
DefaultVendor=  0x12d1
DefaultProduct= 0x1446
TargetVendor=   0x12d1
TargetProduct= 0x1506

InquireDevice=0
#CheckSuccess=20
#MessageEndpoint= 0x01

MessageContent="55534243123456780000000000000011062000000100000000000000000000"
One more weird thing:
I've got this problem on freshly installed kubuntu 13.04 on laptop. When I plug in same modem to dektop with 13.04 - it switches automatically to modem mode.

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

Re: huawei e352. automatic switch do not work. manual does

Post by LOM » 28 Aug 2013, 02:14

Laptop has USB3.0 but desktop has USB2.0 ?

link
Posts: 5
Joined: 25 Aug 2013, 09:57

Re: huawei e352. automatic switch do not work. manual does

Post by link » 28 Aug 2013, 10:11

LOM wrote:Laptop has USB3.0 but desktop has USB2.0 ?
you right. did I miss something about this ?

link
Posts: 5
Joined: 25 Aug 2013, 09:57

Re: huawei e352. automatic switch do not work. manual does

Post by link » 28 Aug 2013, 14:26

may be will be usefull for someone:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1094973
Raul says:
"options usb-storage delay_use=3"

link
Posts: 5
Joined: 25 Aug 2013, 09:57

Re: huawei e352. automatic switch do not work. manual does

Post by link » 28 Aug 2013, 20:35

full workaround (tested on ubuntu):

create file: /etc/modprobe.d/usb-storage.conf
content:

Code: Select all

options usb-storage delay_use=3
bingo. thx to everyone.

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

Re: huawei e352. automatic switch do not work. manual does

Post by Josh » 28 Aug 2013, 21:22

If you have a look into the source package of usb_modeswitch, you can see that there is a convenience option for this in "/etc/usb_modeswitch.conf". The wrapper script will set the delay for one "session" (until the next reboot).

link
Posts: 5
Joined: 25 Aug 2013, 09:57

Re: huawei e352. automatic switch do not work. manual does

Post by link » 31 Aug 2013, 08:58

it worked after reboot.

Post Reply