| |
Automatic Activation, Hotplug and UDEV, Configuration
-
joy1234
- Posts: 5
- Joined: 21 Feb 2014, 18:34
Post
by joy1234 » 21 Feb 2014, 19:03
hi everybody,
i am trying to get my E5330 connected to my debian squeeze (2.6.32-5-686)
without usb_codeswith it shows,
Code: Select all Bus 004 Device 003: ID 12d1:14fe Huawei Technologies Co., Ltd.
i have installed USB_MODESWITCH, and after plug in my E5330 it showing now :
Code: Select all Bus 004 Device 003: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
but in the E5330 config says, it should be 12d1:1c20.
how can i switch 14fe to 1c20 instead 1506?
log:
USB_ModeSwitch log from Fri Feb 21 18:50:33 CET 2014
Raw args from udev: /5-3:1.0
Using global config file: /etc/usb_modeswitch.conf
Using top device dir /sys/bus/usb/devices/5-3
----------------
USB values from sysfs:
manufacturer HUAWEI
product HUAWEI Mobile
serial
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
SCSI attributes not needed, moving on
checking config: /usr/share/usb_modeswitch/12d1:14fe
! matched. Reading config data
config: TargetVendor set to 12d1
config: TargetProduct set to 1c20
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 5 -g 2 -v 12d1 -p 14fe -f $configBuffer
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 009
usb_os_find_busses: Found 008
usb_os_find_busses: Found 007
usb_os_find_busses: Found 006
usb_os_find_busses: Found 005
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 009
usb_os_find_devices: Found 001 on 008
usb_os_find_devices: Found 001 on 007
usb_os_find_devices: Found 001 on 006
usb_os_find_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
Reading long config from command line
* 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= 0x14fe
TargetVendor= 0x12d1
TargetProduct= 0x1c20
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
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 005/002 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 12d1:14fe
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Use given bus/device number: 005/002 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 12d1:14fe
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
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
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 ...
USB error: could not clear/halt ep 129: Protocol error
USB error: could not clear/halt ep 1: No such device
USB error: could not release intf 0: No such device
OK, message successfully sent
Resetting response endpoint 0x81
Could not reset endpoint (probably harmless): -71
Resetting message endpoint 0x01
Could not reset endpoint (probably harmless): -19
Device is gone, skipping any further commands
Bus/dev search active, referring success check to wrapper. Bye.
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 20 seconds ...
Waiting for device file system (1 sec.) ...
Waiting for device file system (2 sec.) ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Target config not matching - current values are
5-3:1.0/bInterfaceClass: ff
bConfigurationValue: 1
bNumConfigurations: 1
busnum: 5
devnum: 3
idProduct: 1506
idVendor: 12d1
manufacturer: HUAWEI
product: HUAWEI Mobile
serial:
Mode switching may have failed. Exiting
thanks for reading
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 21 Feb 2014, 20:12
I don't know where you have got that config file from, I can not find it in any usb_modeswitch data package from the last 3 years.
12d1:14fe can only switch to 12d1:1506, 12d1:1c20 is like 12d1:14fe a default (initial) id and not a target id.
-
joy1234
- Posts: 5
- Joined: 21 Feb 2014, 18:34
Post
by joy1234 » 21 Feb 2014, 20:20
LOM wrote:I don't know where you have got that config file from, I can not find it in any usb_modeswitch data package from the last 3 years.
12d1:14fe can only switch to 12d1:1506, 12d1:1c20 is like 12d1:14fe a default (initial) id and not a target id.
1c20 is a product ID of the modem itself. if i connect to windows i can see the PID is 1c20. sorry for the confusion.
dmesg:
[ 3985.460117] usb 5-3: new high speed USB device using ehci_hcd and address 6
[ 3985.597809] usb 5-3: New USB device found, idVendor=12d1, idProduct=14fe
[ 3985.597812] usb 5-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 3985.597814] usb 5-3: Product: HUAWEI Mobile
[ 3985.597815] usb 5-3: Manufacturer: HUAWEI
[ 3985.597880] usb 5-3: configuration #1 chosen from 1 choice
[ 3985.600807] scsi10 : SCSI emulation for USB Mass Storage devices
[ 3985.600868] usb-storage: device found at 6
[ 3985.600870] usb-storage: waiting for device to settle before scanning
[ 3986.494439] usb 5-3: USB disconnect, address 6
[ 3988.860121] usb 5-3: new high speed USB device using ehci_hcd and address 7
[ 3988.993511] usb 5-3: New USB device found, idVendor=12d1, idProduct=1506
[ 3988.993514] usb 5-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 3988.993516] usb 5-3: Product: HUAWEI Mobile
[ 3988.993517] usb 5-3: Manufacturer: HUAWEI
[ 3988.993572] usb 5-3: configuration #1 chosen from 1 choice
[ 3988.996595] scsi11 : SCSI emulation for USB Mass Storage devices
[ 3988.996665] usb-storage: device found at 7
[ 3988.996668] usb-storage: waiting for device to settle before scanning
[ 3993.996366] usb-storage: device scan complete
[ 3993.996837] scsi 11:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 3993.998294] sr2: scsi-1 drive
[ 3993.998368] sr 11:0:0:0: Attached scsi CD-ROM sr2
[ 3993.998413] sr 11:0:0:0: Attached scsi generic sg1 type 5
[ 3994.401979] ISO 9660 Extensions: Microsoft Joliet Level 1
[ 3994.403103] ISOFS: changing to secondary root
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 21 Feb 2014, 20:45
joy1234 wrote:LOM wrote:I don't know where you have got that config file from, I can not find it in any usb_modeswitch data package from the last 3 years.
12d1:14fe can only switch to 12d1:1506, 12d1:1c20 is like 12d1:14fe a default (initial) id and not a target id.
1c20 is a product ID of the modem itself. if i connect to windows i can see the PID is 1c20. sorry for the confusion.
I find that strange..
12d1:1c20 has only got 1 interface and it is a storage interface for the virtual cd-rom containing the windows install package.
https://forums.opensuse.org/showthread. ... ere/page13
The default id and target id pairs are decided by the mfgr, they may be different for the same E-model depending on the market they are sold on but a default id nowadays is only a default id and never reused as target id.
What kind of interfaces does windows device manager show for 12d1:1c20?
Edit:
12d1:14fe has 2 storage interfaces, the virtual cd-rom and the tf-card while 12d1:1c20 only has the virtual cd-rom, it could be that the modem changes its default id when a tf-card is inserted. Did you do that?
-
joy1234
- Posts: 5
- Joined: 21 Feb 2014, 18:34
Post
by joy1234 » 21 Feb 2014, 21:09
sorry , it is my bad
its shows the PID for the storage PARTITION. not the modem.
So thats a good thing? i am using wicd, and it doesn't show the mobile broadband tab. how can i set it up in WICD?
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 21 Feb 2014, 21:33
joy1234 wrote:sorry , it is my bad
its shows the PID for the storage PARTITION. not the modem.
So thats a good thing? i am using wicd, and it doesn't show the mobile broadband tab. how can i set it up in WICD?
Yes Windows tends to show the old id with the storage interface even after the id has gone.
There is one more possibility why windows detects it under a different id:
This modem/router is also sold as Vodafone R205 and it is listed with the 12d1:1c20 id in the usb.ids database and with the description "R205 (charging)". May be that it is given a different default id to prevent switching when the battery is flat.
12d1:1506, the target id you got is an id with many different interface layouts, varies from model to model.
Most of the Huawei MiFi routers uses cdc_ncm as driver, ie a direct ethernet interface and not a ppp dial-up modem interface. They use to give out an ip address via DHCP , 192.168.1.100 is most common and there use to be an internal webserver at 192.168.1.1 for configuring the device.
I need to see the output from lsusb -v -d 12d1:1506 after the device has switched id in order to tell you for sure.
-
joy1234
- Posts: 5
- Joined: 21 Feb 2014, 18:34
Post
by joy1234 » 21 Feb 2014, 21:47
thanks,
its an o2 ireland network.
Code: Select all Bus 004 Device 003: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x1506 E398 LTE/UMTS/GSM Modem/Networkcard
bcdDevice 1.02
iManufacturer 2 HUAWEI
iProduct 1 HUAWEI Mobile
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 191
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 3
iInterface 0
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 04 24 02 00
** UNRECOGNIZED: 05 24 01 00 00
** UNRECOGNIZED: 05 24 06 00 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 22
iInterface 0
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 06 24 1a 00 01 1f
** UNRECOGNIZED: 0d 24 0f 03 05 00 00 00 ea 05 03 00 01
** UNRECOGNIZED: 05 24 06 01 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 22
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 2
iInterface 0
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 04 24 02 00
** UNRECOGNIZED: 05 24 01 00 02
** UNRECOGNIZED: 05 24 06 02 02
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 21 Feb 2014, 22:15
yes it is an ncm device , the 4 interfaces are:
If#0 diagnostics
If#1 cdc_ncm (+ cdc_wdm)
If#2 user AT cmd
If#3 storage
it needs the cdc_ncm and the cdc_wdm drivers, cdc_ncm will create a /dev/wwan0 ethernet data interface while cdc_wdm will create /dev/cdc-wdm0 for commands.
You should see them bind to interface 1 in your log (dmesg) after loading these two modules.
NetworkManager can handle these two created devices, I have no knowledge of WICD so you'll have to look it up yourself.
-
joy1234
- Posts: 5
- Joined: 21 Feb 2014, 18:34
Post
by joy1234 » 21 Feb 2014, 22:27
thanks LOM, its very informative.
as i am a noob, i uninstall wicd and install network manager. i added
Allow hotplug wwan0
Iface wwan0 inet dhcp
Do i have to do anything else?
-
hwkraus
- Posts: 1
- Joined: 17 May 2014, 00:47
Post
by hwkraus » 17 May 2014, 01:05
Hi
LOM wrote:yes it is an ncm device , the 4 interfaces are:
If#0 diagnostics
If#1 cdc_ncm (+ cdc_wdm)
If#2 user AT cmd
If#3 storage
it needs the cdc_ncm and the cdc_wdm drivers, cdc_ncm will create a /dev/wwan0 ethernet data interface while cdc_wdm will create /dev/cdc-wdm0 for commands.
You should see them bind to interface 1 in your log (dmesg) after loading these two modules.
How do I load these two drivers? I don't see a wwan0 interface, even after the modeswitch.
Regards, Hans
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 17 May 2014, 08:21
hwkraus wrote:Hi
LOM wrote:yes it is an ncm device , the 4 interfaces are:
If#0 diagnostics
If#1 cdc_ncm (+ cdc_wdm)
If#2 user AT cmd
If#3 storage
it needs the cdc_ncm and the cdc_wdm drivers, cdc_ncm will create a /dev/wwan0 ethernet data interface while cdc_wdm will create /dev/cdc-wdm0 for commands.
You should see them bind to interface 1 in your log (dmesg) after loading these two modules.
How do I load these two drivers? I don't see a wwan0 interface, even after the modeswitch.
Regards, Hans
Start with checking your system log (dmesg) , search for usb.
It will show you if drivers load when the dongle has switched mode.
|
|