Huawei 3G USB sticks ("dongles") support a special command to control the mode how they will appear to a host computer. This allows to switch off the flipflop USB capability, also called USB modeswitching.
USB modeswitching means that these and many other USB 3G sticks at first only provide a virtual CD-ROM drive to the computer from which a (Windows) computer will install the device drivers, and then the device will switch to show only a 3G modem interface. This of course does not work with non-Windows computers like Linux and Android systems, making it a completely bad idea of course. For Linux, there is now the
usb_modeswitch utility which now switches the device to the 3G modem mode more or less automatically, but this is still not standard for Android (though possible on rooted devices, and included in the PPP Widget app for rooted devices).
So for using Huawei 3G sticks on non-rooted Android devices, we want to disable the virtual CD-ROM mode permanently. This can be done as follows on a Linux host:
- Make sure you execute these steps from a computer that can see the serial line interfaces of the device. This should be possible on any Linux computer that has
usb_modeswitchinstalled and configured, like done by default on at least Ubuntu 12.10 (and newer).
- Find out the first USB interface of the device by doing
ls /dev/ttyUSB*before and after plugging the 3G stick in and taking the first result.
- Open one terminal for receiving messages from the device, by executing
cat /dev/ttyUSB1(using your device number of course).
- In another terminal, send a command to the stick to test communication with it. Execute
echo "ATi^M" > /dev/ttyUSB1. But note: You can not simply copy this over, as the
^Mis just the visual representation of a single control character. Enter this character in the terminal directly by pressing Ctrl+V and afterwards Ctrl+M.
- Now, your terminal with
catshould display information that the stick sent about itself.
- If this worked, now send the command to disable the virtual CD-ROM mode:
echo "AT^U2DIAG=0^M" > /dev/ttyUSB1. Note that
^Mis again a control character that you have to enter specially (see above), but
^Uis just normal text, so you can copy & paste it.
- Now your
catterminal should answer with
OK. If so, the command was successful. [source]
There are also instructions on an equivalent procedure using Windows; however I was not able to follow that procedure as my Huawei K3715 3G stick did not let me talk to it through a serial terminal at all, probably because I set it up with bad connection speed etc. settings (as these were nowhere to be found …).
Also compare "Hayes command set" on Wikipedia for more information.