Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

connection Internet PC linux IPAQ (via bluetooth)

2 réponses
Avatar
Greg
Bonjour,

Je cherche à connecter un IPAQ sur internet via un dongle USB bluetooth
branché sur un PC linux .
J'ai trouvé sur internet qques info pour faire cette manip
(http://www.melaneum.com/linux/bluetooth.html), mais j'ai un problème...

Voici ce que j'ai fait :
------------------ coté LINUX ------------------

linux:/home/greg # hciconfig -a
hci0: Type: USB
BD Address: 00:0C:76:AB:68:2A ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:29163 acl:509 sco:0 events:524 errors:0
TX bytes:12616 acl:382 sco:0 commands:62 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'BlueZ linux (0)'
Class: 0x120100
Service Classes: Networking
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP
Subver: 0x20d
Manufacturer: Cambridge Silicon Radio (10)


linux:/home/greg # dund --listen --msdun --channel 1
192.168.2.101:192.168.2.102
linux:/home/greg # echo '1' > /proc/sys/net/ipv4/ip_forward
linux:/home/greg # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
linux:/home/greg # iptables -A FORWARD -i ppp1 -j ACCEPT
linux:/home/greg # iptables -A FORWARD -m state --state
ESTABLISHED,RELATED -j ACCEPT

j'ai édité le fichier /etc/bluetooth/rfcomm.conf

rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device 00:04:3E:A1:5D:6F;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment "Pocket PC";

}
j'ai édité le fichier /etc/ppp/chap-secrets pour y metter un login/mot
de passe PPP:


# INBOUND CONNECTIONS
#client hostname <password> 192.168.1.1
"greg" * "********" 192.168.2.102

------------------ Coté PPC -------------
- Démarage bluetooth
- Nouveau -> onnecter -> Connection interent -> Via un point d'acces ou
un ordi connecté en permanence au réseau local -> BlueZ linux (0)
Les paramètres complémentaire de cette connection sont :
Modem : Bluetooth Null Modem
N° tel : Connect (j'ai pas su quoi mettre, alors j'ai laissé ce qu'il
y avait)
Nom d'utilisateur : greg
Mot de passe ********
Domaine : linux
Adresse IP : 192.168.2.102
DNS I : 212.151.... (trouvé dans resolv.conf). J'ai aussi essayé de
mettre l'adresse locale du pc linux (192.168.2.101) sans succés


--------------RESULTAT --------------------

J'arrive à me connecter (il y a qd meme un warning):

Jun 1 22:05:18 linux dund[11217]: New connection from 00:04:3E:A1:5D:6F
Jun 1 22:05:18 linux pppd[11222]: pppd 2.4.3 started by root, uid 0
Jun 1 22:05:18 linux pppd[11222]: Using interface ppp1
Jun 1 22:05:18 linux pppd[11222]: Connect: ppp1 <--> /dev/rfcomm1
Jun 1 22:05:50 linux pppd[11222]: local IP address 192.168.2.101
Jun 1 22:05:50 linux pppd[11222]: remote IP address 192.168.2.102
Jun 1 22:05:50 linux ip-up: SuSEfirewall2: Warning: ip6tables does not
support state matching. Extended IPv6 support disabled.
Jun 1 22:05:50 linux SuSEfirewall2: Warning: ip6tables does not support
state matching. Extended IPv6 support disabled.
Jun 1 22:05:50 linux SuSEfirewall2: Setting up rules from
/etc/sysconfig/SuSEfirewall2 ...
Jun 1 22:05:50 linux SuSEfirewall2: Firewall rules successfully set
Jun 1 22:05:50 linux pppd[11222]: Script /etc/ppp/ip-up finished (pid
11236), status = 0x0
Jun 1 22:05:55 linux poll.tcpip: Checking for network time protocol
daemon (NTPD): ..unused

Rem : je comprend pas pourquoi il cherche NTPD

Un ping 192.168.2.102 fonctionne :
linux:/home/greg # ping 192.168.2.102
PING 192.168.2.102 (192.168.2.102) 56(84) bytes of data.
64 bytes from 192.168.2.102: icmp_seq=1 ttl=128 time=73.2 ms
64 bytes from 192.168.2.102: icmp_seq=2 ttl=128 time=54.5 ms


Mais impossible d'acceder au moindre site internet : pocket IE me
retourne que la pages cherchée est introuvable!
On dirait que j'ai un problème de DNS, mais je comprend pas ce qui se passe.
Quelqu'un a t il une idée ? Quelqu'un a t il déjà fais ce genre de manip ?



Merci d'avance

Greg

PS : ma config
PC linux SUSE 9.3 (kernel 2.6.11) + Dongle BT MSI
IPAQ 1940

2 réponses

Avatar
Doug713705
Le Jeudi 1 Juin 2006 22:39, Greg s'est exprimé de la sorte sur
fr.comp.os.linux.configuration :

Mais impossible d'acceder au moindre site internet : pocket IE me
retourne que la pages cherchée est introuvable!
On dirait que j'ai un problème de DNS, mais je comprend pas ce qui se
passe. Quelqu'un a t il une idée ? Quelqu'un a t il déjà fais ce genre de
manip ?



Un problème de routage certainement ou un problème dans la config iptables.

Je ne suis pas du tout spécialiste en la matière mais :

echo '1' > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
^^^^^^^^ Ca me semble bizarre comme ligne

iptables -A FORWARD -i ppp1 -j ACCEPT



Chez moi pour iptables j'ai ça (pour le partage d'une connexion internet via
wifi) :

echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter <<<< Tu n'as pas ça non plus.
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT

Le truc c'est que je ne sais plus pourquoi j'ai configuré ça comme ça !!!
Je ne peux donc pas d'en dire plus quant au pourquoi du comment.

--
@+
Doug [Linux user #307925] - Slackware RuleZ ;-)
[Pourquoi t'es qui, qu'est ce que tu fais par où ?]
-- Pour me contacter enlever no-spam (2X) --

Avatar
Nicolas George
Greg wrote in message <hgIfg.235$:
Je cherche à connecter un IPAQ sur internet via un dongle USB bluetooth
branché sur un PC linux .
J'ai trouvé sur internet qques info pour faire cette manip
(http://www.melaneum.com/linux/bluetooth.html), mais j'ai un problème...


J'ai un peu la flemme de lire tout ce que tu as écrit. Personnellement, j'ai
cette config :

- sur l'ordinateur qui a la connexion, j'ai pand --listen --role NAP qui
tourne en permanence ;

- sur l'iPaq, pour établir la connexion, j'utilise :
hciattach /dev/ttySB0 bcsp 230400
hciconfig hci0 up
pand --role PANU --connect $remote
(avec $remote qui vaut l'adresse Bluetooth de mon ordinateur) (j'ai en
plus des scripts d'APM pour arrêter proprement la connexion en cas de
suspend, et la rétablir au resume).

Dans les deux cas un script dans /etc/bluetooth/pan/dev-up pour configurer
l'interface bnep0 avec les adresses IP et les routes quand la connexion est
établie, si l'adresse physique correspond. Ça marche de manière totalement
satisfaisante.