Help with implementing usb_modeswitch

Solution 1:

I have same problems with my modem on 12.04. All you have to do are the following things:

First install USB_modeswitch on your computer. Try to download it from Software Center or Synaptic package manager. Also check for libusb in synaptic.

Now check whether you have /etc/mod_switch.conf or /etc/mod_switch.d file. Don't worry about their content, just check whether they are on your system or not. If /etc/mod_switch.conf is not present then you can create it manually.

Now check the file in /usr/share/usb_modswitch you will find a tar file in it which contain some information about your device. Look for your device file in the tar file, you will get it there.

To know which file you need, just run the command lsusb in your terminal to get the vendor id and product id respectively. In your file you will get the information like:

TargetVendor=  0x12d1
TargetProductList="140b,1506,150f"

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

You will have you own TargetVendor, Targetid, TargetMessage content.

Now go to terminal and run gedit /etc/mod_switch.conf and write the following lines in it:

DefaultVendor=  0x19d2
DefaultProduct= 0x2000

TargetVendor=   0x19d2
TargetProduct=  0x0031

MessageContent="5553424312345678000000000000061e000000000000000000000000000000

Please make sure you put the right entry. Default vendor and product can be obtained from lsusb command. Target vendor, product and message content from the file I mentioned above. Save it and close the file.

Now open the terminal and run the following command:

sudo usb_modeswitch -c /etc/usb_modeswitch.conf 

Solution 2:

I am not sure that I completely understand your problem because according to usb_modeswitch your device is in the modem mode i.e the device ID 0x0031 is for modem.

This is from the device_reference.txt file available on usb_modeswitch site:

########################################################
# ZTE MF622 (aka "Onda MDC502HS")
# ZTE MF626
# ZTE MF628+ (tested version from Telia / Sweden)
# ZTE MF633
# ZTE MF636 (aka "Telstra / BigPond 7.2 Mobile Card")
# ZTE MF637
#
# Contributor: Joakim Wennergren and others

DefaultVendor=  0x19d2
DefaultProduct= 0x2000

TargetVendor=   0x19d2
TargetProduct=  0x0031

MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"

NeedResponse=1

As you can see the target ID for your device is 0x0031 which means that your device is in modem mode.

So if you are having this problem at system startup then try plugging your device in after the system boots into Ubuntu and not before.

But if you are having problem when reconnecting the device for example if it got disconnected because of a network problem, then you will need to unplug and replug the device.

UPDATE
I just installed usb_modeswitch and found out that all entries in the config file are commented. So open /etc/usb_modeswitch.conf and look for a line containing

;TargetProduct=  0x0031

Remove semi-colon (;) from start of the following lines

;DefaultVendor=  0x19d2
;DefaultProduct= 0x2000

;TargetVendor=   0x19d2
;TargetProduct=  0x0031

# only for reference
# MessageEndpoint=0x01

;MessageContent="55534243123456782000000080000c85010101180101010101000000000000"

Now save and close this file. You will need sudo privileges for this. Now unplug and replug your device and I believe it should work. If it doesnt then comment the MessageContent line and un-comment (remove semi-colon) the second MessageContent line which is just below the first one.