Page 1 of 1

Huawei K3772 won't connect automatically

Posted: 27 Apr 2015, 01:06
by Laugh2
After updating to ver. 2.2.0 I can use the Huawei K3772 modem in Linux Mint 17.1 Rebecca after executing the following command:

Code: Select all

sudo /usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1526 --target-vendor 0x12d1 --target-product 0x14cf --message-content 55534243123456780000000000000011062000000100000000000000000000
However:
1) It can't be connected before executing this command and won't connect automatically.
2) It can only seldom be connected after Suspend even using the above command (a Reboot is necessary).

I have written a few more details here:
http://forums.linuxmint.com/viewtopic.p ... 0#p1011140

I have tried tips from the following without success:
http://www.draisberghof.de/usb_modeswit ... 772#p12263
http://www.draisberghof.de/usb_modeswit ... 772#p13595

Sometimes after Suspend I get the following error message:
  • (1) Creating object for path '/org/freedesktop/NetworkManager/ActiveConnection/6' failed in libnm-glib.
Can anyone shed light on these problems?

PS: The Huawei K3772-Z modem has different hardware apparently.

Re: Huawei K3772 won't connect automatically

Posted: 27 Apr 2015, 06:19
by LOM
You don't have to create any device config file or own udev rules (which you did wrong, 12d1
:14cf is a resulting id after modeswitch and should not be further switched ).
Download and install the latest datapackage which you find in the same place as you found the usb_modeswitch 2.2.0.

Your suspend problem is not related to usb_modeswitch from what I can see so you have to report that bug to the maintainers of Linux Mint.

Re: Huawei K3772 won't connect automatically

Posted: 28 Apr 2015, 00:23
by Laugh2
Thank you for your comments, Lom. I did install both files during the update to usb-modeswitch 2.2.0, as described by http://www.draisberghof.de/usb_modeswitch/#install. However, the latest datapackage doesn't include data for the K3772 modem. (It does have data for the K3772-Z modem, but that has different hardware.)

I added the following lines for the K3772 modem to the /lib/udev/rules.d/40-usb_modeswitch.rules:

Code: Select all

# Vodafone (ZTE) K3772 (added by me)
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1526", RUN+="usb_modeswitch '%b/%k'"
The modem is now recognised and shown in Network Manager on start-up and after removal/reinsertion after a short wait i.e. hot-plugging works.

Suspend doesn't work reliably. I'll post the issue regarding recovery after Suspend at https://bugs.launchpad.net/linuxmint, which I think is the correct place for possible bugs in Linux Mint 17.1 Rebecca.

Can you suggest how to automatically connect at start-up i.e. without requiring Network Manager? (The computer is actually intended for my elderly mother so I'd rather things were as simple as possible.)

Re: Huawei K3772 won't connect automatically

Posted: 28 Apr 2015, 02:38
by LOM
Hmm..
you shouldn't need to add anything for this device to usb_modeswitch, there is already a 12d1:1526 device config file in the data package and there is an udev rule catching all Huawei devices when they are in default mode (install mode):
# Generic entry for all Huawei devices
ATTRS{idVendor}=="12d1", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
3G dongles do not connect by themselves, you need a program for doing that.
NetworkManager is the linux program for managing any connection outside the box regardless of it being a dialup connection, a direct ethernet connection, or a wifi connection and you can not bypass it.

Re: Huawei K3772 won't connect automatically

Posted: 28 Apr 2015, 07:19
by Laugh2
Since the dongle didn't work out-of-the-box I added the entry described. So for some reason it was necessary. Fortunately it is now working fine.

With the normal wired ethernet connection Mint's Network Manager automatically establishes the connection whenever possible. With the 3G dongle, however, the user must open Network Manager from the menu and select the connection every time.

Since the 3G dingle will be the only internet connection available it would be great if it connects automatically whenever possible just as the wired connection does. How can this be achieved?

Re: Huawei K3772 won't connect automatically

Posted: 30 Apr 2015, 05:05
by LOM
Laugh2 wrote: With the normal wired ethernet connection Mint's Network Manager automatically establishes the connection whenever possible. With the 3G dongle, however, the user must open Network Manager from the menu and select the connection every time.
K3772 can be used either as a ppp dial-up modem or as a direct ethernet connection, I assume NetworkManager (NM) uses the direct ethernet mode.
You may have to change the default device for internet connections in NM, I guess that NM
has your wired ethernet adapter as default.

Re: Huawei K3772 won't connect automatically

Posted: 16 Jul 2015, 00:12
by Laugh2
Hi Lom, this is still an issue unfortunately. Although the USB modem works well once connected, it must always be activated by the user.

I use Linux Mint 17.1. It's Network Manager includes the setting "Automatically connect to this network when it is available" with a check box. This is checked for the 3G modem in my case.

Perhaps I should try disabling the Virtual CD as described here?
http://www.techytalk.info/disable-virtu ... m-devices/

Presumably then I should then uninstall USB_Modeswitch, although leaving it shouldn't be a problem?

Re: Huawei K3772 won't connect automatically

Posted: 16 Jul 2015, 02:33
by LOM
The manual connect you do would not work if the dongle was not already switched so disabling the virtual cd will not solve your problem which is a NetworkManager problem and not a mode switch problem.
File a bug report to the NetworkManager maintainers.