Author Message

<  Device Information  ~  Vodafone Huawei K3770

PostPosted: Thu Jun 09, 2011 7:45 pm
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
I have just received the mentioned modem with my Vodacom contract and Linux Mint 11 doesn't recognize it.
I have followed all the instructions on this site http://blogger.ziesemer.com/2008/10/all ... buntu.html
When I run usb_Modeswitch I get the following output.

Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 008 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x0b (out) and 0x8f (in)
Using endpoints 0x0b (out) and 0x8f (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
Could not send INQUIRY message (error -2)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: Vodafone Mobile Broadband (Huawei)
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 0x0b for message sending ...
Trying to send message 1 to endpoint 0x0b ...
Sending the message returned error -2. Trying to continue
Resetting response endpoint 0x8f
Resetting message endpoint 0x0b
Error resetting endpoint: -2
-> Run lsusb to note any changes. Bye.

Please help, I am very new to Linux


Last edited by Q-Ball on Fri Jun 10, 2011 2:59 pm, edited 1 time in total.

Offline Profile
PostPosted: Fri Jun 10, 2011 9:17 am
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
This is what I have in my usb_Modeswitch.conf file.

DefaultVendor = 0x12d1
DefaultProduct = 0x14d1

MessageEndpoint = 0x0b
MessageContent = "5553424308700d860000000000000600000000000000000000000000000000"


Last edited by Q-Ball on Fri Jun 10, 2011 2:59 pm, edited 1 time in total.

Offline Profile
PostPosted: Fri Jun 10, 2011 2:22 pm
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
usb_modeswitch version: 1.1.7-1
usb_modeswitch-data package installed: 20110227-2
Kernel version: 2.6.38-8-Generic
Linux distribution: Linux Mint Release 11 (Katya)

The output of "dmesg" a little while after plugging the modem in, without any manual switching attempts.

[22283.573661] usb 1-1.2: new high speed USB device using ehci_hcd and address 8
[22283.927599] scsi9 : usb-storage 1-1.2:1.0
[22284.922194] scsi 9:0:0:0: CD-ROM Vodafone CD ROM (Huawei) 2.31 PQ: 0 ANSI: 2
[22284.925001] sr1: scsi-1 drive
[22284.925286] sr 9:0:0:0: Attached scsi CD-ROM sr1
[22284.925637] sr 9:0:0:0: Attached scsi generic sg3 type 5
[22300.729469] wlan0: deauthenticating from 58:8d:09:b1:d7:bf by local choice (reason=3)
[22300.737116] cfg80211: All devices are disconnected, going to restore regulatory settings
[22300.737124] cfg80211: Restoring regulatory settings
[22300.737144] cfg80211: Calling CRDA to update world regulatory domain
[22300.742765] cfg80211: Ignoring regulatory request Set by core since the driver uses its own custom regulatory domain
[22300.742775] cfg80211: World regulatory domain updated:
[22300.742778] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[22300.742783] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[22300.742787] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[22300.742792] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[22300.742796] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[22300.742800] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[22300.872041] wlan0: authenticate with 00:14:f2:27:2a:00 (try 1)
[22300.875149] wlan0: authenticated
[22300.875405] wlan0: associate with 00:14:f2:27:2a:00 (try 1)
[22300.878153] wlan0: RX AssocResp from 00:14:f2:27:2a:00 (capab=0x431 status=0 aid=63)
[22300.878160] wlan0: associated


Offline Profile
PostPosted: Fri Jun 10, 2011 4:08 pm
Site AdminPosts: 4740Joined: Sat Nov 03, 2007 12:30 am
Huawei devices do not need any sniffing anymore, the switching command is known and will hardly change in the future.

If you don't find your USB ID in "/usr/share/usb_modeswitch", you can just copy one of the existing ones to your new name.
You can take "12d1:14c1" and copy it to "12d1:14d1". Then open it in an editor and change the "DefaultProduct" value to "0x14d1".

Open the file "/lib/udev/rules.d/40-usb_modeswitch.rules" in an editor and add a line for your device. Again, you can just copy an existing line and change it accordingly.

Now your device should at least change its ID when plugged in. We'll continue from there.



Offline Profile
PostPosted: Mon Jun 13, 2011 9:43 am
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
Thank you for your reply Josh.
I have done what you suggested and still no joy. Any other suggestions?
Thanks

~ $ lsusb
Bus 002 Device 006: ID 05c6:9205 Qualcomm, Inc.
Bus 002 Device 003: ID 064e:e203 Suyin Corp. Lenovo Integrated Webcam
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 008: ID 12d1:14d1 Huawei Technologies Co., Ltd.
Bus 001 Device 005: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
Bus 001 Device 004: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0 multicard reader
Bus 001 Device 003: ID 147e:1001 Upek
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Offline Profile
PostPosted: Mon Jun 13, 2011 11:23 am
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
OK, I copied my newly created "12d1:14d1 file from "/usr/share/usb_modeswitch" to "/etc/usb_modeswitch.d" and switching is done, but I still don't have the modem as an option in the "Network Connections" app.

sudo lsusb -v -d 12d1:14c9
Code:
Bus 001 Device 014: ID 12d1:14c9 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          0x14c9
  bcdDevice            1.02
  iManufacturer           3 HUAWEI
  iProduct                2 Vodafone Mobile Broadband (Huawei)
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          177
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol     49
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8f  EP 15 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     0x8e  EP 14 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     0x0f  EP 15 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     55
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  0d 24 0f 01 05 00 00 00 ea 05 03 00 01
      ** UNRECOGNIZED:  05 24 06 01 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8d  EP 13 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     55
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8d  EP 13 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     0x8c  EP 12 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     0x0e  EP 14 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     51
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8b  EP 11 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     0x0d  EP 13 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       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol     50
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8a  EP 10 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     0x0c  EP 12 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        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 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     0x89  EP 9 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)


Offline Profile
PostPosted: Mon Jun 13, 2011 1:24 pm
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
Here are the last couple of lines from my usb_modeswitch log file.

Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
Setting up communication with interface 0 ...
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
USB error: could not clear/halt ep 15: Protocol error
USB error: could not claim interface 0: No such device
USB error: could not release intf 0: No such device
OK, message successfully sent
Resetting response endpoint 0x8f
Resetting message endpoint 0x0f
Error resetting endpoint: -71

Checking for mode switch (max. 20 times, once per second) ...
Waiting for original device to vanish ...
Original device can't be accessed anymore. Good.
(For a better success check provide target IDs or class)
Original device vanished after switching

Mode switch most likely succeeded. Bye.

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

Device directory in sysfs is gone! Something went wrong, aborting


Offline Profile
PostPosted: Mon Jun 13, 2011 2:57 pm
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
Hi again

Got it to work with Sakis3G app and this is the output of the connection info. I would still like the Linux Network app to work though.

Connection Information

Interface: P-t-P (ppp0)

Connected since: 2011-06-13 14:51
Kilobytes received: 6
Kilobytes sent: 5

Network ID: 65501
Operator name: VodaCom-SA
APN: internet

Modem: K3770
Modem type: USB
Kernel driver: option
Device: /dev/ttyUSB3

IP Address: 41.28.237.189
Subnet Mask: 255.255.255.255
Peer IP Address: 10.64.64.64
Default route(s): 10.64.64.64


Offline Profile
PostPosted: Mon Jun 13, 2011 5:12 pm
Posts: 9Joined: Thu Jun 09, 2011 7:26 pm
Some more info, after connecting with Sakis3G the modem shows up in Network Manager until I reboot. It seems like Sakis3G is loading the correct driver which Network Manager can't find by itself.
What to do please?


Offline Profile
PostPosted: Mon Jun 13, 2011 10:06 pm
Site AdminPosts: 4740Joined: Sat Nov 03, 2007 12:30 am
What's missing now is a line in /lib/udev/rules.d/40-usb_modeswitch.rules for your ID.

Again, you can easily copy a similar line and adapt it to your values. Have a look with an editor, it's really not hard.

This will make your switching automatic and will try to load the right driver afterwards. You may have to plug and switch twice to accomplish that.



Offline Profile
PostPosted: Wed Jun 15, 2011 1:17 pm
Posts: 4Joined: Wed Jun 15, 2011 11:57 am
Hi Josh,

I also in the same boat as Q-Ball. I yesterday received my Huawei K3770 USB modem with my new contract.

Firstly I using OpenSUSE 11.4 (Gnome) on Acer TravelMate 5740G.

I followed your first post Fri Jun 10, 2011 3:08 pm, though with one change. There is no /usr/share/usb_modeswitch directory, though I found the 12d1:14c1 file in the /etc/usb_modeswitch.d/. I copied the file also /etc/usb_modeswitch.d/ with file name 12d1:14d1.

I edited the file the content to
Code:
########################################################
# Vodafone (Huawei) K3770

DefaultVendor= 0x12d1
DefaultProduct=0x14d1

TargetVendor=  0x12d1
TargetProduct= 0x14c6

CheckSuccess=20

#MessageContent="55534243123456780000000000000011062000000100000000000000000000"
MessageContent="5553424308700d860000000000000600000000000000000000000000000000"


I tried both MessageContent, 2nd on from Q-Ball's post.

I also created an entry in the /lib/udev/rules.d/40-usb_modeswitch.rules for the K3770, copying K4605 and changing it to match K3770 details

dmesg after pplugin of device gives
Code:
[ 3124.312321] usb 2-1.2: USB disconnect, address 9
[ 3136.514549] usb 2-1.2: new high speed USB device using ehci_hcd and address 10
[ 3136.965583] usb 2-1.2: New USB device found, idVendor=12d1, idProduct=14d1
[ 3136.965588] usb 2-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 3136.965591] usb 2-1.2: Product: Vodafone Mobile Broadband (Huawei)
[ 3136.965594] usb 2-1.2: Manufacturer: HUAWEI
[ 3136.967411] scsi9 : usb-storage 2-1.2:1.0


Network Manager does not see any devices when I try to add a broadband device.

Thanx for you help.

Edit: How does one know if a mode switch has been successful?


Offline Profile
PostPosted: Wed Jun 15, 2011 3:35 pm
Posts: 4Joined: Wed Jun 15, 2011 11:57 am
If I run usb_modswitch manually I get the following response
Code:
usb_modeswitch -v 12d1 -p 14d1 -M "5553424308700d860000000000000600000000000000000000000000000000"

Looking for default devices ...
 Found devices in default mode, class or configuration (1)
Accessing device 005 on bus 002 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using endpoints 0x0f (out) and 0x8f (in)
Using endpoints 0x0f (out) and 0x8f (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 No driver found. Either detached before or never attached

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

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: Vodafone Mobile Broadband (Huawei)
  Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
 OK, message successfully sent
Resetting response endpoint 0x8f
Resetting message endpoint 0x0f
 Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.


dmesg returns the following after above is done
Code:
[ 8480.507706] usb 2-1.2: usbfs: process 4569 (usb_modeswitch) did not claim interface 0 before use


"./sakis3g connect" returns "Failed to connect."


Offline Profile
PostPosted: Thu Jun 16, 2011 8:34 am
Site AdminPosts: 4740Joined: Sat Nov 03, 2007 12:30 am
Don't use Q-Ball's MessageContent. It's wrong.
Use the one that is found in the latest data package available from this site, in the "12d1:14c1" file.

Also, you have to adapt the TargetProduct in the new config file. Set it to "0x14c9".

Then follow my previous post in this topic.



Offline Profile
PostPosted: Thu Jun 16, 2011 3:49 pm
Posts: 2Joined: Thu Jun 16, 2011 3:35 pm
Hi Guys.

Thanks for all the help mine is working fine now. I've used the K3765 config. Works with network manager no problems. All I've done was copy the 12d1:1250(if i recall) configuration to 12d1:14d1 in the /etc/usb_modeswitch.d folder and updated its content for Default Vendor:Product to 12d1:14d1 and Target Vendor:Product to 12d1:1c05. Also copied the content to my usb_modeswitch.conf file. Running usb_modeswitch -c /etc/usb_modeswitch.conf switches to 12d1:1c05 so I've changed the Target to that? Then I've just added usb_modeswitch -c /etc/usb_modeswitch.conf to my rc.local together with a modprobe usbserial vendor=0x12d1 product=0x1c05. Added a mobile broadband account and everything works fine. Don't know what is necessary as my desktop automatically does usb_modeswitch without having to run usb_modeswitch like I do in my rc.local but my laptop was working fine last night but then would not switch again when I started it this morning so thats why I run usb_modeswitch at boot time.

Regards,


Offline Profile
PostPosted: Thu Jun 16, 2011 6:40 pm
Site AdminPosts: 4740Joined: Sat Nov 03, 2007 12:30 am
To all of you: eventually, you should not have to run anything manually.
And don't put device configuration stuff into /etc/usb_modeswitch.conf.

Make sure you use this in your config file:
Code:
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
You may get a different target ID than before, but this is the official switching command for Huawei.

Try this command line:
"usb_modeswitch -I -c /etc/usb_modeswitch.d/<your config file>"

If your config file in /etc/usb_modeswitch.d is working (the device ID is changing) then add a new line to /lib/udev/rules.d/40-usb_modeswitch.rules":
Code:
# Vodafone (Huawei) K3770
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14d1", RUN+="usb_modeswitch '%b/%k'"


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 2
28 posts
Go to page 1, 2  Next
Users browsing this forum: Bing [Bot] and 1 guest
Search for:
Post new topic  Reply to topic
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