Configurando o modem Huawei E3276

5

Estou tendo problemas com meu modem de banda larga móvel (Huawei E3276) no Ubuntu 14.04.

saída de lsusb:

Bus 002 Device 024: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard

Quando liguei o modem, o seguinte apareceu em /var/log/usb_modeswitch.log:

USB_ModeSwitch log from Fri Dec  5 22:52:36 2014

Use global config file: /etc/usb_modeswitch.conf


Started via upstart
Raw args from udev: /2-2

Bus ID for device not given by udev.
 Trying to determine it from kernel name (2-2) ...
Use top device dir /sys/bus/usb/devices/2-2

USB dir exists: /sys/bus/usb/devices/2-2
Warning: USB attribute "serial" not readable.

SCSI dir exists: /sys/bus/usb/devices/2-2
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
Use interface /sys/bus/usb/devices/2-2/2-2:1.0
----------------
USB values from sysfs:
  idVendor  12d1
  idProduct 14fe
  manufacturer  HUAWEI Technology
  product   HUAWEI Mobile
  serial    (null)
  bNumConfigurations    1
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching entries named: /usr/share/usb_modeswitch/12d1:14fe*
Searching overriding entries named: /etc/usb_modeswitch.d/12d1:14fe*
SCSI attributes not needed, move on.

Extract config 12d1:14fe from collection /usr/share/usb_modeswitch/configPack.tar.gz
config: TargetVendor set to 12d1
config: TargetProduct set to 1506,150f,151d
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
! matched, now switching
Command to be run:
/usr/sbin/usb_modeswitch -W -D -s 20 -c /run/usb_modeswitch/current_cfg -u -1   -v 12d1 -p 14fe 2>&1

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------

Read config file: /run/usb_modeswitch/current_cfg

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.1.1 (C) Josua Dietze 2014
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x14fe
TargetVendor=   0x12d1
TargetProductList="1506,150f,151d"
MessageContent="55534243123456780000000000000011062000000101000100000000000000"
NeedResponse=0
Success check enabled, max. wait time 20 seconds
System integration mode enabled

Look for target devices ...
  found USB ID 12d1:14fe
   vendor ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 046d:c05f
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
 No devices in target mode or class found
Look for default devices ...
  found USB ID 12d1:14fe
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 046d:c05f
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 027 on bus 002
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Looking for active driver ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Reset response endpoint 0x81
 Could not reset endpoint (probably harmless): -99
Reset message endpoint 0x01
 Could not reset endpoint (probably harmless): -4
 Device is gone, skip any further commands

Check for mode switch (max. 20 times, once per second) ...
 Search for target devices ...
  found USB ID 12d1:1506
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 046d:c05f
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001

Found target device, open it

Found target device 028 on bus 002

Target device description data
-------------------------
Manufacturer: HUAWEI Technology
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
 Found correct target device

Mode switch succeeded. Bye!

ok:no_data
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ... Read attributes ...
USB dir exists: /sys/bus/usb/devices/2-2
Warning: USB attribute "serial" not readable.
 All attributes matched
Mode switching was successful, found 12d1:1506 (HUAWEI Technology: HUAWEI Mobile)Now check for bound driver ...
 no driver has bound to interface 0 yet
Device not in "bind_list" yet, bind it now
Module loader is /sbin/modprobe
Module is active already
Try to add ID to driver "option"
 ID added to driver; check for new devices in /dev
 driver binding failed
Check for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exit

Eu não entendo do log se está tudo bem ou se há algo errado com a configuração. De qualquer forma, o modem não aparece no menu de rede da Unity.

Eu encontrei algumas instruções para tentar o wvdial. Eu editei /etc/wvdial.conf da seguinte forma:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
; Phone = <Target Phone Number>
; Password = <Your Password>
; Username = <Your Login Name>

[Dialer tele2]
Modem = /dev/ttyUSB0
Phone = *99#
Username =;
Password =;
Init1 = ATZ
Init2 = AT+CPIN=1689
Init3 = AT+CGDCONT=1,"IP","4g.tele2.ee"
Auto DNS = on

E a saída vwdial foi a seguinte:

$ wvdial tele2
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CPIN=1689
AT+CPIN=1689
OK
--> Sending: AT+CGDCONT=1,"IP","4g.tele2.ee"
AT+CGDCONT=1,"IP","4g.tele2.ee"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Waiting for prompt.
--> Connected, but carrier signal lost!  Retrying...
--> Sending: ATDT*99#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATDT*99#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATDT*99#
--> Waiting for carrier.

Portanto, parece que o vwdial pode usar o modem, mas não se conecta à rede. Alguma sugestão sobre o que pode estar errado?

Editar: aqui está o que o ModemManager e o NetworkManager relatam no syslog quando eu conecto o dispositivo em:

Dec  6 08:57:45 dell-vostro-1015 NetworkManager[1269]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.1/net/wwan0, iface: wwan0)
Dec  6 08:57:45 dell-vostro-1015 NetworkManager[1269]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.1/net/wwan0, iface: wwan0): no ifupdown configuration found.
Dec  6 08:57:45 dell-vostro-1015 ModemManager[1057]: <warn>  (ttyUSB0): port attributes not fully set
Dec  6 08:57:45 dell-vostro-1015 usb_modeswitch: switched to 12d1:ffffffff on 002/046
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.405169] scsi 93:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.405173] scsi 92:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.405796] sd 93:0:0:0: Attached scsi generic sg2 type 0
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.419892] sr1: scsi-1 drive
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.420173] sr 92:0:0:0: Attached scsi CD-ROM sr1
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.420345] sr 92:0:0:0: Attached scsi generic sg3 type 5
Dec  6 08:57:46 dell-vostro-1015 kernel: [12557.420929] sd 93:0:0:0: [sdb] Attached SCSI removable disk
Dec  6 08:57:46 dell-vostro-1015 usb_modeswitch[20728]: usb_modeswitch: switched to 12d1:1506 on 2/47
Dec  6 08:57:47 dell-vostro-1015 usb_modeswitch[20728]: usb_modeswitch: add device ID 12d1:1506 to driver option
Dec  6 08:57:47 dell-vostro-1015 usb_modeswitch[20728]: usb_modeswitch: please report the device ID to the Linux USB developers!
Dec  6 08:57:53 dell-vostro-1015 ModemManager[1057]: <info>  Creating modem with plugin 'Huawei' and '3' ports
Dec  6 08:57:53 dell-vostro-1015 ModemManager[1057]: <warn>  Could not grab port (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
Dec  6 08:57:53 dell-vostro-1015 ModemManager[1057]: <warn>  Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1': Failed to find primary AT port
    
por laurt 05.12.2014 / 22:17

2 respostas

1

Eu tenho meu Huawei E3276 rodando em (K) Ubuntu 14.04.3 (e 14.04) criando o seguinte arquivo:

# custom udev rules for UMTS modems
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14fe", RUN+="/usr/sbin/usb_modeswitch -v 12d1 -p 14fe -M '55534243123456780000000000000011062000000100000000000000000000'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1506", RUN+="/bin/bash -c 'modprobe option && echo 12d1 1506 > /sys/bus/usb-serial/drivers/option1/new_id 

Eu salvei isso como /lib/udev/rules.d/70-usb-modeswitch.rules .

    
por johado 20.11.2015 / 12:51
0

Depois de conectar o usb, execute o seguinte comando:

sudo usb_modeswitch -J -v 0x12d1 -p 0x14fe

Se isso não funcionar, faça o download e instale a versão mais recente dos dados usb_modeswitch e usb_modeswitch

https://launchpad.net/ubuntu/+source/usb-modeswitch/2.2.5+repack0-1ubuntu1/+build/8089712

http://packages.ubuntu.com/wily/all/usb-modeswitch-data/download

Reinicie, conecte o dispositivo e tente novamente o comando sudo usb_mode ... acima.

    
por Oren 19.10.2015 / 15:18