Service bluetooth et ppp

Bonjour,
J’ai besoin de votre aide !
Jusqu’à présent je me connectais avec un téléphone Nokia au travers de l’interface USB.
Le téléphone est reconnu (ttyACM0) la connection avec gnome-ppp se fait sans problèmes.
Mais cela demande mon intervention. Sélectionner le mode “nokia pc-suite” sur le téléphone entre autre, et lancer la connexion sur l’ordinateur…

Je souhaite simplifier tout ça et me connecter à Internet via le bluetooth automatiquement au démarrage (automatique) de l’ordinateur.

L’avantage, c’est qu’il n’y a rien à faire sur le téléphone, donc en principe, aucune intervention pour se connecter à Internet.
Ca fonctionne mais je suis devant un problème que je n’arrive pas à résoudre…

Le service bluetooth démarre après la configuration du réseau (je pense) car j’ai ça au démarrage :

Configuring Network Interfaces... /usr/sbin/pppd: In file /etc/ppp/peers/ppp0: unrecognized option 'dev/rfcomm0' Failed to bring up ppp0
Par contre au moment ou gdm démarre la connexion bluetooth se met en route et l’ordinateur se connecte bien à Internet (tout seul).
Donc, pas de problème bluetooth ni de connexion automatique, juste que ça se met en route trop tard… (et donc certains services primordiaux - squid3, snort… ne fonctionnent pas)

Pouvez-vous me dire comment je pourrais démarrer les services bluetooth avant le réseau ?
Je pense (?) que ce serait dans le rc mais je n’ose pas y toucher sans votre avis…

Merci d’avance… :smiley:

(Mon serveur : 2.6.26-2-vserver-686-bigmem Lenny à jour.)

J’y arrive pas tout seul… :cry:

En copiant /etc/rc.2d/@S99bluetooth dans /etc/rcS.d/@S34bluetooth les services bluetooth se lancent bien avant le réseau…
Mais la connexion Internet ne se lance pas…

Et j’ai peu de mettre le bor… si je tripote trop l’ordre dans /etc/rc…
Je n’arrive pas à trouver ce qui lance la connexion… Je suppose que c’est ppp ? Mais comment le lancer au boot ?

Un petit coup de main serait le bienvenu :wink:

done nous le liste des services dans le rc2 et rc3

Salut,
Et merci…

laurent@spider:/etc/rc2.d$ ls -l total 4 -rw-r--r-- 1 root root 556 aoû 12 2008 README lrwxrwxrwx 1 root root 27 jui 10 17:12 S10inetutils-syslogd -> ../init.d/inetutils-syslogd lrwxrwxrwx 1 root root 17 jui 8 15:54 S10rsyslog -> ../init.d/rsyslog lrwxrwxrwx 1 root root 19 jan 21 2009 S10syslog-ng -> ../init.d/syslog-ng lrwxrwxrwx 1 root root 15 jan 21 2009 S12acpid -> ../init.d/acpid lrwxrwxrwx 1 root root 14 jan 21 2009 S12dbus -> ../init.d/dbus lrwxrwxrwx 1 root root 22 mar 11 09:07 S14avahi-daemon -> ../init.d/avahi-daemon lrwxrwxrwx 1 root root 17 jui 3 16:33 S16openvpn -> ../init.d/openvpn lrwxrwxrwx 1 root root 13 jun 30 15:28 S16ssh -> ../init.d/ssh lrwxrwxrwx 1 root root 23 jan 21 2009 S17mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm lrwxrwxrwx 1 root root 19 jan 21 2009 S18mysql-ndb -> ../init.d/mysql-ndb lrwxrwxrwx 1 root root 19 jui 1 08:31 S19adtxenlvm -> ../init.d/adtxenlvm lrwxrwxrwx 1 root root 16 jan 21 2009 S19amavis -> ../init.d/amavis lrwxrwxrwx 1 root root 15 jan 21 2009 S19mysql -> ../init.d/mysql lrwxrwxrwx 1 root root 22 jan 21 2009 S19spamassassin -> ../init.d/spamassassin lrwxrwxrwx 1 root root 18 jui 1 09:13 S20backuppc -> ../init.d/backuppc lrwxrwxrwx 1 root root 23 jan 21 2009 S20clamav-daemon -> ../init.d/clamav-daemon lrwxrwxrwx 1 root root 26 jan 21 2009 S20clamav-freshclam -> ../init.d/clamav-freshclam lrwxrwxrwx 1 root root 14 jan 21 2009 S20cups -> ../init.d/cups lrwxrwxrwx 1 root root 14 jan 21 2009 S20dhcp -> ../init.d/dhcp lrwxrwxrwx 1 root root 17 jui 8 15:50 S20dsyslog -> ../init.d/dsyslog lrwxrwxrwx 1 root root 18 aoû 28 09:16 S20ejabberd -> ../init.d/ejabberd lrwxrwxrwx 1 root root 15 jan 21 2009 S20exim4 -> ../init.d/exim4 lrwxrwxrwx 1 root root 20 jui 1 15:04 S20fancontrol -> ../init.d/fancontrol lrwxrwxrwx 1 root root 17 jui 1 15:04 S20hddtemp -> ../init.d/hddtemp lrwxrwxrwx 1 root root 20 jan 21 2009 S20nfs-common -> ../init.d/nfs-common lrwxrwxrwx 1 root root 27 aoû 14 08:27 S20nfs-kernel-server -> ../init.d/nfs-kernel-server lrwxrwxrwx 1 root root 23 jan 21 2009 S20nvidia-kernel -> ../init.d/nvidia-kernel lrwxrwxrwx 1 root root 23 jan 21 2009 S20openbsd-inetd -> ../init.d/openbsd-inetd lrwxrwxrwx 1 root root 17 jui 4 16:17 S20pipsecd -> ../init.d/pipsecd lrwxrwxrwx 1 root root 25 jan 21 2009 S20policycoreutils -> ../init.d/policycoreutils lrwxrwxrwx 1 root root 17 jan 21 2009 S20postfix -> ../init.d/postfix lrwxrwxrwx 1 root root 14 jui 10 16:31 S20psad -> ../init.d/psad lrwxrwxrwx 1 root root 15 mai 21 17:44 S20rsync -> ../init.d/rsync lrwxrwxrwx 1 root root 15 mar 15 11:50 S20samba -> ../init.d/samba lrwxrwxrwx 1 root root 23 jui 4 15:54 S20smartmontools -> ../init.d/smartmontools lrwxrwxrwx 1 root root 15 jui 10 15:35 S20snort -> ../init.d/snort lrwxrwxrwx 1 root root 14 mai 17 17:40 S20upsd -> ../init.d/upsd lrwxrwxrwx 1 root root 16 jui 5 18:08 S20xinetd -> ../init.d/xinetd lrwxrwxrwx 1 root root 17 jan 21 2009 S24dovecot -> ../init.d/dovecot lrwxrwxrwx 1 root root 13 jan 21 2009 S24hal -> ../init.d/hal lrwxrwxrwx 1 root root 25 jan 21 2009 S25nfs-user-server -> ../init.d/nfs-user-server lrwxrwxrwx 1 root root 13 jan 21 2009 S30gdm -> ../init.d/gdm lrwxrwxrwx 1 root root 16 jan 21 2009 S30squid3 -> ../init.d/squid3 lrwxrwxrwx 1 root root 31 jan 21 2009 S30system-tools-backends -> ../init.d/system-tools-backends lrwxrwxrwx 1 root root 22 jan 21 2009 S40dhcp3-server -> ../init.d/dhcp3-server lrwxrwxrwx 1 root root 20 mar 10 11:47 S50alsa-utils -> ../init.d/alsa-utils lrwxrwxrwx 1 root root 13 aoû 25 09:49 S50ntp -> ../init.d/ntp lrwxrwxrwx 1 root root 17 aoû 13 17:02 S50proftpd -> ../init.d/proftpd lrwxrwxrwx 1 root root 17 jan 21 2009 S89anacron -> ../init.d/anacron lrwxrwxrwx 1 root root 13 jan 21 2009 S89atd -> ../init.d/atd lrwxrwxrwx 1 root root 14 jan 21 2009 S89cron -> ../init.d/cron lrwxrwxrwx 1 root root 17 jan 21 2009 S91apache2 -> ../init.d/apache2 lrwxrwxrwx 1 root root 19 jan 21 2009 S98imapproxy -> ../init.d/imapproxy lrwxrwxrwx 1 root root 21 jui 19 10:44 S99bluetooth -> /etc/init.d/bluetooth lrwxrwxrwx 1 root root 19 jan 21 2009 S99fetchmail -> ../init.d/fetchmail lrwxrwxrwx 1 root root 15 mai 18 08:54 S99monit -> ../init.d/monit lrwxrwxrwx 1 root root 22 jui 19 11:13 S99networking -> /etc/init.d/networking lrwxrwxrwx 1 root root 18 jan 21 2009 S99rc.local -> ../init.d/rc.local lrwxrwxrwx 1 root root 19 jan 21 2009 S99rmnologin -> ../init.d/rmnologin lrwxrwxrwx 1 root root 16 mar 16 10:44 S99rups -> /etc/init.d/rups lrwxrwxrwx 1 root root 23 jan 21 2009 S99stop-bootlogd -> ../init.d/stop-bootlogd

laurent@spider:/etc/rc3.d$ ls -l total 4 -rw-r--r-- 1 root root 556 aoû 12 2008 README lrwxrwxrwx 1 root root 27 jui 10 17:12 S10inetutils-syslogd -> ../init.d/inetutils-syslogd lrwxrwxrwx 1 root root 17 jui 8 15:54 S10rsyslog -> ../init.d/rsyslog lrwxrwxrwx 1 root root 19 jan 21 2009 S10syslog-ng -> ../init.d/syslog-ng lrwxrwxrwx 1 root root 15 jan 21 2009 S12acpid -> ../init.d/acpid lrwxrwxrwx 1 root root 14 jan 21 2009 S12dbus -> ../init.d/dbus lrwxrwxrwx 1 root root 22 mar 11 09:07 S14avahi-daemon -> ../init.d/avahi-daemon lrwxrwxrwx 1 root root 17 jui 3 16:33 S16openvpn -> ../init.d/openvpn lrwxrwxrwx 1 root root 13 jun 30 15:28 S16ssh -> ../init.d/ssh lrwxrwxrwx 1 root root 23 jan 21 2009 S17mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm lrwxrwxrwx 1 root root 19 jan 21 2009 S18mysql-ndb -> ../init.d/mysql-ndb lrwxrwxrwx 1 root root 19 jui 1 08:31 S19adtxenlvm -> ../init.d/adtxenlvm lrwxrwxrwx 1 root root 16 jan 21 2009 S19amavis -> ../init.d/amavis lrwxrwxrwx 1 root root 15 jan 21 2009 S19mysql -> ../init.d/mysql lrwxrwxrwx 1 root root 22 jan 21 2009 S19spamassassin -> ../init.d/spamassassin lrwxrwxrwx 1 root root 18 jui 1 09:13 S20backuppc -> ../init.d/backuppc lrwxrwxrwx 1 root root 23 jan 21 2009 S20clamav-daemon -> ../init.d/clamav-daemon lrwxrwxrwx 1 root root 26 jan 21 2009 S20clamav-freshclam -> ../init.d/clamav-freshclam lrwxrwxrwx 1 root root 14 jan 21 2009 S20cups -> ../init.d/cups lrwxrwxrwx 1 root root 14 jan 21 2009 S20dhcp -> ../init.d/dhcp lrwxrwxrwx 1 root root 17 jui 8 15:50 S20dsyslog -> ../init.d/dsyslog lrwxrwxrwx 1 root root 18 aoû 28 09:16 S20ejabberd -> ../init.d/ejabberd lrwxrwxrwx 1 root root 15 jan 21 2009 S20exim4 -> ../init.d/exim4 lrwxrwxrwx 1 root root 20 jui 1 15:04 S20fancontrol -> ../init.d/fancontrol lrwxrwxrwx 1 root root 17 jui 1 15:04 S20hddtemp -> ../init.d/hddtemp lrwxrwxrwx 1 root root 20 jan 21 2009 S20nfs-common -> ../init.d/nfs-common lrwxrwxrwx 1 root root 27 aoû 14 08:27 S20nfs-kernel-server -> ../init.d/nfs-kernel-server lrwxrwxrwx 1 root root 23 jan 21 2009 S20nvidia-kernel -> ../init.d/nvidia-kernel lrwxrwxrwx 1 root root 23 jan 21 2009 S20openbsd-inetd -> ../init.d/openbsd-inetd lrwxrwxrwx 1 root root 17 jui 4 16:17 S20pipsecd -> ../init.d/pipsecd lrwxrwxrwx 1 root root 25 jan 21 2009 S20policycoreutils -> ../init.d/policycoreutils lrwxrwxrwx 1 root root 17 jan 21 2009 S20postfix -> ../init.d/postfix lrwxrwxrwx 1 root root 14 jui 10 16:31 S20psad -> ../init.d/psad lrwxrwxrwx 1 root root 15 mai 21 17:44 S20rsync -> ../init.d/rsync lrwxrwxrwx 1 root root 15 mar 15 11:50 S20samba -> ../init.d/samba lrwxrwxrwx 1 root root 23 jui 4 15:54 S20smartmontools -> ../init.d/smartmontools lrwxrwxrwx 1 root root 15 jui 10 15:35 S20snort -> ../init.d/snort lrwxrwxrwx 1 root root 14 mai 17 17:40 S20upsd -> ../init.d/upsd lrwxrwxrwx 1 root root 16 jui 5 18:08 S20xinetd -> ../init.d/xinetd lrwxrwxrwx 1 root root 13 jan 24 2009 S23ntp -> ../init.d/ntp lrwxrwxrwx 1 root root 17 jan 21 2009 S24dovecot -> ../init.d/dovecot lrwxrwxrwx 1 root root 13 jan 21 2009 S24hal -> ../init.d/hal lrwxrwxrwx 1 root root 25 jan 21 2009 S25nfs-user-server -> ../init.d/nfs-user-server lrwxrwxrwx 1 root root 13 jan 21 2009 S30gdm -> ../init.d/gdm lrwxrwxrwx 1 root root 16 jan 21 2009 S30squid3 -> ../init.d/squid3 lrwxrwxrwx 1 root root 31 jan 21 2009 S30system-tools-backends -> ../init.d/system-tools-backends lrwxrwxrwx 1 root root 22 jan 21 2009 S40dhcp3-server -> ../init.d/dhcp3-server lrwxrwxrwx 1 root root 17 aoû 13 17:02 S50proftpd -> ../init.d/proftpd lrwxrwxrwx 1 root root 17 jan 21 2009 S89anacron -> ../init.d/anacron lrwxrwxrwx 1 root root 13 jan 21 2009 S89atd -> ../init.d/atd lrwxrwxrwx 1 root root 14 jan 21 2009 S89cron -> ../init.d/cron lrwxrwxrwx 1 root root 17 jan 21 2009 S91apache2 -> ../init.d/apache2 lrwxrwxrwx 1 root root 19 jan 21 2009 S98imapproxy -> ../init.d/imapproxy lrwxrwxrwx 1 root root 21 jui 19 10:44 S99bluetooth -> /etc/init.d/bluetooth lrwxrwxrwx 1 root root 19 jan 21 2009 S99fetchmail -> ../init.d/fetchmail lrwxrwxrwx 1 root root 15 mai 18 08:54 S99monit -> ../init.d/monit lrwxrwxrwx 1 root root 22 jui 19 11:13 S99networking -> /etc/init.d/networking lrwxrwxrwx 1 root root 18 jan 21 2009 S99rc.local -> ../init.d/rc.local lrwxrwxrwx 1 root root 19 jan 21 2009 S99rmnologin -> ../init.d/rmnologin lrwxrwxrwx 1 root root 16 mar 16 10:44 S99rups -> /etc/init.d/rups lrwxrwxrwx 1 root root 23 jan 21 2009 S99stop-bootlogd -> ../init.d/stop-bootlogd

Vloilà, j’espère que ça va t’éclairer…

je pense que le bluetooth utilise les services networking ( je me trompe peut-être)
si tu veux démarrer bluetooth plus tôt,
démarrer tt les services réseaux plus tôt
dhcp networking …

Re,
En fait le service bluetooth est bien lancé depuis que j’ai fait la modification et passé de rc.2d à rcS.d donc de ce côté là pas de problème (selon moi… :confused: )

Mais quand le service networking se lance, la connection à Internet via le bluetooth ne se lance pas !
Peut-être du côté de /etc/interfaces ?

Merci de ta réponse en tout cas.

je crois que c’est normal
quand le service bluetooth est lancé le net n’existe pas donc pas de réseaux
même si le net est disponible plus tard.
Au pire refait un restart service bluetooth après les service réseaux

C’est un peu bancale, et ça marche à moitié…

J’ai ajouté dans /etc/network/interfaces ceci iface ppp0 inet ppp provider telma auto ppp0
et j’ai créé un fichier /etc/ppp/peers/telma user "internet" connect "/usr/sbin/chat -v -f /etc/chatscripts/ppp0 -T *99#" ipparam ppp0 /dev/rfcomm0 115200 noipdefault usepeerdns defaultroute persist noauth
J’ai bien la connexion avant de lancer une session graphique, mais snort ma donne une erreur (il ne trouve pas ppp0 donc quand snort se lance l’interface ppp0 n’est pas encore active…) squid3 n’est pas opérationnel…
Donc ppp0 n’est pas lancé assez tôt…

[quote=“dchost99”]je crois que c’est normal
quand le service bluetooth est lancé le net n’existe pas donc pas de réseaux
même si le net est disponible plus tard.
Au pire refait un restart service bluetooth après les service réseaux[/quote]Bonne idée, comment je fais ça, je rajoute une entrée dans rc.2d ?

pour tester après le démarrage
refait /etc/init.d/bluetooth restart
et après dans /etc/rc.local
tu ajoute la commande avant le exit 0

[quote=“dchost99”]pour tester après le démarrage
refait /etc/init.d/bluetooth restart
et après dans /etc/rc.local
tu ajoute la commande avant le exit 0[/quote]
Tout d’abord merci beaucoup de perdre du temps avec moi…

Quand je lance la commande /etc/init.d/bluetooth restart une fois, il coupe la connection… et c’est tout.
Il faut que je relance /etc/init.d/bluetooth restart encore une fois pour qu’il lance la connection à Internet…

J’ai quand même placé la commande dans le rc.local, et redémarré, mais ça n’a pas fonctionné.
Peut-être faudrait-il que je double ? :wink:

La connection n’est effective qu’a une ouverture de session (en console ou session graphique…) il faut que je regarde de ce côté…

Mais j’ai déjà bien avancé grâce à toi !

de rien …

Rien à faire, ça ne fonctionne pas…
J’ai découvert la commande update-rc.d qui est quand même plus propre que ma méthode “sauvage”

J’ai “avancé” le démarrage du bluetooth

laurent@spider:~$ sudo update-rc.d bluetooth remove Removing any system startup links for /etc/init.d/bluetooth ... /etc/rc0.d/K74bluetooth /etc/rc1.d/K74bluetooth /etc/rc2.d/S99bluetooth /etc/rc3.d/S99bluetooth /etc/rc5.d/S99bluetooth /etc/rc6.d/K74bluetooth laurent@spider:~$ sudo update-rc.d bluetooth start 20 2 3 4 5 . stop 20 0 1 6 . Adding system startup for /etc/init.d/bluetooth ... /etc/rc0.d/K20bluetooth -> ../init.d/bluetooth /etc/rc1.d/K20bluetooth -> ../init.d/bluetooth /etc/rc6.d/K20bluetooth -> ../init.d/bluetooth /etc/rc2.d/S20bluetooth -> ../init.d/bluetooth /etc/rc3.d/S20bluetooth -> ../init.d/bluetooth /etc/rc4.d/S20bluetooth -> ../init.d/bluetooth /etc/rc5.d/S20bluetooth -> ../init.d/bluetooth laurent@spider:~$

Voici mon /etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplug eth1
iface eth1 inet static
        address 192.168.0.1
        netmask 255.255.255.0
auto eth1

iface ppp0 inet ppp
provider telma
auto ppp0

Rien à faire, au démarrage du réseau, la connexion ne se lance pas… :cry:
Le rcS.d ne contient rien à propos du bluetooth.

Eureka !
J’ai modifié un paramètre du script /etc/init.d/bluetooth et ça fonctionne !!!
Plus besoin d’intervenir, la machine démarre, le bluetooth s’active et se connecte, et les services réseau ont une belle interface ppp0 quand ils se lancent !

Pour infoDUND_ENABLED=1Il suffisait de remplacer 0 par 1 :unamused:

Je pense qu’il est inutile d’en faire un truc et astuce, je suis le seul au monde à utiliser une connexion comme ça :mrgreen:

[quote=“lol”]
Je pense qu’il est inutile d’en faire un truc et astuce, je suis le seul au monde à utiliser une connexion comme ça :mrgreen:[/quote]

Non non pas le seul j’ai chercher à l’époque un moyen de pouvoir connecter mon portable ( ordinateur ) sur mon portable ( téléphone ) afin de pouvoir me servir de mon ERP sur mon serveur chez moi.

Maintenant grace à toi je vais pouvoir tranquillement revoir ça :smt002

[quote=“Clochette”][quote=“lol”]
Je pense qu’il est inutile d’en faire un truc et astuce, je suis le seul au monde à utiliser une connexion comme ça :mrgreen:[/quote]

Non non pas le seul j’ai chercher à l’époque un moyen de pouvoir connecter mon portable ( ordinateur ) sur mon portable ( téléphone ) afin de pouvoir me servir de mon ERP sur mon serveur chez moi.

Maintenant grace à toi je vais pouvoir tranquillement revoir ça :smt002[/quote]Nous sommes deux alors… :mrgreen: