Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
brownianmotion
Posts: 2
Joined: 24 Aug 2012, 09:39

Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by brownianmotion » 24 Aug 2012, 10:34

So I got a Vodafone K3773 usb modem the other day. It's a Huawei "HiLink"-based device which has a linux "driver" on the virtual cd before modeswitching (although it's officially unsupported), and shows up as a USB ethernet device after modeswitching. Reading through the installer shell script, the driver appears to simply be a daemon called "mbbservice" (Mobile BroadBand Service?) which is started from init.d and all it appears to do is trigger the modeswitch. Not wanting to install a pointless daemon on my system, I executed the unzipped-but-not-installed binary on my Debian wheezy box, captured a USB trace with wireshark and usbmon during a plug/unplug cycle, and after scanning through the packets sent, and having a poke through the usb_modeswitch config pack, I got it to work without the daemon. Hopefully this can be added to the database, and then the driver becomes unnecessary... :-)

I created /usr/share/usb_modeswitch/12d1:1f11

Code: Select all

# Vodafone Mobile Broadband (Huawei) K3773 

DefaultVendor=  0x12d1
DefaultProduct= 0x1f11

TargetVendor=  0x12d1
TargetProduct= 0x14bc

MessageContent="555342437f0000000002000080000a11062000000000000100000000000000"
And added the following lines to /lib/udev/rules.d/40-usb_modeswitch.rules (based on copy/pasting from all the other examples in that file and editing to match...)

Code: Select all

# Vodafone Mobile Broadband (Huawei) K3773 
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f11", RUN+="usb_modeswitch '%b/%k'"
Restarted udevd, and it is then just as simple as plug and surf!

Some diagnostic data:

Before modeswitch

Code: Select all

bash# lsusb -v -d 12d1:1f11

Bus 002 Device 057: ID 12d1:1f11 Huawei Technologies Co., Ltd. 
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          0x1f11 
  bcdDevice            1.02
  iManufacturer           2 Vodafone (Huawei)
  iProduct                1 Vodafone Mobile Broadband (Huawei)
  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
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)
Command I used to test:

Code: Select all

bash# usb_modeswitch -b2 -W -v 12d1 -p 1f11 -n --message-content 555342437f0000000002000080000a11062000000000000100000000000000
Taking all parameters from the 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= 0x1f11
TargetVendor=   not set
TargetProduct=  not set
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
MessageContent="555342437f0000000002000080000a11062000000000000100000000000000"
NeedResponse=1
ResponseEndpoint= not set

InquireDevice enabled (default)
Success check disabled
System integration mode disabled


Looking for default devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 08ff:2580
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 03f0:171d
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 12d1:1f11
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 04e8:6640
  searching devices, found USB ID 413c:2011
  searching devices, found USB ID 413c:1005
  searching devices, found USB ID 0461:4d51
  searching devices, found USB ID 0424:2412
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0002
 Found device in default mode, class or configuration (1)
Accessing device 057 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)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: Vodafone
   Model String: Storage(Huawei) 
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Vodafone (Huawei)
     Product: Vodafone Mobile Broadband (Huawei)
  Serial No.: not provided
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Reading the response to message 1 (CSW) ...
 Device seems to have vanished after reading. Good.
 Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.


After successful modeswitch:

Code: Select all

bash$ lsusb -v -d 12d1:14bc

Bus 002 Device 058: ID 12d1:14bc Huawei Technologies Co., Ltd. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x14bc 
  bcdDevice            1.02
  iManufacturer           2 Vodafone (Huawei)
  iProduct                1 Vodafone Mobile Broadband (Huawei)
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           71
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              0 
      CDC Header:
        bcdCDC               1.10
      CDC Ethernet:
        iMacAddress                      3 582C80139263
        bmEthernetStatistics    0x0000000f
        wMaxSegmentSize               2048
        wNumberMCFilters            0x0003
        bNumberPowerFilters              1
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 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       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      6 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 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
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)

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 27 Aug 2012, 01:03

Thanks a lot for this extraordinarily thorough information!

This will go into the next data package release, of course. If you want you can give me your name (or any nickname of your choice) via PM or mail, and I'll include you as the contributor of this device in the reference file.


brownianmotion
Posts: 2
Joined: 24 Aug 2012, 09:39

Post by brownianmotion » 27 Aug 2012, 04:53

Josh wrote:Thanks a lot for this extraordinarily thorough information!
No problems - to be honest, I had gone through the usb snooping with the intention of creating a tool before I remembered about usb_modeswitch... (My initial thought was that the daemon was part of the ethernet emulation...)

When I finally twigged that there wasn't much needed, I had to learn how usb_modeswitch worked. Took some piecing together, but eventually I read through a couple of threads on the forum to see what kinds of questions were being asked, and that prompted me to a) look in the right place in the capture, and b) snip the diagnostics for you guys... I might spend a few minutes one of these days to put together a good n00bs guide for the next person who is trying this... (Unless you have one already somewhere, and I just didn't find it...)

I just saw that it helped someone else too, so I'm glad I shared it when I did...

Bulldozer
Posts: 1
Joined: 14 Dec 2012, 19:39

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by Bulldozer » 14 Dec 2012, 20:01

Are there any thoughts about enabling serial ports instead of (along with) the ethernet interface in this "HiLink" modem after the switching? Maybe we need to find another switching command to get the serial ports exposed. Chances are that it's impossible, but still...

pertsert
Posts: 1
Joined: 20 Apr 2013, 03:01

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by pertsert » 20 Apr 2013, 03:41

thanks.i have a problem.i want to use my dongle (huawei k3773) on my android system.but k3773 has a quickstart system you know.there is a programme it's call name is putty.exe that programme help me with commands for other dongle but i can't find k3773 code because it's very new.could you help me please...

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by Josh » 10 May 2013, 07:42

pertsert,

did you have a look at "PPP Widget"?

It's my attempt to make 3G modems useable on Android. See "Software" link above and go to "Android Software".

blklein
Posts: 2
Joined: 26 Oct 2013, 04:33

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by blklein » 26 Oct 2013, 04:46

The modeswitch file also works for the Vodafone K4606 modem ("USB Extreme 3G+" in Australia).

The default product code is 12d1:1f19, the target product code is 12d1:1578

This is also a Huawei "HiLink" based device.
Last edited by blklein on 01 Nov 2013, 03:50, edited 1 time in total.

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

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by LOM » 26 Oct 2013, 08:56

blklein wrote:The modeswitch file also works for the Vodafone K4606 modem ("USB Extreme 3G+" in Australia).

The default product code is 12d1:1f19, the target product code is 12d1:1575

This is also a Huawei "HiLink" based device.
Thanks for the report, is the target id 12d1:1575 correct?

The Vodafone device info file I've got says that K4606 12d1:1f19 switches into 12d1:1578 and that 12d1:1575 is a target id for K5150, this is something that also has been reported a few threads down in this forum section.

blklein
Posts: 2
Joined: 26 Oct 2013, 04:33

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by blklein » 01 Nov 2013, 03:52

Yes, 1578 is the correct value.

Sorry about the error - I have corrected the post.

arvindgr
Posts: 1
Joined: 11 Feb 2014, 14:51

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by arvindgr » 11 Feb 2014, 15:02

I still receive No driver found error with Original HUAWEI HiLink modem that is tested with originally manufactured by HUAWEI.

log report is,


PPP Widget version 1.3.3
USB_ModeSwitch log from Mon Feb 10 23:12:43 IST 2014

Raw args from udev: 2-1/2-1:1.0

Using top device dir /sys/bus/usb/devices/2-1
----------------
USB values from sysfs:
manufacturer HUAWEI
product HUAWEI HiLink
serial
----------------
bNumConfigurations is 1 - don't check for active configuration
Checking storage tree in sysfs ...
loop 0/20
Storage tree is ready
Reading SCSI values ...
----------------
SCSI values from sysfs:
vendor HUAWEI
model Mass Storage
rev 2.31
----------------
checking config: /data/data/de.draisberghof.pppwidget/app_tmp/12d1.1f01.uPr=HiLink
matching u(product)
! matched. Reading config data
devList 1:
config: TargetVendor set to 12d1
config: TargetProduct set to 14db
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 2 -g 39 -v 12d1 -p 1f01 -f $cB

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

Reading long config from command line

* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.7 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x12d1
DefaultProduct= 0x1f01
TargetVendor= 0x12d1
TargetProduct= 0x14db
TargetClass= not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
QuantaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
BlackberryMode=0
PantechMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000611060000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled


Use given bus/device number: 002/039 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 12d1:1f01
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 interface number 0
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: HUAWEI HiLink
Serial No.: not provided
-------------------------
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" 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
Could not reset endpoint (probably harmless): -34
Resetting message endpoint 0x01
Could not reset endpoint (probably harmless): -6
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.) ...
Waiting for device file system (3 sec.) ...
Reading attributes ...
Mode switch has completed
Mode switching was successful, found 12d1:1001 (HUAWEI: HUAWEI HiLink)
Device class of first interface is ff
Now checking for bound driver ...
No driver has bound to interface 0 yet
Module loader is /system/bin/insmod
Trying to find and install main driver module "option"

Checking for active driver path: /sys/bus/usb-serial/drivers/option1

Driver not active, try to find module "option"

Can't find module "option"

Existing path found:
No way to use driver "option"
- try falling back to "usbserial"
Module "usb_serial" not found, can't do more here
Driver binding did not work for this device

All done, exiting


-----------_--------------

Inspite developer has mentioned to correct this error with the device, I got same error with latest version of PPP Widget...

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

Re: Vodafone Mobile Broadband (Huawei) K3773 "USB Classic M

Post by LOM » 11 Feb 2014, 15:30

arvindgr wrote: Inspite developer has mentioned to correct this error with the device, I got same error with latest version of PPP Widget...
There is no error with this dongle, it switches as it shall do.
The error is missing kernel drivers in your phone/tablet but you have not even bothered to tell what you are connecting the dongle to.

read:
http://www.draisberghof.de/android/pppwidget.html

http://www.draisberghof.de/usb_modeswit ... f=6&t=1113

Post Reply