L'objectif est de connecter le portable (l'ordinateur) au mobile (le téléphone) via le cable USB et d'établir une connexion 3G chez BouygTel
Connexion 3G chez BouygTel
- établir la connexion en utilisant l'APN ebouygtel.com et le "n° de téléphone" *99#
- utiliser un proxy (sans doute http)
- 62.201.129.225 port 8080
- retrouver ces informations sur le site de BouygTel, ça doit bien être quelque part...
- le http a l'air de fonctionner, pas le https (en tout cas pour https://linuxfr.org/pda/ ; peut-être le certificat qui ne serait pas reconnu auprès du proxy ?)
- trouver à quel débit la connexion est établie
- faire quelques copies d'écran de ce qui apparaît sur le mobile (notamment l'indicateur 3G remplacé par logo connecté avec deux flèches l'une sur l'autre)
- réessayer avec gnome-ppp (basé sur wvdial a priori...) pour voir quels fichiers de conf' sont générés
- retrouver les liens intéressants
Informations sur le périphérique
Infos
- udevadm info -a -p /sys/class/tty/ttyACM0
- comgt reg
- comgt sig
Prints the signal strength.
- comgt info
Lists the datacard configuration.
- quelques commandes AT utiles (pas forcément toutes gérées par le mobile) http://www.developershome.com/sms/atCommandsIntro.asp
Modifications de /usr/lib/libDrakX/network/connection/cellular_card.pm
Quelques modifications :- ${self}->{access}{cid} = 1 ; # au lieu de 3
- suppression de "AT+CMEE=2", # dans les commandes envoyées au smartphone
Pour la 2ème ligne, d'après http://www.technologuepro.com/gsm/commande_at.htm cela correspond à la demande d'erreurs verbeuses
Liens
reprendre ceux de Blog20081130MobileNokia6210Navigator- http://linuxfr.org/forums/9/26845.html [fr] pour une clé 3G SFR mais bon, cite wvdial
- http://pagesperso-orange.fr/gja.frndz/ub1tulog/k800i/3G_K800i.htm [fr] connexion d'un K800 mais commandes pour diagnostiquer capacités du mobile connecté
- http://www.boro.fr/SonyEricssonK750i [fr] connexion d'un K750i par Tux
- http://www.commentcamarche.net/forum/affich-11895728-installation-sony-ericsson-md300-sous-ubuntu [fr] quelques commandes AT pour le mode HSDPA
- http://akemi.internux.ch/blog/post/54 [fr] faire fonctionner le modem et le GPS pour un x200t
Fichiers de configuration
J'ai effectué la connexion via le centre de contrôle Mandriva Linux, ce qui configure quelques scripts- reste à trouver l'explication des quelques différences avec la configuration par défaut
OK-AT-OK 'AT+CPIN?' -OK-AT-OK 'AT+CMEE=2' -OK-AT-OK 'AT+CGDCONT=3,"IP","ebouygtel.com"' +OK-AT-OK 'AT+CGDCONT=1,"IP","eBouygTel.com"' OK-AT-OK 'AT+CGATT?' -OK 'ATDT*99***3#' +OK 'ATM1L3DT*99#' TIMEOUT 120
- /etc/sysconfig/network-scripts/chat-ppp0
ABORT BUSY ABORT ERROR ABORT 'NO CARRIER' ABORT 'NO DIALTONE' ABORT 'Invalid Login' ABORT 'Login incorrect' ABORT VOICE ABORT 'NO ANSWER' ABORT DELAYED ABORT 'SIM PIN' '' ATZ OK-AT-OK 'AT+CPIN?' OK-AT-OK 'AT+CGDCONT=1,"IP","eBouygTel.com"' OK-AT-OK 'AT+CGATT?' OK 'ATM1L3DT*99#' TIMEOUT 120 CONNECT '' TIMEOUT 5 '~--' ''
- le script ci-dessus est appelé par /etc/ppp/peers/ppp0
noauth defaultroute usepeerdns noccp debug connect "/usr/sbin/chat -v -f /etc/sysconfig/network-scripts/chat-ppp0"
Résultats de la connexion
Au branchement du mobile en USBDec 15 00:54:58 benLapix kernel: usb 1-3: new high speed USB device using ehci_hcd and address 3 Dec 15 00:54:58 benLapix kernel: usb 1-3: configuration #1 chosen from 1 choice Dec 15 00:54:58 benLapix kernel: usb 1-3: New USB device found, idVendor=0421, idProduct=0099 Dec 15 00:54:58 benLapix kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Dec 15 00:54:58 benLapix kernel: usb 1-3: Product: Nokia 6210 Navigator Dec 15 00:54:58 benLapix kernel: usb 1-3: Manufacturer: Nokia Dec 15 00:54:58 benLapix kernel: usb 1-3: SerialNumber: 352914023690700 Dec 15 00:54:59 benLapix kernel: cdc_acm 1-3:1.0: ttyACM0: USB ACM device Dec 15 00:54:59 benLapix kernel: usbcore: registered new interface driver cdc_acm Dec 15 00:54:59 benLapix kernel: cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters Dec 15 00:54:59 benLapix kernel: usbcore: registered new interface driver cdc_ether Dec 15 00:54:59 benLapix kernel: usb 1-3: bad CDC descriptors Dec 15 00:54:59 benLapix kernel: usbcore: registered new interface driver rndis_host Dec 15 00:54:59 benLapix kernel: usb 1-3: bad CDC descriptors Dec 15 00:54:59 benLapix kernel: usbcore: registered new interface driver rndis_wlan
De la connexion à la déconnexion, après configuration effectuée comme ci-dessus
- ifup ppp0
- ifdown ppp0 pour arrêter
Dec 15 00:57:52 benLapix pppd[626]: pppd 2.4.4 started by root, uid 0 Dec 15 00:57:52 benLapix ifup-ppp: pppd started for ppp0 on /dev/ttyACM0 at 115200 Dec 15 00:57:53 benLapix chat[646]: abort on (BUSY) Dec 15 00:57:53 benLapix chat[646]: abort on (ERROR) Dec 15 00:57:53 benLapix chat[646]: abort on (NO CARRIER) Dec 15 00:57:53 benLapix chat[646]: abort on (NO DIALTONE) Dec 15 00:57:53 benLapix chat[646]: abort on (Invalid Login) Dec 15 00:57:53 benLapix chat[646]: abort on (Login incorrect) Dec 15 00:57:53 benLapix chat[646]: abort on (VOICE) Dec 15 00:57:53 benLapix chat[646]: abort on (NO ANSWER) Dec 15 00:57:53 benLapix chat[646]: abort on (DELAYED) Dec 15 00:57:53 benLapix chat[646]: abort on (SIM PIN) Dec 15 00:57:53 benLapix chat[646]: send (ATZ^M) Dec 15 00:57:53 benLapix chat[646]: expect (OK) Dec 15 00:57:53 benLapix chat[646]: ATZ^M^M Dec 15 00:57:53 benLapix chat[646]: OK Dec 15 00:57:53 benLapix chat[646]: -- got it Dec 15 00:57:53 benLapix chat[646]: send (AT+CPIN?^M) Dec 15 00:57:53 benLapix chat[646]: expect (OK) Dec 15 00:57:53 benLapix chat[646]: ^M Dec 15 00:57:53 benLapix chat[646]: AT+CPIN?^M^M Dec 15 00:57:53 benLapix chat[646]: +CPIN: READY^M Dec 15 00:57:53 benLapix chat[646]: ^M Dec 15 00:57:53 benLapix chat[646]: OK Dec 15 00:57:53 benLapix chat[646]: -- got it Dec 15 00:57:53 benLapix chat[646]: send (AT+CGDCONT=1,"IP","eBouygTel.com"^M) Dec 15 00:57:54 benLapix chat[646]: expect (OK) Dec 15 00:57:54 benLapix chat[646]: ^M Dec 15 00:57:54 benLapix chat[646]: AT+CGDCONT=1,"IP","eBouygTel.com"^M^M Dec 15 00:57:54 benLapix chat[646]: OK Dec 15 00:57:54 benLapix chat[646]: -- got it Dec 15 00:57:54 benLapix chat[646]: send (AT+CGATT?^M) Dec 15 00:57:54 benLapix chat[646]: expect (OK) Dec 15 00:57:54 benLapix chat[646]: ^M Dec 15 00:57:54 benLapix chat[646]: AT+CGATT?^M^M Dec 15 00:57:54 benLapix chat[646]: +CGATT: 0^M Dec 15 00:57:54 benLapix chat[646]: ^M Dec 15 00:57:54 benLapix chat[646]: OK Dec 15 00:57:54 benLapix chat[646]: -- got it Dec 15 00:57:54 benLapix chat[646]: send (ATM1L3DT*99#^M) Dec 15 00:57:54 benLapix chat[646]: timeout set to 120 seconds Dec 15 00:57:54 benLapix chat[646]: expect (CONNECT) Dec 15 00:57:54 benLapix chat[646]: ^M Dec 15 00:57:55 benLapix chat[646]: ATM1L3DT*99#^M^M Dec 15 00:57:55 benLapix chat[646]: CONNECT Dec 15 00:57:55 benLapix chat[646]: -- got it Dec 15 00:57:55 benLapix chat[646]: send (^M) Dec 15 00:57:55 benLapix chat[646]: timeout set to 5 seconds Dec 15 00:57:55 benLapix chat[646]: expect (~) Dec 15 00:57:55 benLapix chat[646]: ^M Dec 15 00:57:55 benLapix chat[646]: ~ Dec 15 00:57:55 benLapix chat[646]: -- got it Dec 15 00:57:55 benLapix chat[646]: send (^M) Dec 15 00:57:55 benLapix pppd[626]: Serial connection established. Dec 15 00:57:55 benLapix pppd[626]: Using interface ppp0 Dec 15 00:57:55 benLapix pppd[626]: Connect: ppp0 <--> /dev/ttyACM0 Dec 15 00:57:57 benLapix pppd[626]: local IP address 10.160.138.24 Dec 15 00:57:57 benLapix pppd[626]: remote IP address 10.6.6.6 Dec 15 00:57:57 benLapix pppd[626]: primary DNS address 62.201.129.99 Dec 15 00:57:57 benLapix pppd[626]: secondary DNS address 62.201.159.99 Dec 15 00:57:57 benLapix NET[754]: /etc/sysconfig/network-scripts/ifup-post : updated /etc/resolv.conf [...] Dec 15 01:14:18 benLapix pppd[626]: Terminating on signal 15 Dec 15 01:14:18 benLapix pppd[626]: Connect time 16.4 minutes. Dec 15 01:14:18 benLapix pppd[626]: Sent 156763 bytes, received 478750 bytes. Dec 15 01:14:18 benLapix pppd[626]: Connection terminated. Dec 15 01:14:18 benLapix pppd[626]: Exit.
Parfois ppp donne des paramètres différents concernant la compression
Dec 26 23:10:28 benLapix kernel: PPP MPPE Compression module registered Dec 26 23:10:28 benLapix kernel: PPP BSD Compression module registered Dec 26 23:10:28 benLapix kernel: PPP Deflate Compression module registered
avec d'autres essais, j'ai eu quelques messages d'erreur jusqu'à trouver les bons éléments pour établir la connexion
Dec 14 04:03:14 benLapix chat[2496]: AT+CMEE=2^M^M Dec 14 04:03:14 benLapix chat[2496]: ERROR Dec 14 04:03:14 benLapix chat[2496]: -- failed Dec 14 04:03:14 benLapix chat[2496]: Failed (ERROR) Dec 14 04:03:14 benLapix pppd[2475]: Connect script failed Dec 14 04:03:15 benLapix pppd[2475]: Exit.
- en enlevant CMEE :
Dec 14 04:09:14 benLapix chat[3495]: ATDT*99***3#^M^M Dec 14 04:09:14 benLapix chat[3495]: ERROR Dec 14 04:09:14 benLapix chat[3495]: -- failed Dec 14 04:09:14 benLapix chat[3495]: Failed (ERROR) Dec 14 04:09:14 benLapix pppd[3468]: Connect script failed Dec 14 04:09:15 benLapix pppd[3468]: Exit.
- en enlevant d'autres petites choses (je ne sais plus lesquelles)
Dec 14 04:33:23 benLapix chat[18638]: send (ATDT*99***1#^M) Dec 14 04:33:23 benLapix chat[18638]: timeout set to 120 seconds Dec 14 04:33:23 benLapix chat[18638]: expect (CONNECT) Dec 14 04:33:23 benLapix chat[18638]: ^M Dec 14 04:33:25 benLapix chat[18638]: ATDT*99***1#^M^M Dec 14 04:33:25 benLapix chat[18638]: CONNECT Dec 14 04:33:25 benLapix chat[18638]: -- got it Dec 14 04:33:25 benLapix chat[18638]: send (^M) Dec 14 04:33:25 benLapix chat[18638]: timeout set to 5 seconds Dec 14 04:33:25 benLapix chat[18638]: expect (~) Dec 14 04:33:25 benLapix chat[18638]: ^M Dec 14 04:33:25 benLapix chat[18638]: ~ Dec 14 04:33:25 benLapix chat[18638]: -- got it Dec 14 04:33:25 benLapix chat[18638]: send (^M) Dec 14 04:33:25 benLapix pppd[18618]: Serial connection established. Dec 14 04:33:25 benLapix pppd[18618]: Using interface ppp0 Dec 14 04:33:25 benLapix pppd[18618]: Connect: ppp0 <--> /dev/ttyACM0 Dec 14 04:33:25 benLapix pppd[18618]: LCP terminated by peer Dec 14 04:33:28 benLapix pppd[18618]: Connection terminated. Dec 14 04:33:29 benLapix pppd[18618]: Modem hangup Dec 14 04:33:29 benLapix pppd[18618]: Exit.