Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
ToxicFire
Posts: 2
Joined: 24 May 2014, 13:43

Hauwei e5331/e5332

Post by ToxicFire » 24 May 2014, 14:09

Hi, thanks in advance for any help.

I have a hauwei E5332 which i belive is basically an E5331 with ability to mount external antenna, plugging it in with usb-modeswitch installed happily turns it into a mass storage device and a usb modem, however im fairly sure it also has a ethernet over usb function aswell which i would like to gain access to. Referencing this post http://www.draisberghof.de/usb_modeswit ... f=3&t=1322 I've had a tinker around with usb-modeswitch trying to get it to the id 12d1:1c1f but havent had any luck it always ends up in 12d1:1506

I've disabled automatic switching so i can tinker, and I've put the output from lsusb and dmesg below, any help would be much appreciated.



Here's the lsusb output prior to modeswitch

Code: Select all

Bus 001 Device 039: ID 12d1:14fe Huawei Technologies Co., Ltd. 
Couldn't open device, some information will be missing
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          0x14fe 
  bcdDevice            1.02
  iManufacturer           2 
  iProduct                1 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              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
      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
----------------------------------

This is the lsusb output after modeswitch

Code: Select all

Bus 001 Device 040: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
Couldn't open device, some information will be missing
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 
  iProduct                1 
  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-Only
      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
--------------------------------

The dmesg output

Code: Select all

[ 9414.136019] usb 1-5: >new high-speed USB device number 39 using ehci_hcd
[ 9414.268786] usb 1-5: >New USB device found, idVendor=12d1, idProduct=14fe
[ 9414.268790] usb 1-5: >New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 9414.268793] usb 1-5: >Product: HUAWEI Mobile
[ 9414.268795] usb 1-5: >Manufacturer: HUAWEI
[ 9414.271505] scsi33 : usb-storage 1-5:1.0
[ 9415.268802] scsi 33:0:0:0: >CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[ 9415.270909] sr1: scsi-1 drive
[ 9415.271033] sr 33:0:0:0: >Attached scsi CD-ROM sr1
[ 9415.272184] sr 33:0:0:0: >Attached scsi generic sg2 type 5

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

Re: Hauwei e5331/e5332

Post by LOM » 25 May 2014, 05:42

You can not choose which target id the dongle gets after switching, that is decided by the dongles internal firmware which varies depending on which market or mobile provider it is intended for,
12d1:1506 is as good as 12d1:1c1f.

Your lsusb listing does not show any modem interface but a direct ethernet network interface so if it is working for you then I'm quite sure that you are using the ethernet interface.
I have actually never seen any of the Huawei MiFi devices having a dial-up modem interface, almost all of them have a cdc_ncm type ethernet interface and a few of them have a cdc_ecm type interface.

ToxicFire
Posts: 2
Joined: 24 May 2014, 13:43

Re: Hauwei e5331/e5332

Post by ToxicFire » 25 May 2014, 16:01

LOM wrote:You can not choose which target id the dongle gets after switching, that is decided by the dongles internal firmware which varies depending on which market or mobile provider it is intended for,
12d1:1506 is as good as 12d1:1c1f.

Your lsusb listing does not show any modem interface but a direct ethernet network interface so if it is working for you then I'm quite sure that you are using the ethernet interface.
I have actually never seen any of the Huawei MiFi devices having a dial-up modem interface, almost all of them have a cdc_ncm type ethernet interface and a few of them have a cdc_ecm type interface.
Unfortunately, its coming up as a usb mobile broadband modem in network manager, it definately doesn't appear on the list of network interfaces (ifconfig), and the devices web management interface is unavaiable because no ip has been assigned to the usb connected computer as its not been seen as an ethernet over usb connection.

I might have to retract my statement about it working happily, it appeared to be, it appeared as a mobile broadband device with the connection option for the service operator automatically discovered but on closer inspection it attempts to connect to the then fails. However if i access the device via wifi from another computer (at the same time as its connected via usb to the first computer) I have a working net connection and access to the devices web admin interface.

I went and plugged it into a windows 7 system and it came up instantly as a network connection and got an ip assigned by the devices dhcp in seconds. even ran usbsniff on all the hauwei devices that appear on plugin, but the files a bit large 7meg-ish to wade through when im not entirely sure what im looking for.

Time to do a bit more digging

Edit: Investigations turned up this http://forums.linuxmint.com/viewtopic.php?f=53&t=148990 and my kernel version just happens to be one of those listed as at fault <sarcasm> YAY! </sarcasm>

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

Re: Hauwei e5331/e5332

Post by LOM » 26 May 2014, 10:41

ToxicFire wrote: However if i access the device via wifi from another computer (at the same time as its connected via usb to the first computer) I have a working net connection and access to the devices web admin interface.
'

If you get a working net connection on the usb connected computer then you have the cdc_ncm drivers and it must be a matter of NetworkManager not being able to initiate the connection with the right AT cmds.
You need a quite recent kernel and the latest NetworkManager in order for cdc_ncm devices to work.

Post Reply