[Risolto] Chiavetta Onda MT503HSA

Ciao a tutti,
ho acquistato una chiavetta internet TIM Onda MT503HSA che ho installato dopo vari casini sulla mia Fedora 12. La chiavetta ha funzionato correttamente ma dopo l’update del kernel, non è più funzionata.
Per risolvere il problema ho reinstallato nuovamente la chiavetta e il modulo onda ora viene caricato corettamente, ma non la chiavetta rimane in stato inizializzazione per quasi un’ora senza dare altri esiti. Dal debug della chiavetta sia modem che sim vengono visti in off. Ho provato anche con NetworkManager ma non è così facile far funzionare le connessioni anche con le chiavette Vodafone (che nell Fedora 11) funzionavano.
Avete qualche guida precisa per la reinstallazione della chiavetta ed eventuali test per verificarne le funzionalità?

Grazie mille in anticipo

Hai letto http://www.fedoraonline.it/modules/newbb/viewtopic.php?topic_id=10704&viewmode=flat&order=ASC&type=&mode=0&start=0?

(Se con il vecchio kernel funzionava puoi comunque usare il vecchio se hai necessità immediate di uso della chiavetta).

Già per la precedente installazione avevo seguito alcuni post e le guide perché non avevo mai avuto a che fare con questo tipo di hardware su Fedora. Infatti dopo questa installazione non ho avuto problemi. Seguendo gli stessi passi quest’oggi non sono arrivato ad una conclusione funzionante. Vi allego delle note che mi ero segnato all’epoca.

  • Per prima cosa verificare che la versione di OS sia una Fedora 12 e che il kernel usato sia un 2.6.xxx.
[root@cellopc ~]# cat /etc/fedora-release 
Fedora release 12 (Constantine)
[root@cellopc ~]# uname -r
2.6.31.6-145.fc12.i686
  • Si ricorda che con il kernel-PAE ci sono problemi di supporto dei driver del modem, quindi nel caso si utilizzi questa tipologia di kernel, converrà installare il kernel più aggiornato e modificare il proprio grub.conf per caricare il nuovo kernel.
[root@cellopc ~]# yum install -y kernel kernel-devel kernel-headers
[root@cellopc ~]# vim /etc/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_root-lv_root
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=0
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.6-145.fc12.i686)
	root (hd0,0)
	kernel /vmlinuz-2.6.31.6-145.fc12.i686 ro root=/dev/mapper/vg_root-lv_root rhgb quiet SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=it2
	initrd /initramfs-2.6.31.6-145.fc12.i686.img
[root@cellopc ~]# reboot
  • Ora bisognerà installare i pacchetti necessari alla compilazione dei driver forniti con la chiavetta, e ulteriori pacchetti presenti sul cd (ma sono per fedora core 8).
[root@cellopc ~]# yum install -y make gcc wvdial automake glibc ppp qt3 ncurses-devel
  • Verificare se il pacchetto vodafone-mobile-connect sia installato, perché tra i diversi file crea /etc/modprobe.d/blacklist-vmc dove viene eseguita la blacklist del modulo onda. Nel caso non servisse rimuoverlo manualmente.
[root@cellopc Alice_MOBILE]# rpm -qa | grep -i vodafone
vodafone-mobile-connect-2.10.01-521.noarch
[root@cellopc Alice_MOBILE]# rm -f /etc/modprobe.d/blacklist-vmc
  • Inserire il cd di installazione fornito con la chiavetta e scaricare tutto il contenuto della directory Linux in locale.
[root@cellopc ~]# rsync -avSA /media/Alice_MOBILE/Software/Linux/ /tmp/Linux/

Dopo di che scompattare il contenuto del pacchetto ODTIM_Linux_UI.tar.gz in locale e spostarsi all’interno della nuova directory

[root@cellopc /]# cd /tmp/Linux/
[root@cellopc Linux]# tar xvfz ODTIM_Linux_UI.tar.gz
[root@cellopc ODTIM_Linux_UI]# cd ODTIM_Linux_UI
  • Da qui lanciare lo script install.sh per far partire l’installazione. Prima di lanciare lo script, inserire la chiavetta in una porta usb, e verificare che venga riconosciuta in modo corretto come modem usb.
[root@cellopc ~]# lsusb | grep -i onda
Bus 001 Device 006: ID 19d2:0037 ONDA Communication S.p.A. 
[root@cellopc ~]# dmesg | grep -i ttyusb
usb 1-5: GSM modem (1-port) converter now attached to ttyUSB0
usb 1-5: GSM modem (1-port) converter now attached to ttyUSB2
usb 1-5: GSM modem (1-port) converter now attached to ttyUSB3
usb 1-5: GSM modem (1-port) converter now attached to ttyUSB4
  • Se viene riconosciuta lanciare lo script di installazione.
[root@cellopc ODTIM_Linux_UI]# ./install.sh
  • Lo script dovrebbe compilare il pacchetto e creare in automatico il modulo del kernel onda. Se fallisce bisogna eseguire queste operazioni per forzare la creazione del modulo manualmente. Prima di forzare la compilazione manuale, disintallare il pacchetto in precedenza installato, verificando che non ci siano processi dell’applicazione alice modem ancora attivi (nel caso bonificare con dei kill manuali).
[root@cellopc ~]# ps -ef | grep -i alice
[root@cellopc ~]# cd /opt/Alice_MOBILE/
[root@cellopc Alice_MOBILE]# ./unistall.sh
[root@cellopc ~]# cp /tmp/ONDA_driver_install_V2.1/onda.ko /lib/modules/2.6.31.6-145.fc12.i686/kernel/drivers/usb/serial/
[root@cellopc ~]# depmod -a
[root@cellopc ~]# modprobe onda
[root@cellopc ~]# lsmod | grep onda
onda                     816  0 
  • Da qui rilanciare nuovamente l’installazione del pacchetto Alice Mobile.
[root@cellopc /]# cd /tmp/Linux/ODTIM_Linux_UI
[root@cellopc ODTIM_Linux_UI]# ./install.sh
  • Verrà richiesto successivamente il PIN della sim card inserita nella chiavetta, si dovranno attendere alcuni minuti per il riconoscimento del modem e della sim card. Se tutto funziona correttamente si dovrà premere solo su “Connetti” e si potrà accedere alla rete. Verificando tra le schede di rete attive, si noterà una device ppp0 con indirizzo pubblico, che sarà la scheda di rete per l’accesso ad internet.
[root@cellopc Alice_MOBILE]# ip a
7: ppp0:  mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet 217.202.120.59 peer 10.64.64.64/32 scope global ppp0

ottimo lavoro.

Solo che non funziona :-(. La mia versione di kernel è la 2.6.31.9-174.fc12.i686, ed è funzionante sulla 2.6.31.6-145.fc12.i686.

Non credo sia stato stravolto tutto!?!?!

togliendo e mettendo la pennetta, possiamo vedere un:

[code]# lsusb

dmesg|tail[/code]

Eccolo l’output.

[root@cellopc ~]# dmesg | grep -i ttyusb

Il problema è il riconoscimento della device come modem GSM. Vorrei capire se serve installare usb_modeswitch e configurarlo in modo che veda la chiavetta come modem GSM e come automatizzarlo all’inserimento della chiavetta.

[root@cellopc ~]# lsusb 
Bus 001 Device 002: ID 19d2:2000 ONDA Communication S.p.A. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Ho più o meno capito il funzionamento di usb_modeswitch ma con le configurazioni sono proprio una frana.

Che si consiglia di fare?

prova così:

[code]

yum install usb_modeswitch

usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0002 -d 1

modprobe usbserial vendor=0x19d2 product=0x0002 [/code]

vediamo il dmesg.

Ciao,
ho provato a lanciare i comandi da te indicati e ora il modem viene visto, creando i symlink sotto /dev/ttyUSB*

[root@cellopc ~]# lsusb 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 19d2:2000 ONDA Communication S.p.A. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[root@cellopc ~]# usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0002 -d 1

Looking for target devices …
No devices in target mode or class found
Looking for default devices …
No default device found. Is it connected? Bye.

[root@cellopc ~]# usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0002 -d 1

Looking for target devices …
No devices in target mode or class found
Looking for default devices …
No default device found. Is it connected? Bye.

[root@cellopc ~]# modprobe usbserial vendor=0x19d2 product=0x0002
[root@cellopc ~]# lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 19d2:0053 ONDA Communication S.p.A.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel

[root@cellopc ~]# dmesg | grep -i ttyusb
usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
usb 1-3: GSM modem (1-port) converter now attached to ttyUSB1
usb 1-3: GSM modem (1-port) converter now attached to ttyUSB2
usb 1-3: GSM modem (1-port) converter now attached to ttyUSB3

Provando a lanciare poi Alice_Mobile, la periferica non viene riconosciuta, e dal debug del programma lanciando da linea di comando, si nota che il modem e la sim vengono considerate on off. Ho provato a utilizzare NetowrkManager e la connessione viene configurata ma quando viene avviata, non viene terminata con successo. Di seguito metto tutte le righe del messages che vengono mostrate al momento della connessione.

Jan 11 09:41:54 cellopc NetworkManager:   Activation (ttyUSB2) starting connection 'TIM ibox'
Jan 11 09:41:54 cellopc NetworkManager:   (ttyUSB2): device state change: 3 -> 4 (reason 0)
Jan 11 09:41:54 cellopc NetworkManager:   Activation (ttyUSB2) Stage 1 of 5 (Device Prepare) scheduled...
Jan 11 09:41:54 cellopc NetworkManager:   Activation (ttyUSB2) Stage 1 of 5 (Device Prepare) started...
Jan 11 09:41:54 cellopc NetworkManager:   Activation (ttyUSB2) Stage 1 of 5 (Device Prepare) complete.
Jan 11 09:41:54 cellopc modem-manager: (ttyUSB2) opening serial device...
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disabled -> enabling)
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (enabling -> registered)
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> connecting)
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 2 of 5 (Device Configure) scheduled...
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 2 of 5 (Device Configure) starting...
Jan 11 09:42:04 cellopc NetworkManager:   (ttyUSB2): device state change: 4 -> 5 (reason 0)
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 2 of 5 (Device Configure) successful.
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 3 of 5 (IP Configure Start) scheduled.
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 2 of 5 (Device Configure) complete.
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 3 of 5 (IP Configure Start) started...
Jan 11 09:42:04 cellopc NetworkManager:   (ttyUSB2): device state change: 5 -> 7 (reason 0)
Jan 11 09:42:04 cellopc NetworkManager:   Starting pppd connection
Jan 11 09:42:04 cellopc pppd[4970]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so is for pppd version 2.4.4, this is 2.4.5
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 4 of 5 (IP6 Configure Get) scheduled...
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 3 of 5 (IP Configure Start) complete.
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 4 of 5 (IP6 Configure Get) started...
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) Stage 4 of 5 (IP6 Configure Get) complete.
Jan 11 09:42:04 cellopc NetworkManager:   ppp_exit_code(): ppp pid 4970 exited with error: pppd options error
Jan 11 09:42:04 cellopc NetworkManager:   (ttyUSB2): device state change: 7 -> 9 (reason 14)
Jan 11 09:42:04 cellopc NetworkManager:   Marking connection 'TIM ibox' invalid.
Jan 11 09:42:04 cellopc NetworkManager:   Activation (ttyUSB2) failed.
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Jan 11 09:42:04 cellopc NetworkManager:   (ttyUSB2): device state change: 9 -> 3 (reason 0)
Jan 11 09:42:04 cellopc NetworkManager:   (ttyUSB2): deactivating device (reason: 0).
Jan 11 09:42:04 cellopc NetworkManager:   Policy set 'Borsa' (eth0) as default for routing and DNS.
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> disabling)
Jan 11 09:42:04 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disabling -> disconnecting)
Jan 11 09:42:10 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> registered)
Jan 11 09:42:10 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> disabling)
Jan 11 09:42:10 cellopc modem-manager: (ttyUSB2) closing serial device...
Jan 11 09:42:10 cellopc modem-manager: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disabling -> disabled)

non usare Alice_mobile ne networkmanager, prova ad usare wvdial.

Lanciando wvdial sembra connettersi e l’interfaccia ppp compare in modo corretto.

[root@cellopc ~]# wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATX3
ATX3
OK
--> Sending: AT&F Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
AT&F Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: at+cgdcont=1,"IP","ibox.tim.it"
at+cgdcont=1,"IP","ibox.tim.it"
OK
--> Modem initialized.
--> Sending: ATM1L3DT*99#
--> Waiting for carrier.
ATM1L3DT*99#
CONNECT 7200000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Jan 11 15:03:25 2010
--> Pid of pppd: 2503
--> Using interface ppp0
--> Authentication (PAP) started
--> Authentication (PAP) successful
--> local  IP address 95.74.97.19
--> remote IP address 10.64.64.64
--> primary   DNS address 213.230.155.10
--> secondary DNS address 217.200.200.42
--> Script /etc/ppp/ip-up run successful
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect

[root@cellopc ~]# ip a
8: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp
inet 95.74.97.19 peer 10.64.64.64/32 scope global ppp0

Provo però a lanciare tipo vpnc per collegarmi ad un tunnel VPN ma sembra che non si connetta. Manca forse il default gateway? Manca la parte di configurazione di ppp?

[root@cellopc ~]# vpnc
vpnc: connecting to port 62465: Network is unreachable

Io ho configurato Wvdial con queste impostazioni:

[root@cellopc ~]# cat /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyUSB2
ISDN = off
Modem Type = Analog Modem
Baud = 460800
Init = ATX3
Init2 = AT&F Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = at+cgdcont=1,"IP","ibox.tim.it"
Phone = *99#
Dial Attempts = 5
Dial Command = ATM1L3DT
Ask Password = off
Username = ''
Password = ''
Stupid Mode = on
Auto Reconnect = off
Check Def Route = off

[quote=cello86]
Lanciando wvdial sembra connettersi e l’interfaccia ppp compare in modo corretto.

[root@cellopc ~]# wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATX3
ATX3
OK
--> Sending: AT&F Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
AT&F Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: at+cgdcont=1,"IP","ibox.tim.it"
at+cgdcont=1,"IP","ibox.tim.it"
OK
--> Modem initialized.
--> Sending: ATM1L3DT*99#
--> Waiting for carrier.
ATM1L3DT*99#
CONNECT 7200000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Jan 11 15:03:25 2010
--> Pid of pppd: 2503
--> Using interface ppp0
--> Authentication (PAP) started
--> Authentication (PAP) successful
--> local  IP address 95.74.97.19
--> remote IP address 10.64.64.64
--> primary   DNS address 213.230.155.10
--> secondary DNS address 217.200.200.42
--> Script /etc/ppp/ip-up run successful
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect

[root@cellopc ~]# ip a
8: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp
inet 95.74.97.19 peer 10.64.64.64/32 scope global ppp0

Provo però a lanciare tipo vpnc per collegarmi ad un tunnel VPN ma sembra che non si connetta. Manca forse il default gateway? Manca la parte di configurazione di ppp?

[root@cellopc ~]# vpnc
vpnc: connecting to port 62465: Network is unreachable

Io ho configurato Wvdial con queste impostazioni:

[root@cellopc ~]# cat /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyUSB2
ISDN = off
Modem Type = Analog Modem
Baud = 460800
Init = ATX3
Init2 = AT&F Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = at+cgdcont=1,"IP","ibox.tim.it"
Phone = *99#
Dial Attempts = 5
Dial Command = ATM1L3DT
Ask Password = off
Username = ''
Password = ''
Stupid Mode = on
Auto Reconnect = off
Check Def Route = off
[/quote]

L’output di:

cat /etc/resolv.conf

Il mio resolv.conf non era popolato perché l’indirizzo del target del tunnel vpn era fissato nel mio hosts. Comunque ho riprovato il collegamento ed ora funziona in modo eccellente.
Ho messo due script per automatizzare la connessione :

[root@cellopc script]# cat disconnectAliceMobile.sh
#!/bin/bash

pkill -9 wvdial
pkill -9 ppp
[root@cellopc script]# cat connectAliceMobile.sh
#!/bin/bash

lsusb
modprobe usbserial vendor=0x19d2 product=0x0002
usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0002 -d 1
eject /dev/sr1
sleep 10
lsusb
wvdial
echo “nameserver 212.210.10.2” > /etc/resolv.conf

Credo che non serva altro sbaglio?

Secondo me dovrebbe andare li hai testati?

Testati e funzionano. Devo solo trovare un modo per conteggiare i KB in entrata e uscita dalla connessione ed ho sostituito completamente Alice_Mobile

http://www.fedoraonline.it/modules/newbb/viewtopic.php?post_id=101603#forumpost101603

[quote=palir1927]
http://www.fedoraonline.it/modules/newbb/viewtopic.php?post_id=101603#forumpost101603[/quote]

Avevo già letto qualche giorno fa il posto di questa utility ma durante il lancio del run_ntm.sh mi viene dato un segmentation fault e non riesco ad eseguire un debug sull’errore. Dal log non viene mostrato un bel niente.

se vuoi esiste una buona utility di sistema per monitorare il traffico: vnstat
da installare con yum.
leggi le pagine man per un uso più approfondito.