como resolver o problema da instalação huawei modem e303c no Ubuntu 13.04

2

Estou tentando instalar o software do modem huawei. Mas não está sendo instalado. Está mostrando assim:

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$ 

Por favor, diga-me como posso resolver este problema. Eu tentei com o software Mobile Partner outras versões. O problema é o mesmo para todos.

Com obrigado, Bhaskar

    
por Bhaskar 10.08.2013 / 18:12

1 resposta

6

O problema está aqui:

/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]

Eu tive um problema semelhante com outro driver de modem da Huawei e consertei o código-fonte.

Primeiro, vamos descobrir onde o arquivo hw_cdc_driver.c está. Execute o comando file em todos os arquivos no diretório ~/Desktop/driver :

file *

Você verá alguns deles como arquivos "7-zip archive data". Execute 7z l em cada um deles para ver o conteúdo:

7z l data.bin

Talvez haja muitos arquivos, então você pode usar apenas grep para o que está procurando:

7z l data.bin | grep hw_cdc_driver.c

Se você encontrá-lo, você precisa extrair o arquivo.

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

Agora você tem o conteúdo do arquivo no diretório data_bin . Procure o arquivo hw_cdc_driver.c , abra-o e vá para a linha 2589 (aquela do erro). Você pode apenas comentar essa linha contendo dbg (adicione um // na frente dele) e salve e feche o arquivo.

Para empacotar o arquivo com o arquivo modificado, use 7z novamente:

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

Agora você substituiu data.bin pelo arquivo fixo. Tente instalar novamente.

    
por Cos64 03.09.2013 / 21:17