Ubuntu – Ubuntu14.04: UNE 4G LTE mobile modem not connecting

14.04compilingdrivershuaweiusb

I recently upgraded Ubuntu from 12.04 to 14.04 and as a result I lost my 4G LTE connection. (It is working ok in windows. I have dual booting). When I try to connect via the UNE icon Ubuntu replies with:

The device has been disconnected or is unavailable

The output from lsusb indicates that the 4G mobile modem (HUAWEI E398) is recognized, see below:

Bus 002 Device 005: ID 0951:1642 Kingston Technology DT101 G2
Bus 002 Device 004: ID 046d:c019 Logitech, Inc. Optical Tilt Wheel Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1bcf:288a Sunplus Innovation Technology Inc. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I uninstalled the driver (provided by the vendor) and tried to install it again but Ubuntu 14.04 replies with some error messages, the output from

"./install" in dir: /usr/local/UNE_4G_LTE is:
Installed version: 21.005.22.05.570
Installing version: 21.005.22.05.570

The software is exist. Do you want overwrite it? ([Y]/N):Y

Local path is: /usr/local/UNE_4G_LTE

Installing UNE 4G LTE...DRIVER COPY START
STA_PATH_FLAG=.
STA_PATH_FULL=/usr/local/UNE_4G_LTE/driver/install
START_PATH_DRIVER=/usr/local/UNE_4G_LTE/driver
CURRENT install from ./driver/install
INSTALL_PATH=/usr/local/UNE_4G_LTE
DRIVER COPY END
modinfo: ERROR: missing module or filename.
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'cdc_ether': No such file or directory
rmmod: ERROR: could not remove module cdc_ether: No such file or directory
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'usbnet': Resource temporarily unavailable
rmmod: ERROR: could not remove module usbnet: Resource temporarily unavailable
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'hw_cdc_driver': No such file or directory
rmmod: ERROR: could not remove module hw_cdc_driver: No such file or directory
make -C src/ clean
make[1]: Entering directory `/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/add_header.sh  "clean" "/lib/modules/3.13.0-55-generic/build/include/linux/usb"
rmmod -f hw_cdc_driver
rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'hw_cdc_driver': No such file or directory
rmmod: ERROR: could not remove module hw_cdc_driver: No such file or directory
make[1]: *** [clean] Error 1
make[1]: Leaving directory `/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src'
make: *** [clean] Error 2
make -C src/ modules
make[1]: Entering directory `/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src'
#/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/add_header.sh  "modules" "/lib/modules/3.13.0-55-generic/build/include/linux/usb"
make -C /lib/modules/3.13.0-55-generic/build SUBDIRS=/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src modules
make[2]: Entering directory `/usr/src/linux-headers-3.13.0-55-generic'
  CC [M]  /usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o
In file included from include/linux/module.h:17:0,
                 from /usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:23:
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_ncm_prefer_32’:
include/linux/moduleparam.h:349:45: warning: return from incompatible pointer type [enabled by default]
  static inline type *__check_##name(void) { return(p); }
                                             ^
include/linux/moduleparam.h:395:35: note: in expansion of macro ‘__param_check’
 #define param_check_bool(name, p) __param_check(name, p, bool)
                                   ^
include/linux/moduleparam.h:127:2: note: in expansion of macro ‘param_check_bool’
  param_check_##type(name, &(value));       \
  ^
include/linux/moduleparam.h:113:2: note: in expansion of macro ‘module_param_named’
  module_param_named(name, name, type, perm)
  ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:113:1: note: in expansion of macro ‘module_param’
 module_param(ncm_prefer_32, bool, S_IRUGO);
 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_ncm_prefer_crc’:
include/linux/moduleparam.h:349:45: warning: return from incompatible pointer type [enabled by default]
  static inline type *__check_##name(void) { return(p); }
                                             ^
include/linux/moduleparam.h:395:35: note: in expansion of macro ‘__param_check’
 #define param_check_bool(name, p) __param_check(name, p, bool)
                                   ^
include/linux/moduleparam.h:127:2: note: in expansion of macro ‘param_check_bool’
  param_check_##type(name, &(value));       \
  ^
include/linux/moduleparam.h:113:2: note: in expansion of macro ‘module_param_named’
  module_param_named(name, name, type, perm)
  ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:116:1: note: in expansion of macro ‘module_param’
 module_param(ncm_prefer_crc, bool, S_IRUGO);
 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_rt_debug’:
include/linux/moduleparam.h:349:45: warning: return from incompatible pointer type [enabled by default]
  static inline type *__check_##name(void) { return(p); }
                                             ^
include/linux/moduleparam.h:395:35: note: in expansion of macro ‘__param_check’
 #define param_check_bool(name, p) __param_check(name, p, bool)
                                   ^
include/linux/moduleparam.h:127:2: note: in expansion of macro ‘param_check_bool’
  param_check_##type(name, &(value));       \
  ^
include/linux/moduleparam.h:113:2: note: in expansion of macro ‘module_param_named’
  module_param_named(name, name, type, perm)
  ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:128:1: note: in expansion of macro ‘module_param’
 module_param(rt_debug, bool, S_IRUGO|S_IWUSR);
 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘rx_tlp_parse’:
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:1085:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
       unsigned char *ptr = (unsigned char *)kmalloc(dev->hw_tlp_tmp_buf.bytesneeded + dev->hw_tlp_tmp_buf.pktlength
       ^
In file included from include/linux/cache.h:4:0,
                 from include/linux/time.h:4,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from /usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:23:
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘cdc_ncm_config’:
include/linux/kernel.h:678:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_max1 == &_max2);  \
                 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:488:41: note: in expansion of macro ‘max’
 #define NCM_NTB_HARD_MAX_IN_SIZE ((u32)(max(16,ncm_read_size_in1k) * 1024))
                                         ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2037:24: note: in expansion of macro ‘NCM_NTB_HARD_MAX_IN_SIZE’
  if (ctx->rx_max_ntb > NCM_NTB_HARD_MAX_IN_SIZE) {
                        ^
include/linux/kernel.h:678:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_max1 == &_max2);  \
                 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:488:41: note: in expansion of macro ‘max’
 #define NCM_NTB_HARD_MAX_IN_SIZE ((u32)(max(16,ncm_read_size_in1k) * 1024))
                                         ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:655:76: note: in expansion of macro ‘NCM_NTB_HARD_MAX_IN_SIZE’
  ((void)(rt_debug && printk(KERN_ERR "Hw_cdc_driver######: " fmt "\n" , ## arg)))
                                                                            ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2038:3: note: in expansion of macro ‘devdbg’
   devdbg(ctx->ndev, "dwNtbInMaxSize (%u) must be at most %u "
   ^
include/linux/kernel.h:678:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_max1 == &_max2);  \
                 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:488:41: note: in expansion of macro ‘max’
 #define NCM_NTB_HARD_MAX_IN_SIZE ((u32)(max(16,ncm_read_size_in1k) * 1024))
                                         ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:655:76: note: in expansion of macro ‘NCM_NTB_HARD_MAX_IN_SIZE’
  ((void)(rt_debug && printk(KERN_ERR "Hw_cdc_driver######: " fmt "\n" , ## arg)))
                                                                            ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2038:3: note: in expansion of macro ‘devdbg’
   devdbg(ctx->ndev, "dwNtbInMaxSize (%u) must be at most %u "
   ^
include/linux/kernel.h:678:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_max1 == &_max2);  \
                 ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:488:41: note: in expansion of macro ‘max’
 #define NCM_NTB_HARD_MAX_IN_SIZE ((u32)(max(16,ncm_read_size_in1k) * 1024))
                                         ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2042:21: note: in expansion of macro ‘NCM_NTB_HARD_MAX_IN_SIZE’
   ctx->rx_max_ntb = NCM_NTB_HARD_MAX_IN_SIZE;
                     ^
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘hw_cdc_probe’:
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2590:3: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
   dbg ("can't kmalloc dev");
   ^
cc1: some warnings being treated as errors
make[3]: *** [/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o] Error 1
make[2]: *** [_module_/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.13.0-55-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src'
make: *** [modules] Error 2
make -C src/ install
make[1]: Entering directory `/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src'
#install -m 744 -c hw_cdc_driver.o /lib/modules/3.13.0-55-generic/kernel/drivers/usb/net
#depmod -a
#modprobe hw_cdc_driver
/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src/add_header.sh  "install"
modprobe hw_cdc_driver
modprobe: FATAL: Module hw_cdc_driver not found.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/UNE_4G_LTE/driver/ndis_driver/ndis_src/src'
make: *** [install] Error 2

Install NDIS driver failed.
The compiling environment is not all ready.
Please check gcc, make and kernel buid(/lib/modules/3.13.0-55-generic/build) to be all installed?
Now please enter any key to finish other installations.

I cannot understand what is going on, I had no problem compiling and connecting the 4G mobile model in Ubuntu 12.04, I wish I could go back to 12.04! Is there any person who has faced a similar problem and solved it?
This one is driving me crazy, any help would be greatly appreciated.

Best Answer

Please, do not use vendor drivers from Une, Tigo, and the rest of the Movile broadband devices vendors. That drivers cause a lot of problems and can simply break your internet connection. I had a similar problem with a ZTE modem from Movistar, i tried to install the driver, but that let me wihout internet and borke my modem manager. Check if you have installed GCC, g++ and cmake. You can install the Modem manager GUI, which is designed for Ubuntu.

Related Question