Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
otila
Posts: 6
Joined: 12 Feb 2015, 20:59

Huawei E3372 troubles

Post by otila » 12 Feb 2015, 22:21

setup goes ok, cyan light (no blinking), 83% signal or something, but I can't receive packets, ifconfig lists rx errors. If I knew how to enable more verbosity.
linux 3.19, usb-modeswitch-2.2.1, usb_modeswitch-data 20150115

usb_modeswitch log

USB_ModeSwitch log from Thu Feb 12 21:58:45 EET 2015

Use global config file: /etc/usb_modeswitch.conf
Raw args from udev: /3-1:1.0

Use top device dir /sys/bus/usb/devices/3-1

----------------
USB values from sysfs:
manufacturer HUAWEI_MOBILE
product HUAWEI_MOBILE
serial 0123456789ABCDEF
----------------
ConfigList: /etc/usb_modeswitch.d/12d1:157d
SCSI attributes not needed, move on
Check config: /etc/usb_modeswitch.d/12d1:157d
! matched. Read config data
Use config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
config: TargetVendor set to 12d1
config: TargetProduct set to 14db
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Device may have an MBIM configuration, check driver ...
driver for MBIM devices is available
Find MBIM configuration number ...
Command to be run:
usb_modeswitch -W -D -s 20 -b 3 -g 31 -v 12d1 -p 157d -f $configBuffer

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

Read long config from 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= 0x157d
NeedResponse=0
Configuration=0x02
Success check enabled, max. wait time 20 seconds
System integration mode enabled

Use given bus/device number: 003/031 ...
Note: No target parameter given; success check limited
Look for default devices ...
bus/device number matched
found USB ID 12d1:157d
vendor ID matched
product ID matched
Get the current device configuration ...
device configuration 1 not matching target
count device
Found devices in default mode (1)
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI_MOBILE
Product: HUAWEI_MOBILE
Serial No.: 0123456789ABCDEF
-------------------------
Change configuration to 2 ...
Device is busy, try to detach kernel driver
Looking for active driver ...
OK, driver detached
OK, configuration set
Get the current device configuration ...
The configuration was set successfully
Bus/dev search active, refer success check to wrapper. Bye!

ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
Read attributes ...
All attributes matched
Mode switching was successful, found 12d1:157d (HUAWEI_MOBILE: HUAWEI_MOBILE)
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated

All done, exit

ifconfig (bytes count was near 2^64 only a couple of times)
wwp0s29u1u4c2: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1500
inet 46.132.185.200 netmask 255.255.255.240 broadcast 46.132.185.207
inet6 fe80::a0c7:bcff:feec:b918 prefixlen 64 scopeid 0x20<link>
ether a2:c7:bc:ec:b9:18 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 4830 dropped 0 overruns 0 frame 0
TX packets 530 bytes 18446744073709500264 (1638.3 PiB)
TX errors 271 dropped 0 overruns 0 carrier 0 collisions 0

# ip route get 2.3.4.5
2.3.4.5 via 46.132.185.193 dev wwp0s29u1u4c2 src 46.132.185.200
cache

lsusb

Code: Select all

Bus 003 Device 017: ID 12d1:157d Huawei Technologies Co., Ltd. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol       255 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x157d 
  bcdDevice            1.02
  iManufacturer           1 HUAWEI_MOBILE
  iProduct                2 HUAWEI_MOBILE
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4 Mass Storage
      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               0
      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               1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          118
    bNumInterfaces          3
    bConfigurationValue     2
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower                2mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass      14 
      bFunctionProtocol       0 
      iFunction               8 Huawei Mobile
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass     14 
      bInterfaceProtocol      0 
      iInterface              5 NCM Network Control Model
      CDC Header:
        bcdCDC               1.10
      CDC MBIM:
        bcdMBIMVersion       1.00
        wMaxControlMessage   1024
        bNumberFilters       32
        bMaxFilterSize       128
        wMaxSegmentSize      1500
        bmNetworkCapabilities 0x20
          8-byte ntb input size
      UNRECOGNIZED CDC:  08 24 1c 00 01 10 dc 05
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               5
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 
      iInterface              6 CDC Network Data
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 
      iInterface              6 CDC Network Data
      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               0
      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               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4 Mass Storage
      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               0
      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               1
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000f
      Device can operate at Low Speed (1Mbps)
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat           1 micro seconds
    bU2DevExitLat         500 micro seconds
Device Status:     0x0001
  Self Powered
maxpower 2mA, wow! then why it gets so hot :lol:
Last edited by otila on 24 Mar 2015, 15:31, edited 1 time in total.

otila
Posts: 6
Joined: 12 Feb 2015, 20:59

Re: Huawei E3772 troubles

Post by otila » 13 Feb 2015, 00:31

I tried the E3772 on another box, it also had Fedora 21 (with only Fedora 21 packages), and it worked (dl about 35 Mbps)! However, it automatically used cdc_ether and got 192.168.8.x IP address, I would like to get the public one. My non-working box where I want to get it working has newer usb_modeswitch NetworkManager etc packages..

Where is it configured does it use ether or ncm?
I have Sonera Opengate.

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

Re: Huawei E3772 troubles

Post by LOM » 13 Feb 2015, 04:51

Your E3772 is a Win8 cdc_mbim device which can also be switched into cdc_ether compatibility mode for older Win version.

usb_modeswitch will detect mbim dongles by their mbim interface attributes, will check if the cdc_mbim driver is present in linux and if those criteria are met then config#2 will be selected.
The dongle will keep its initial usb id since it is not getting mode switched.

If those criteria are not met then usb_modeswitch will instead send a modeswitch message to the dongle which will switch it into compatibility mode and that will also change the dongles usb id.

mbim detection is working in usb_modeswitch from version 1.26, the cdc_mbim driver was introduced in linux 3.8 so those are the min requirement if you want to run in mbim mode where you get a public ip.

otila
Posts: 6
Joined: 12 Feb 2015, 20:59

Re: Huawei E3772 troubles

Post by otila » 13 Feb 2015, 10:08

LOM wrote: mbim detection is working in usb_modeswitch from version 1.26, the cdc_mbim driver was introduced in linux 3.8 so those are the min requirement if you want to run in mbim mode where you get a public ip.
OK so mbim detection is working but I can't receive packets. How to fix or debug this?

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

Re: Huawei E3772 troubles

Post by LOM » 13 Feb 2015, 11:44

otila wrote: OK so mbim detection is working but I can't receive packets. How to fix or debug this?
I have no idea, but it is not a usb_modeswitch task to create a connection, usb_modeswitch has done what it should do and has silently left the arena at this point.

Make sure you have the latest mbim comm libraries (mbimlib/libmbim)and the latest connection manager (Fedora using NetworkManager ?).
mbimcli may be useful for command line debugging.

otila
Posts: 6
Joined: 12 Feb 2015, 20:59

Re: Huawei E3772 troubles

Post by otila » 13 Feb 2015, 13:04

LOM wrote:
otila wrote: OK so mbim detection is working but I can't receive packets. How to fix or debug this?
I have no idea, but it is not a usb_modeswitch task to create a connection, usb_modeswitch has done what it should do and has silently left the arena at this point.

Make sure you have the latest mbim comm libraries (mbimlib/libmbim)and the latest connection manager (Fedora using NetworkManager ?).
mbimcli may be useful for command line debugging.
mbim+NetworkManager+ModemManager are latest. I wonder is there anything odd.
At least byte/packet/error counters are all zero, but ifconfig shows non-zero values.
Activation state: deactivated?

Code: Select all

[/dev/cdc-wdm0] Connection status:
	      Session ID: '0'
	Activation state: 'deactivated'
	Voice call state: 'none'
	         IP type: 'default'
	    Context type: 'none'
	   Network error: 'unknown'

[/dev/cdc-wdm0] Registration status:
	         Network error: 'unknown'
	        Register state: 'home'
	         Register mode: 'automatic'
	Available data classes: 'lte'
	Current cellular class: 'gsm'
	           Provider ID: '24491'
	         Provider name: 'FI SONERA'
	          Roaming text: 'unknown'
	    Registration flags: 'packet-service-automatic-attach'

# mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status
[/dev/cdc-wdm0] Subscriber ready status retrieved:
	      Ready state: 'initialized'
	    Subscriber ID: '24xxx'
	        SIM ICCID: '89xxx'
	       Ready info: 'unknown'
	Telephone numbers: (0) 'unknown'

[/dev/cdc-wdm0] Device capabilities retrieved:
	      Device type: 'removable'
	   Cellular class: 'gsm'
	      Voice class: 'no-voice'
	        Sim class: 'removable'
	       Data class: 'gprs, edge, umts, hsdpa, hsupa, lte, custom'
	         SMS caps: 'pdu-receive, pdu-send'
	        Ctrl caps: 'reg-manual'
	     Max sessions: '3'
	Custom data class: 'HSPA+'
	        Device ID: '866133027347154'
	    Firmware info: '22.298.03.00.07'
	    Hardware info: 'CL1E3372SM'

[/dev/cdc-wdm0] Packet statistics:
	   Octets (in): '0'
	  Packets (in): '0'
	 Discards (in): '0'
	   Errors (in): '0'
	  Octets (out): '0'
	 Packets (out): '0'
	Discards (out): '0'
	  Errors (out): '0'

[/dev/cdc-wdm0] Radio state retrieved:
	     Hardware Radio State: 'on'
	     Software Radio State: 'on'

[/dev/cdc-wdm0] Successfully attached to packet service

[/dev/cdc-wdm0] Packet service status:
	         Network error: 'unknown'
	  Packet service state: 'attached'
	Available data classes: 'lte'
	          Uplink speed: '0 bps'
	        Downlink speed: '0 bps'

Post Reply