Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
astgtciv
Posts: 4
Joined: 15 May 2013, 22:59

e352/e1552 problem

Post by astgtciv » 15 May 2013, 23:06

Ubuntu 12.04.

Inital lsusb:

Code: Select all

Bus 003 Device 019: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800 (HSPA modem)
Interestingly, when I DisableSwitching=1 in /etc/usb_modeswitch.conf , I still can't see the device in folders. :(

See /var/log/usb_modeswitch.log content below. After usb_modeswitch.conf lsusb still shows the same as above, 1446.

Weird thing is, it worked the first time I inserted the modem. But not even once after that. And I've never seen it as a usb_storage device.

Code: Select all

tail: /var/log/usb_modeswitch.log: file truncated


USB_ModeSwitch log from Thu May 16 01:02:48 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.

Extracting config 12d1:1446 from collection /usr/share/usb_modeswitch/configPack.tar.gz
config: TargetVendor set to 12d1
config: TargetProduct set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,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 /run/usb_modeswitch/current_cfg -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: /run/usb_modeswitch/current_cfg

 * 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=  not set
TargetClass=    not set
TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"

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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 020 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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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 1d6b:0002
  searching devices, found USB ID 8087:07da
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1bcf:288f
  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
Any ideas?

bmork
Posts: 167
Joined: 15 Mar 2012, 22:47
Location: Oslo, Norway

Re: e352/e1552 problem

Post by bmork » 16 May 2013, 15:59

astgtciv wrote:Ubuntu 12.04.

Inital lsusb:

Code: Select all

Bus 003 Device 019: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800 (HSPA modem)
Interestingly, when I DisableSwitching=1 in /etc/usb_modeswitch.conf , I still can't see the device in folders. :(

See /var/log/usb_modeswitch.log content below. After usb_modeswitch.conf lsusb still shows the same as above, 1446.

Weird thing is, it worked the first time I inserted the modem. But not even once after that. And I've never seen it as a usb_storage device.
This sounds like you may be affected by a bug which was added to and then removed from the usb-storage driver a few kernel releases ago. The bug made my E367 (which use the exact same unswitched ID) fail in exactly this way. Unfortunately the bug was backported to stable kernels before being caught. So it's not unlikely that your Ubuntu 12.04 kernel is affected.

The simplest way to test is to temporarily blacklist the usb-storage driver *before* plugging the modem. If usb_modeswitch then works, you are affected. You can blacklist a module by creating a new /etc/modprobe.d/*.conf file, run depmod and unload the (possibly already loaded) module:

Code: Select all

echo "blacklist usb-storage" >/etc/modprobe.d/tmp-usbstorage-blacklist.conf
depmod -a
rmmod usb-storage
Remember to delete the file after the test, or usb-storage will be gone forever...

astgtciv
Posts: 4
Joined: 15 May 2013, 22:59

Re: e352/e1552 problem

Post by astgtciv » 16 May 2013, 23:07

Wow, you are really onto something here bmork!

I ran your script, and it had an effect! Even without blacklisting usb-storage, for some reason the modem started to be right away recognized as 12d1:1506, and usb_modeswitch didn't even run!!! So the modem worked (although i had some connection problems - it would drop after about 3 seconds worth of connection). And then (this after 1 hr and several reboots!) - something happened and now again the system sees the modem as 12d1:1446 and usb_modeswitch runs and fails, and your script has no longer any effect (((. What is going on here?!!!

astgtciv
Posts: 4
Joined: 15 May 2013, 22:59

Re: e352/e1552 problem

Post by astgtciv » 16 May 2013, 23:39

Problem is that blacklisting usb-storage just isn't working for me for some reason. I tried both with a separate file and adding lines to blacklist.conf - but no effect, I can still stick my flash driver into a usb port and everything comes up, and lsmod shows me usb-storage. Why would that be?

astgtciv
Posts: 4
Joined: 15 May 2013, 22:59

Re: e352/e1552 problem

Post by astgtciv » 16 May 2013, 23:51

Blacklisting via the conf file never did work for me, but I found http://ubuntuforums.org/archive/index.p ... 06382.html , and once I unloaded usb-storage and renamed the usb-storage.ko in modules, usb_modeswitch DID start to work! And also now my connection no longer drops after 3 seconds, I suspect that was because usb-storage driver would kick in. Thanks for all the help, bmork!!!

Post Reply