From your lsusb
output I figure you are talking about a Huawei E352 USB 3G/4G modem, provided by T-Mobile NL. Most likely this is a Windows-induced problem. Windows first needs to install USB modem drivers to be able to mount the device as such. Instead of delivering a mini CD with drivers along with the USB modem, Huawei (and others) install some flash storage on their devices. So the device will be initially mounted as flash storage. Then, on a Windows machine, the installer will install the modem drivers and finally change the devices settings so it will be recognised as a modem next time.
For Linux users this is confusing, since their systems too will first recognise the flash storage, but not the modem. And the flash storage is not needed since the Linux kernel already has all necessary drivers onboard. I do not think you need to install any drivers.
What you need is the usb-modeswitch
tool. Install it from the Ubuntu repositories:
sudo apt-get install usb-modeswitch
The following commands need to be run as root. So pay proper attention to what you are doing!
Connect your modem and find the vendor ID and product ID for your Huawei:
lsusb | grep Huawei
You will find what you already knew:
Bus 002 Device 003: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem
The vendor ID is '12d1' and the product ID is '14fe'.
usb-modeswitch
has a lot of ready configuration files in a tar-archive. First find your device's configuration file in the archive:
grep 12d1 /lib/udev/rules.d/40-usb_modeswitch.rules ATTRS{idVendor}=="12d1", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
Then extract your configuration file from the archive:
tar xf /usr/share/usb_modeswitch/configPack.tar.gz 12d1\:14fe
And bring it up:
cat 12d1\14fe
It wil probably say:
# T-Mobile NL (Huawei E352)
TargetVendor=0x12d1
TargetProductList="1506,150f,151d"
HuaweiNewMode=1
Finally change the setting on your Huawei device:
usb_modeswitch -v 12d1 -p 14fe -c 12d1\:14fe
Now the flash storage driver will be detached and the modem driver activated. To check if everything went well run lsusb
once more:
lsusb | grep Huawei
If all is well, you should see another product ID. A minor change with huge usability consequences.
After this you can set up your 3G/4G internet connection as usual with Network Manager. Make sure you switch off your WiFi, since WiFi and GSM will not run alongside each other.
If you want to keep track of your data use, install the vnstat
package. It is text based, but gives all the information. Might you prefer a GUI, also add the vnstati
package.
(Many thanks to Filip Vervloesem who covers this topic in length in the Dutch Linux Magazine 09/2017 issue.)
sudo grep 12d1 /lib/udev/rules.d/40-usb_modeswitch.rules ATTRS{idVendor}=="12d1", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
supposed to achieve? It looks like you copied the command from somewhere and included the supposed command output in the command itself.