Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
utilisateurs:harlock1 [Le 07/11/2006, 10:50] harlock1 |
— (Version actuelle) | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Configuration d'une connection internet via un téléphone portable bluetooth ====== | ||
- | |||
- | |||
- | ===== Introduction ===== | ||
- | |||
- | |||
- | L'objectif est d'accéder à internet avec un ordinateur portable Sony Vaio VGN-TX2HP, en utilisant comme modem un téléphone portable Sony Ericsson T630, via une liaison bluetooth. Le réseau est SFR GPRS sur l'île de la Réunion. | ||
- | |||
- | ===== Prè-requis ===== | ||
- | |||
- | |||
- | Paquetages installés : | ||
- | \\ | ||
- | gnome-bluetooth - GNOME Bluetooth tools\\ | ||
- | grml-btnet - Programs to quickly build a bluetooth network\\ | ||
- | obexftp - file transfer utility for devices that use the OBEX protocol\\ | ||
- | obexserver - Receive files with OBEX protocol\\ | ||
- | python2.4-libbtctl - Python bindings for libbtctl Bluetooth library\\ | ||
- | bluez-pcmcia-support - PCMCIA support files for BlueZ 2.0 Bluetooth tools\\ | ||
- | bluez-pin - Bluetooth PIN helper with D-BUS support\\ | ||
- | bluez-utils - Bluetooth tools and daemons\\ | ||
- | libbluetooth1 - Library to use the BlueZ Linux Bluetooth stack\\ | ||
- | libbtctl2 - GObject Bluetooth library\\ | ||
- | libgnomebt0 - GNOME Bluetooth library\\ | ||
- | gnome-ppp - modem internet connection tool for GNOME\\ | ||
- | |||
- | |||
- | Ces programmes ne sont peut-être pas tous indispensables pour ce que je souhaite faire, mais c'est ce qui est actuellement installé sur mon poste, et comme ça marche, je ne touche plus à rien :-) | ||
- | |||
- | ===== Configuration ===== | ||
- | |||
- | |||
- | ==== • Rechercher le code pin de l'ordinateur (en général c'est 1234) : ==== | ||
- | |||
- | <code> | ||
- | $ sudo cat /etc/bluetooth/pin | ||
- | Password: ***** | ||
- | 1234 | ||
- | </code> | ||
- | |||
- | ==== • Apparier le téléphone et le PC à partir du téléphone. ==== | ||
- | |||
- | |||
- | ==== • Rechercher l'adresse bluetooth du téléphone sur le PC : ==== | ||
- | |||
- | <code> | ||
- | $ hcitool scan | ||
- | Scanning ... | ||
- | 00:0E:07:30:6B:78 T630 | ||
- | </code> | ||
- | |||
- | ==== • sdptool donne la liste des services d'un périphérique bluetooth donné. ==== | ||
- | |||
- | Rechercher dans la liste qui apparaît le service "Dial-up Networking" : | ||
- | |||
- | <code> | ||
- | $ sdptool browse 00:0e:07:30:6b:78 | ||
- | Browsing 00:0E:07:30:6B:78 ... | ||
- | Service Name: Dial-up Networking | ||
- | Service RecHandle: 0x10000 | ||
- | Service Class ID List: | ||
- | "Dialup Networking" (0x1103) | ||
- | "Generic Networking" (0x1201) | ||
- | Protocol Descriptor List: | ||
- | "L2CAP" (0x0100) | ||
- | "RFCOMM" (0x0003) | ||
- | Channel: 1 | ||
- | Profile Descriptor List: | ||
- | "Dialup Networking" (0x1103) | ||
- | Version: 0x0100 | ||
- | </code> | ||
- | Noter le canal (ici 1) | ||
- | |||
- | ==== • Dans /etc/ppp/options, désactiver lcp-echo-interval et lcp-echo-failure en ajoutant un # en début de ligne. ==== | ||
- | |||
- | A défaut, la connection risque d'être instable. | ||
- | |||
- | <code> | ||
- | # If this option is given, pppd will send an LCP echo-request frame to the | ||
- | # peer every n seconds. Normally the peer should respond to the echo-request | ||
- | # by sending an echo-reply. This option can be used with the | ||
- | # lcp-echo-failure option to detect that the peer is no longer connected. | ||
- | #lcp-echo-interval 30 | ||
- | |||
- | # If this option is given, pppd will presume the peer to be dead if n | ||
- | # LCP echo-requests are sent without receiving a valid LCP echo-reply. | ||
- | # If this happens, pppd will terminate the connection. Use of this | ||
- | # option requires a non-zero value for the lcp-echo-interval parameter. | ||
- | # This option can be used to enable pppd to terminate after the physical | ||
- | # connection has been broken (e.g., the modem has hung up) in | ||
- | # situations where no hardware modem control lines are available. | ||
- | #lcp-echo-failure 4 | ||
- | </code> | ||
- | |||
- | ===== Utilisation ===== | ||
- | |||
- | |||
- | ==== • Créer un périphérique correspondant au téléphone avec rfcomm : ==== | ||
- | |||
- | La syntaxe est : **connect** <n°périph. à créer> [addresse du périph.bluetooth] [canal] | ||
- | |||
- | <code> | ||
- | $ rfcomm connect 0 00:0E:07:30:6B:78 1 | ||
- | Connected /dev/rfcomm0 to 00:0E:07:30:6B:78 on channel 1 | ||
- | Press CTRL-C for hangup | ||
- | </code> | ||
- | |||
- | En cas d'erreur, remplacer rfcomm connect 0 par rfcomm connect 1. **rfcomm** crée le périphérique /dev/rfcomm0 (ou 1), qui devra être mentionné dans la configuration du modem. Ne pas fermer la fenêtre de console, ceci couperait la connection. | ||
- | |||
- | |||
- | ==== • Configuration de gnome-ppp : ==== | ||
- | |||
- | |||
- | Voir avec votre opérateur mobile pour les identifiants et numéro de téléphone : | ||
- | |||
- | gppp.png | ||
- | |||
- | Le mot de passe est aussi websfr (pour une connection GPRS, les identifiants ne sont pas utilisés). | ||
- | |||
- | gppp2.png | ||
- | |||
- | Pour une connection GPRS, les chaines d'initialisation peuvent être supprimées. La connection sera plus rapide. | ||
- | |||