Archives Posts
Bluetooth un jour, Bluetooth toujours
Je ne connaissait pas particulièrement la dent bleu avant l’apparition de ce média dans nos téléphones, laptop et dans nos point d’accès.
Mais ces deux points que j’ai lu sur wikipedia m’ont interpellés
Point-to-Point Protocol (PPP) – Internet standard protocol for transporting IP datagrams over a point-to-point link
TCP/IP/UDP – Foundation Protocols for TCP/IP protocol suite
Donc un petit scan bluetooth m’a permi de voir ce qu’il y avait à proximité de chez moi…
[root@fedora ~]# hcitool inq
Inquiring …
00:18:F6:A1:BC:45 clock offset: 0×1163 class: 0×520300
[root@fedora ~]# hcitool scan
Scanning …
00:18:F6:A1:BC:45 Livebox-BC40
[root@fedora ~]#
Une livebox …
Après une petite documentation rapide je conclu que malheureusement bien souvent le code pin bluetooth reste par défaut.
Il me fallait donc explorer ce monde inconnu. Après avoir consulter le man de hcitool j’était capable de lister les services de ce fameux périphérique bluetooth.
[root@fedora ~]# hcitool info 00:18:F6:A1:BC:45
Requesting information …
BD Address: 00:18:F6:A1:BC:45
OUI Company: Thomson Telecom Belgium (00-18-F6)
Device Name: Livebox-BC40
LMP Version: 1.2 (0×2) LMP Subversion: 0×182
Manufacturer: Inventel (30)
Features: 0xef 0×7e 0×1d 0×80 0×0b 0×18 0×00 0×00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<role switch> <hold mode> <sniff mode> <RSSI>
<channel quality> <SCO link> <HV2 packets> <HV3 packets>
<u-law log> <CVSD> <power control> <transparent SCO>
<extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
<AFH cap. master> <AFH class. master>
Afin de pouvoir configurer une connexion ethernet via bluetooth j’utilise le programme pand
NAME
pand – BlueZ Bluetooth PAN daemon
DESCRIPTION
The pand PAN daemon allows your computer to connect to ethernet net-
works using Bluetooth.
Ceci dit je me connecte au réseau bluetooth de la livebox
[root@fedora ~]# pand –connect 00:18:F6:A1:BC:45 –service NAP –autozap
Aucune erreur …
Voyons si la connexion est établie
[root@fedora ~]# pand -l
bnep0 00:18:F6:A1:BC:45 PANU
Effectivement cela a l’air de fonctionner. Une interface ethernet bnep0 a été alloué à cette connexion. Intéressant.
[root@fedora ~]# ifconfig bnep0
bnep0 Link encap:Ethernet HWaddr 00:1C:26:F4:98:69
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
On retrouve bien la mac address de mon chipset bluetooth.
Voyons si la couche 2 est bien fonctionnelle.
[root@fedora ~]# l2ping -c 1 00:18:F6:A1:BC:45
Ping: 00:18:F6:A1:BC:45 from 00:1C:26:F4:98:69 (data size 44) …
44 bytes from 00:18:F6:A1:BC:45 id 0 time 18.94ms
1 sent, 1 received, 0% loss
BINGO !!!
Il nous reste plus qu’a demander gentiment une ip
[root@fedora ~]# dhclient bnep0
[root@fedora ~]# ifconfig bnep0
bnep0 Link encap:Ethernet HWaddr 00:1C:26:F4:98:69
inet adr:192.168.1.192 Bcast:192.168.1.255 Masque:255.255.255.0
adr inet6: fe80::21c:26ff:fef4:9869/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:427 (427.0 b) TX bytes:2483 (2.4 KiB)
Voyons les routes maintenant :
[root@fedora ~]# route -n
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 bnep0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 bnep0
Une passerelle en 192.168.1.1 sûrement la livebox. Testons en http:
L’accès aux pages de configuration a été facile le password par défaut était resté.
Moralité changer vos mots de passe par défaut et surtout désactiver ce qui ne vous sert pas.


