Question

I extracted the linux driver tar file in my desktop directory and the run following commands:

cd Desktop/driver ./install /home//Desktop/driver

and i got following errors:

DRIVER COPY START
STA_PATH_FLAG=.
STA_PATH_FULL=/home/pratik/Desktop/driver/install
START_PATH_DRIVER=/home/pratik/Desktop/driver
CURRENT install from ./install
INSTALL_PATH=/home/pratik/Desktop
DRIVER COPY END
make -C src/ clean
make[1]: Entering directory `/home/pratik/Desktop/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
/home/pratik/Desktop/driver/ndis_driver/ndis_src/src/add_header.sh  "clean" "/lib/modules/3.8.0-19-generic/build/include/linux/usb"
rmmod -f hw_cdc_driver
make[1]: Leaving directory `/home/pratik/Desktop/driver/ndis_driver/ndis_src/src'
make -C src/ modules
make[1]: Entering directory `/home/pratik/Desktop/driver/ndis_driver/ndis_src/src'
#/home/pratik/Desktop/driver/ndis_driver/ndis_src/src/add_header.sh  "modules" "/lib/modules/3.8.0-19-generic/build/include/linux/usb"
make -C /lib/modules/3.8.0-19-generic/build SUBDIRS=/home/pratik/Desktop/driver/ndis_driver/ndis_src/src modules
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /home/pratik/Desktop/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make[1]: Leaving directory `/home/pratik/Desktop/driver/ndis_driver/ndis_src/src'
make -C src/ install
make[1]: Entering directory `/home/pratik/Desktop/driver/ndis_driver/ndis_src/src'
#install -m 744 -c hw_cdc_driver.o /lib/modules/3.8.0-19-generic/kernel/drivers/usb/net
#depmod -a
#modprobe hw_cdc_driver
/home/pratik/Desktop/driver/ndis_driver/ndis_src/src/add_header.sh  "install"
modprobe hw_cdc_driver
make[1]: Leaving directory `/home/pratik/Desktop/driver/ndis_driver/ndis_src/src'
#[31;1m
Install NDIS driver failed.
The compiling environment is not all ready.
Please check gcc, make and kernel buid(/lib/modules/3.8.0-19-generic/build) to be all installed?
#[34;1mNow please enter any key to finish other installations.#[0;0m
#[31;1mNDIS is disabled, and only Modem can be used.#[0;0m
USBSERIAL_TARGET_PATH = 
ACM_TARGET_PATH = 
have usb_modeswitch rules to HUAWEI DataCard: COUNT=1
RULESFILE =/lib/udev/rules.d/40-usb_modeswitch.rules
COUNT_START=1
COUNT_END=0
3
ttyUSB%n COUNT=3
2-1.3:1.3 unbind and bind option
COUNT_END=2
2-1.3:1.2 unbind and bind option
COUNT_END=1
2-1.3:1.0 unbind and bind option
COUNT_END=0
ADDRUNLEVEL=/etc/rc5.d
ADDRUNLEVEL=/etc/rc3.d
ADDRUNLEVEL=/etc/rc2.d
ADDRUNLEVEL=/etc/rc4.d

Please tell me how to solve this problem of installation of linux driver of huwaei modem in my ubuntu 13.04

No correct solution

OTHER TIPS

Here you see the "how to install driver":

bhaskar@bhaskar:~$ cd Desktop/driver
bhaskar@bhaskar:~/Desktop/driver$ sudo ./install
old path =/usr/local/Mobile_Partner/driver
FATAL: Module option is in use.
DRIVER COPY START
STA_PATH_FLAG=.
STA_PATH_FULL=/home/bhaskar/Desktop/driver/install
START_PATH_DRIVER=/home/bhaskar/Desktop/driver
CURRENT install from ./install
INSTALL_PATH is not set ,auto install
INSTALL_PATH=/usr/local/Mobile_Partner
INSTALL_PATH is another path
rm /usr/local/Mobile_Partner/driver
DRIVER COPY END
ls: cannot access /etc/usb_modeswitch.d/: No such file or directory
/usr/local/Mobile_Partner/driver/ndis_driver
Error: missing module or filename.
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'cdc_ether': No such file or directory
Error: could not remove module cdc_ether: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'usbnet': Resource temporarily unavailable
Error: could not remove module usbnet: Resource temporarily unavailable
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'hw_cdc_driver': No such file or directory
Error: could not remove module hw_cdc_driver: No such file or directory
make -C src/ clean
make[1]: Entering directory `/usr/local/Mobile_Partner/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/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "clean" "/lib/modules/3.8.0-19-generic/build/include/linux/usb"
rmmod -f hw_cdc_driver
libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could not remove 'hw_cdc_driver': No such file or directory
Error: could not remove module hw_cdc_driver: No such file or directory
make[1]: *** [clean] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [clean] Error 2
make -C src/ modules
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "modules" "/lib/modules/3.8.0-19-generic/build/include/linux/usb"
make -C /lib/modules/3.8.0-19-generic/build SUBDIRS=/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src modules
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_ncm_prefer_32’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:113:1: warning: return from incompatible pointer type [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_ncm_prefer_crc’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:116:1: warning: return from incompatible pointer type [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘__check_rt_debug’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:128:1: warning: return from incompatible pointer type [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘hw_change_mtu’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:899:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘rx_tlp_parse’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:1085:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘tx_complete’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:1663:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘cdc_ncm_config’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2036:24: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2037:3: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2037:3: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2041:21: warning: comparison of distinct pointer types lacks a cast [enabled by default]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2057:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat]
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c: In function ‘hw_cdc_probe’:
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2589:3: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.o] Error 1
make[2]: *** [_module_/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
make: *** [modules] Error 2
make -C src/ install
make[1]: Entering directory `/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src'
#install -m 744 -c hw_cdc_driver.o /lib/modules/3.8.0-19-generic/kernel/drivers/usb/net
#depmod -a
#modprobe hw_cdc_driver
/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/add_header.sh  "install"
modprobe hw_cdc_driver
FATAL: Module hw_cdc_driver not found.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/Mobile_Partner/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.8.0-19-generic/build) to be all installed?
Now please enter any key to finish other installations.
lNDIS is disabled, and only Modem can be used.
TARGET_PATH = 
TARGET_PATH = 
have usb_modeswitch rules to HUAWEI DataCard: COUNT=0
ADDRUNLEVEL=/etc/rc4.d
‘/etc/rc4.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc4.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
ADDRUNLEVEL=/etc/rc5.d
‘/etc/rc5.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc5.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
ADDRUNLEVEL=/etc/rc2.d
‘/etc/rc2.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc2.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
ADDRUNLEVEL=/etc/rc3.d
‘/etc/rc3.d/S99runhwactivator’ -> ‘/etc/init.d/runhwactivator’
‘/etc/rc3.d/K10runhwactivator’ -> ‘/etc/init.d/runhwactivator’
bhaskar@bhaskar:~/Desktop/driver$ 

and this is how to solve the problem:

The problem is here:

/usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c:2589:3: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]

I had a similar problem with another Huawei modem driver, and I fixed the source code.

First, let's find out where the hw_cdc_driver.c file is. Run the file command on all the files in the ~/Desktop/driver directory:

file * You'll see some of them are "7-zip archive data" files. Run 7z l on each of them, to see the contents:

7z l data.bin

Maybe there are too many files, so you can just grep for the one you are looking for:

7z l data.bin | grep hw_cdc_driver.c

If you find it, then you need to extract the archive.

mkdir data_bin

mv data.bin data_bin
cd data_bin
7z x data.bin
rm data.bin

Now you have the contents of the archive in the data_bin directory. Search for the hw_cdc_driver.c file, open it, and go to line 2589 (the one from the error). You can just comment that line containing dbg (add a // in front of it) and save then close the file.

To pack the archive with the modified file, use 7z again:

cd data_bin
7z a data.bin data_bin
mv data.bin ..

Now you have replaced data.bin with the fixed file. Try to install again.

///I put just my experience with this modem..hope to be helpfur for you...

YOU CAN MERGE THIS PROBLEM WITH YOUR PROBLEM I HOPE TO BE USEFUL :)

you can also follow link

this is again help

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top