Tim web 3G com modem onda msa405hs

Iniciado por mfx1975, 04 de Setembro de 2009, 17:05

tópico anterior - próximo tópico

mfx1975

Fábio, bom dia...

Bem, inicialmente não estava usando nenhuma regra.
Porém lembrei me de um tutorial que fazia referência a tais regras. Eu as implementei e o resultado já avançou um pouco mais...

Agora o wvdial fica rediscando, mas a conexão ainda não se conclui...

Bem segue abaixo a saída do uname -a e as regras que incluí...


mauricio@sukoi:~$ uname -a
Linux sukoi 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:24 UTC 2009 i686 GNU/Linux



mauricio@sukoi:~$ sudo gedit /sbin/switch

#!/bin/bash
sleep 5;
/usr/sbin/usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0037 -m 0x01 -M 55534243123456782000000080000c85010101180101010101000000000001



mauricio@sukoi:~$ sudo gedit /usr/share/hal/fdi/preprobe/20thirdparty/45-onda-msa405hs.fdi

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="usb.vendor_id" int="0x19d2"> <!-- ONDA -->
<match key="usb.product_id" int="0x0037"> <!-- MSA405HS -->
<merge key="info.ignore" type="bool">true</merge>
</match>
</match>
<match key="serial.device" string="/dev/ttyUSB1">
<append key="info.capabilities" type="strlist">modem</append>
<append key="modem.command_sets" type="strlist">GSM-07.07</append>
<append key="modem.command_sets" type="strlist">GSM-07.05</append>
</match>
</device>
</deviceinfo>



mauricio@sukoi:~$ sudo gedit /etc/udev/rules.d/45-onda-msa405hs.rules

ACTION!="add", GOTO="ONDA_End"
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000", SYSFS{idVendor}=="19d2", RUN+="/sbin/tim"
SUBSYSTEM=="usb", SYSFS{idProduct}=="0037", SYSFS{idVendor}=="19d2", RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0037"
LABEL="ONDA_End"



Após estas novas configurações, veja a saída no wvdial tim


mauricio@sukoi:~$ lsusb
Bus 001 Device 004: ID 19d2:2000 
Bus 001 Device 002: ID 0db0:6877 Micro Star International RT2573
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 15d9:0a37 
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub



mauricio@sukoi:~$ sudo switch

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 0.9.6 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

Looking for target devices
No target device found
Looking for default devices
Found default devices (1)
Prepare switching, accessing latest device
Looking for active default driver to detach it
No driver found. Device probably not initialized. Trying to continue ...
Setting up communication with device
Trying to send the message
OK, message successfully sent.
-> See /proc/bus/usb/devices (or call lsusb) for changes. Bye


mauricio@sukoi:~$ lsusb
Bus 001 Device 005: ID 19d2:0037 
Bus 001 Device 002: ID 0db0:6877 Micro Star International RT2573
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 15d9:0a37 
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


mauricio@sukoi:~$ sudo wvdial tim
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"ip","tim.br"
AT+CGDCONT=1,"ip","tim.br"
OK
--> Modem initialized.
--> Sending: ATD*99***1#
--> Waiting for carrier.
ATD*99***1#
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.
--> Sending: ATD*99***1#
--> Waiting for carrier.
--> Timed out while dialing.  Trying again.

fabio2paolini

Olá como ficou o seu /etc/wvdial.conf agora?

Tente modificar a linha
Modem = /dev/ttyUSB1
para
Modem = /dev/ttyUSB0
Eu não sei se funciona, mas é uma tentativa.
O único arquivo de regras que eu uso é um que fica em /etc/udev/rules.d
Inclusive atualmente eu uso um kernel 2.6.30 e não preciso mais deste arquivo e talvez este possa ser seu caso também. Eu uso apenas para garantir que o /dev/ttyUSB*  se mantenha sempre o mesmo (apenas por conveniência, pois antes eu tinha que algumas vezes modificar a linha  Modem = /dev/ttyUSB0 do wvdial.conf, trocando o zero por um, por exemplo).
Eu notei também que o seu arquivo /etc/udev/rules.d/45-onda-msa405hs.rules executa um programa chamado /sbin/tim, você possui este scrpit?