Author Message

<  Setup Discussion  ~  huawei dongle modem is not working

PostPosted: Mon Jul 24, 2017 1:44 pm Reply with quote
Posts: 5 Joined: Sun Jul 23, 2017 10:44 pm
Using Centos 6 and Huawei E173 modem . but its not working. please help


[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-696.3.2.el6.i686 #1 SMP Tue Jun 20 00:48:23 UTC 2017 i686 i686 i386 GNU/Linux

[root@localhost ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem)
Bus 002 Device 003: ID 1d57:fa21 Xenta
Bus 002 Device 004: ID 04ca:300b Lite-On Technology Corp.
Bus 002 Device 005: ID 1bcf:2c6e Sunplus Innovation Technology Inc.

[root@localhost ~]# /usr/sbin/usb_modeswitch -I -H -v 12d1 -p 1446 -c /etc/usb_modeswitch.d/12d1\:1446

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 002 on bus 002 ...
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 Technology
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 ...
Sending the message returned error -110. Trying to continue
Resetting response endpoint 0x81
Resetting message endpoint 0x01
-> Run lsusb to note any changes. Bye.


Offline
PostPosted: Mon Jul 24, 2017 3:20 pm Reply with quote
Site Admin Posts: 6420 Joined: Sat Nov 03, 2007 12:30 am
I suspect your usb_modeswitch version is pretty dated. It shouldn't be too hard to install the current release from source. Then the mode switch should work automatically.

If you try the manual approach, don't use the -H switch for any halfway recent Huawei modem. Have a look at the config file "12d1:1446" in your package - you need the "MessageContent" on the command line.

In newer releases, there is a new switch -J which replaces that MessageContent parameter.


Offline
PostPosted: Mon Jul 24, 2017 4:04 pm Reply with quote
Posts: 5 Joined: Sun Jul 23, 2017 10:44 pm
thanks for your reply

i've installed usb_modeswitch through yum and i hope the current version is installed

usb_modeswitch-1.2.3-1.el6.rf.i686
usb_modeswitch-data-20120120-1.el6.rf.noarch

is it not current ?


Offline
PostPosted: Mon Jul 24, 2017 4:27 pm Reply with quote
Site Admin Posts: 6420 Joined: Sat Nov 03, 2007 12:30 am
Have a look on the usb_modeswitch homepage. See the top navigation bar or click http://draisberghof.de/usb_modeswitch/


Offline
PostPosted: Mon Jul 24, 2017 8:43 pm Reply with quote
Posts: 5 Joined: Sun Jul 23, 2017 10:44 pm
[root@localhost usb-modeswitch-data-20170205]# make install
install -d /usr/share/usb_modeswitch
install -d /etc/usb_modeswitch.d
install -D --mode=644 40-usb_modeswitch.rules /lib/udev/rules.d/40-usb_modeswitch.rules
install --mode=644 -t /usr/share/usb_modeswitch ./usb_modeswitch.d/*


[root@localhost usb-modeswitch-data-20170205]# cd ../usb-modeswitch-2.5.0
[root@localhost usb-modeswitch-2.5.0]# make install
sed 's_!/usr/bin/tclsh_!'"/usr/bin/tclsh"'_' < usb_modeswitch.tcl > usb_modeswitch_dispatcher
install -D --mode=755 usb_modeswitch /usr/sbin/usb_modeswitch
install -D --mode=755 usb_modeswitch.sh /lib/udev/usb_modeswitch
install -D --mode=644 usb_modeswitch.conf /etc/usb_modeswitch.conf
install -D --mode=644 usb_modeswitch.1 /usr/share/man/man1/usb_modeswitch.1
install -D --mode=644 usb_modeswitch_dispatcher.1 /usr/share/man/man1/usb_modeswitch_dispatcher.1
install -D --mode=755 usb_modeswitch_dispatcher /usr/sbin/usb_modeswitch_dispatcher
install -d /var/lib/usb_modeswitch
test -d /etc/init -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf /etc/init || test 1
test -d /etc/systemd/system -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 usb_modeswitch@.service /etc/systemd/system || test 1


sorry, i am a bi newbie on this . is the installation is ok ?? now how can i switch my huawei modem ?? i tried with following , but still same error

[root@localhost usb_modeswitch]# /usr/sbin/usb_modeswitch -I -J -v 12d1 -p 1446 -c /usr/share/usb_modeswitch/12d1\:1446
Look for target devices ...
No devices in target mode or class found
Look for default devices ...
product ID matched
Found devices in default mode (1)
Access device 002 on bus 002
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Using standard Option switching message
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response reading failed (error -7)
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!


Offline
PostPosted: Mon Jul 24, 2017 11:41 pm Reply with quote
Site Admin Posts: 6420 Joined: Sat Nov 03, 2007 12:30 am
I suggest doing a good bit of reading, both on the usb_modeswitch page and in the README of the source package.


Offline
PostPosted: Wed Jul 26, 2017 9:52 am Reply with quote
Posts: 5 Joined: Sun Jul 23, 2017 10:44 pm
well, as per the page i found the command that i need to switch the mode is

/usr/sbin/usb_modeswitch -W -J -v 12d1 -p 1446

or using configuration file as

/usr/sbin/usb_modeswitch -W -J -v 12d1 -p 1446 -c /usr/share/usb_modeswitch/12d1\:1446

i put both without any luck

[root@ctg250 ~]# /usr/sbin/usb_modeswitch -W -J -v 12d1 -p 1446
Take all parameters from the command line


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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x1446
HuaweiNewMode=1

Look for default devices ...
found USB ID 1d6b:0002
found USB ID 8087:8000
found USB ID 0e8f:00a5
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 12d1:1446
vendor ID matched
product ID matched
found USB ID 0bda:57b5
found USB ID 04ca:3010
found USB ID 0bda:0129
Found devices in default mode (1)
Access device 002 on bus 002
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Using standard Huawei switching message
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
Sending the message returned error -7. Try to continue
Read the response to message 1 (CSW) ...
Response reading failed (error -7)
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!

Segmentation fault


Offline
PostPosted: Wed Jul 26, 2017 1:09 pm Reply with quote
Site Admin Posts: 6420 Joined: Sat Nov 03, 2007 12:30 am
My point was rather that you would not have to do anything manually if you installed the latest program and data release from this site.

Manual mode switching may be 'too late' if other processes have grabbed the storage portion of the modem since the plug-in.

Again: try the automatic mode-switching first. Enable logging in /etc/usb_modeswitch.conf and have a look at the log some moments after connecting your modem.


Offline
PostPosted: Wed Jul 26, 2017 9:13 pm Reply with quote
Posts: 5 Joined: Sun Jul 23, 2017 10:44 pm
well, if it automatically works i wouldn't do the effort of manually . but thanks for the logging suggestion. can u help me out with the following information ? this log is being generated when i unplug and plug the modem again
Code:
[root@ctg250 ~]# tail -f /var/log/usb_modeswitch_2-2
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
child killed: segmentation violation
--------------------------------
(end of usb_modeswitch output)


Core program reported switching failure. Exit

tail: /var/log/usb_modeswitch_2-2: file truncated

USB_ModeSwitch log from Thu Jul 27 01:00:50 BDT 2017

Use global config file: /etc/usb_modeswitch.conf
Raw parameters: --switch-mode 2-2:1.0
Use top device dir /sys/bus/usb/devices/2-2
Check class of first interface ...
 Interface 0 class is 08.

----------------
USB values from sysfs:
  manufacturer  HUAWEI Technology
  product       HUAWEI Mobile
  serial
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /etc/usb_modeswitch.d/12d1:1446.rpmsave /usr/share/usb_modeswitch/12d1:1446
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/12d1:1446
! matched. Read config data
Command line:
usb_modeswitch -W -D -u -1 -b 2 -g 7 -v 12d1 -p 1446 -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
child killed: segmentation violation
--------------------------------
(end of usb_modeswitch output)

Core program reported switching failure. Exit




And from /var/log/message


Code:


Jul 27 00:51:24 ctg250 kernel: usb 2-2: USB disconnect, device number 2
Jul 27 00:51:41 ctg250 kernel: usb 2-2: new high speed USB device number 6 using xhci_hcd
Jul 27 00:51:41 ctg250 kernel: usb 2-2: New USB device found, idVendor=12d1, idProduct=1446
Jul 27 00:51:41 ctg250 kernel: usb 2-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
Jul 27 00:51:41 ctg250 kernel: usb 2-2: Product: HUAWEI Mobile
Jul 27 00:51:41 ctg250 kernel: usb 2-2: Manufacturer: HUAWEI Technology
Jul 27 00:51:41 ctg250 kernel: usb 2-2: configuration #1 chosen from 1 choice
Jul 27 00:51:41 ctg250 kernel: scsi6 : SCSI emulation for USB Mass Storage devices
Jul 27 00:51:41 ctg250 kernel: scsi7 : SCSI emulation for USB Mass Storage devices
Jul 27 00:51:42 ctg250 kernel: scsi 7:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
Jul 27 00:51:42 ctg250 kernel: sd 7:0:0:0: Attached scsi generic sg2 type 0
Jul 27 00:51:42 ctg250 kernel: sd 7:0:0:0: [sdb] Attached SCSI removable disk
Jul 27 00:51:42 ctg250 kernel: xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Jul 27 00:51:43 ctg250 usb_modeswitch: switch device 12d1:1446 on 002/006
Jul 27 00:51:43 ctg250 kernel: usb_modeswitch[6942]: segfault at 34 ip 00b375ed sp bfb0dcb0 error 4 in libusb-1.0.so.0.1.0[b35000+e000]



Offline
PostPosted: Thu Jul 27, 2017 4:08 am Reply with quote
Posts: 1166 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
rubence wrote:
Jul 27 00:51:43 ctg250 kernel: usb_modeswitch[6942]: segfault at 34 ip 00b375ed sp bfb0dcb0 error 4 in libusb-1.0.so.0.1.0[b35000+e000]



Your kernel is some ancient s..t and I assume you have not updated your libusb that came with the distro.
Latest version is 1.0.21, install it and rebuild usb_modeswitch.


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
10 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron