I am using Trisquel 7.0 LTS and mobile broadband (Net-Setter) to establish connection.
Following states (1-4) are showing different conditions/situations for clear understanding of problem.
State-1:-
After Installation of Trisquel 7.0 LTS, Everything is working fine. My modem is detected as follows (lsusb output):
$ lsusb
Bus 001 Device 004: ID 12d1:1436 Huawei Technologies Co., Ltd. E173 3G Modem (modem-mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
And It is also detected by nm-applet or say by using nmcli as follows:
$ nmcli dev list
GENERAL.DEVICE: ttyUSB2
GENERAL.TYPE: gsm
GENERAL.VENDOR: HUAWEI Technology
GENERAL.PRODUCT: HUAWEI Mobile
State-2:-
But I recently ran an installation script from Mobile Partner, which did not properly install, and hence I also ran the Un-installation script And Unfortunately, in spite of uninstallation, now my modem isn't working (detecting properly).
There is now a change in detection and new (current) output by lsusb is:
$ lsusb
Bus 001 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Here you can see the difference that is-
Ealier:
Bus 001 Device 004: ID 12d1:1436 Huawei Technologies Co., Ltd. E173 3G Modem (modem-mode)
And Now:
Bus 001 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. 1552/E1800/E173 (HSPA modem)
And now the modem isn't detected in nm-applet (nor listed by nmcli).
So, How can I reset settings to default because default Trisquel has no problem with my device. In other words which files are affected by this new behavior and How do I revert to Earlier condition ? (Otherwise I have to re-install my whole OS!)
State3:-
I've written a file named 12d1:1446 under /etc/usb_modeswitch.d/ which is:
DefaultVendor= 0x12d1 DefaultProduct=0x1446 MessageContent="55534243123456780000000000000011062000000100000000000000000000"
And I run this by command:
sudo usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1\:1446
Which works fine and cause lsusb changed
From:
Bus 001 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem)
Back To:
Bus 001 Device 004: ID 12d1:1436 Huawei Technologies Co., Ltd. E173 3G Modem (modem-mode)
And hence it will be detected by network-manager ; I will be able to connect.
State-4:(Following to this answer)-
I've written file named 99-mymodem.rules under /etc/rules.d containing:
ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="/home/pandya/usbmode"
And /home/pandya/usbmode contains:
#!/bin/bash
sudo usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1\:1446
Hence, When I plugged in my modem, 99-mymodem.rules runs /home/pandya/usbmode and I managed to detect my modem as:
Bus 001 Device 004: ID 12d1:1436 Huawei Technologies Co., Ltd. E173 3G Modem (modem-mode)
Ultimately I can successfully connect modem by network-manager (nm-applet).
Conclusion:-
However, current condition (State-4) is alternatively what I'm looking for but not Exactly (State-1) because we are passing through udev-rule and usb-modeswitch every time when modem is plugged-in.
In other words Why I have to usb_modeswitch Now? (Earlier no necessary, Also If I boot from Live DVD and choose Try OS without installing, modem is working fine without manually usb_modeswitch).
Therefore (since I've written this question) My aim is to revert to State-1.