Option USB Icon 7.2 under Linux

Introduction

J'ai créé cette page car les instructions très complètes de la page Carte Orange Fusion+ GPRS / EDGE / UMTS / HDSPA / WIFI sous Debian présentaient malgré tout une certain nombre d'erreurs lesquelles m'ont fait perdre pas mal de temps. Voici donc une solution qui fonctionne (yes it's work).

Méthode

Le matériel

Tout d'abord, vérifions que nous parlons de la même chose : voilà mon modem GlobeSurfer i CON 7.2 vendu par Orange (France Telecom)

Le device

Ce modem "Option USB ICON 7.2" est un device USB détecté avec l'identifiant 0x0af0/0x6901 :

usb.c: USB device 2 (vend/prod 0xaf0/0x6901) is not claimed by any active driver.
Le driver Linux qui s'y applique est le driver usbserial. Il est nécessaire de forcer le vendor et le product id pour que les tty soient détectés : insmod usbserial vendor=0x0af0 product=0x6901. Pour simplifier le chargement, voilà les adaptations de mon fichier /etc/modules.conf :
(...)
alias icon usbserial
options icon vendor=0xaf0 product=0x6901 -o icon
(...)
Pour récapituler, sans les identifiants correct, aucun tty n'est détecté et le résultat d'un dmesg est le suivant :
ben@loki:~$ dmesg | tail
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
Avec un chargement correct du module (modprobe icon), voilà les informations vues :
ben@loki:~$ dmesg | tail
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB2 (or usb/tts/2 for devfs)
usbserial.c: USB Serial Driver core v1.4

ben@loki:~$ lsmod | head -2
Module                  Size  Used by    Tainted: PF 
icon                   20444   0  (unused)

Informations relatives au matériel

Il est ensuite possible d'interroger le périphérique à l'aide de la commande comgt (anciennement gcom) disponible sur le site http://www.pharscape.org/
Pour obtenir les sources de Pharscape ou de Sourceforge
Ci-après, le résultat de la commande comgt info juste après le chargement du module. Attention, si le module est déjà utilisé par une application, le device /dev/ttyUSB2 ne sera pas disponible pour obtenir les informations.

ben@loki:~$ sudo comgt info
##### Wireless WAN Modem Configuration #####
Product text:
====

Manufacturer: Option N.V.
Model: GTM378
Revision: 2.3.0Hd (Date: Jun 11 2007, Time: 13:48:00)
OK
====
Manufacturer:           Option N.V.
IMEI and Serial Number: 3523xxxxxxx,SExxxxxxx
Manufacturer's Revision: 
2.3.0Hd (Date: Jun 11 2007, Time: 13:48:0
Hardware Revision:      3.1
Network Locked:         1
Customisation:          DEPRICATED
Band settings:          Europe 900/1800MHz (4)
APN:                    1,"IP","internet-entreprise","0.0.0.0",0,0
##### END #####

Code PIN

L'outil comgt décrit précédemment permet de spécifier le code PIN:

ben@loki:~$ sudo comgt
Trying list of devices

Enter PIN number: xxxx
Waiting for Registration..(120 sec max)...
Registered on Home network: "Orange F",2
Signal Quality: 22,99
Plus bêtement, il suffit d'envoyer le code AT+CPIN="xxxx" au tty. Cela pourra être utile dans le script de Chat. Si l'opération est valide, la commande comgt retourne le message ci-après :
ben@loki:~$ sudo comgt
Trying list of devices
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "Orange F",2
Signal Quality: 23,99

PPP

Pour finir, étant donné qu'une interface tty est disponible, il est désormais possible d'activer un lien PPP sur cette interface. Je laisse à tous le choix des outils (kppp, ppp-config, ...) et je décris ci-dessous les commandes pour pppd avec chat ainsi que les fichiers de configuration sur une Debian (eh oui! désolé!).

    Il faut retenir les paramètres essentiels ci-après :
  • le login est orange
  • le mot de passe est orange
  • le numéro de téléphone est *99# (étoile,neuf,neuf,dièze)
  • l'APN dans mon cas (connexion internet illimitée) est internet-enterprise. Ce n'est pas entreprise-internet
Voilà donc la ligne magique pour faire monter la ligne avec pppd (xxxx représente le code PIN):
pppd /dev/ttyUSB2 115200 hide-password noauth \
    connect "/usr/sbin/chat -t 5 -v -s ABORT BUSY ABORT 'NO CARRIER' \
             ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIALTONE' '' \
             ATZ OK 'AT+CPIN=\"xxxx\"' OK-AT-OK 'ATD*99#' ; sleep 5" \
            debug noipdefault nodeflate noccp \
            user orange password orange usepeerdns nodetach \
            defaultroute noproxyarp
Voici les fichiers chat et pppd commentés associés à ce fonctionnement dérivés de la configuration de Charles-Antoine Guillat-Guignard.
ben@loki:~$ cat /etc/chatscripts/OrangeBE
# begin of /etc/chatscripts/OrangeBE script
# abortstring
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIALTONE' ABORT 'NO ANSWER' ABORT DELAYED
# modeminit
'' ATZ
# Force Code SIM (be careful, not protected with bad rights)
OK-AT-OK 'AT+CPIN="xxxx"'
# Setup APN code if needed (default is ok)
# BE CAREFUL for APN, should be internet-enterprise
# OK-AT-OK 'AT+CGDCONT=1,"IP","internet-entreprise"'
# Setup +CGEQREG => optional
# OK-AT-OK 'AT+CGEQREQ=3,3,64,384,0,0,2,0,"0E0","0E0",3,0,0'
# Attached to Orange network, will return 1
# OK-AT-OK 'AT+CGATT?' => optional
# ispnumber: *99#
OK-AT-OK 'ATD*99#'
# end of /etc/chatscripts/OrangeBE script

ben@loki:~$ cat /etc/pppd/peers/OrangeBE
# begin of /etc/pppd/peers/OrangeBE
hide-password 
noauth
# execute previous chat script with timeout fixed to 5 seconds
connect "/usr/sbin/chat -t 5 -v -f /etc/chatscripts/OrangeBE"
debug
# ICON modem tty
/dev/ttyUSB2
115200
# want to add the default route ?? and DNS servers
defaultroute
usepeerdns
noipdefault 
# deflate not work
nodeflate
noccp
# user/password : orange/orange
user "orange"
password "orange"
# end of /etc/pppd/peers/OrangeBE
La prochaine étape consiste à démarrer le serveur pppd. Sous DEBIAN, directement avec la commande pon OrangeBE.