Bluetooth
Bluetooth on lyhyelle etäisyydelle tarkoitettu langaton tiedonsiirtomenetelmä. Linuxissa Bluetooth-yhteydet yleensä toteutetaan BlueZ-protokollapinolla. Nokia kehitti Bluetoothin historian alkuvaiheissa Affix-nimisen protokollapinon Linuxille, mutta sitä ei enää käytetä.
bluetoothctl
[muokkaa]Bluetoothctl on komentorivillä toimiva bluetooth manageri. Se löytyy bluez-utils-paketista.
% bluetoothctl [NEW] Controller 00:11:87:AA:B2:C5 example.com [default] [NEW] Device C4:7D:CC:04:66:66 DS3578 M1R82F02A [bluetooth]#
Komento help listaa ohjeen. Tyypillisiä komentoja: devices, paired-devices, scan, connect, pair, info, disconnect.
[bluetooth]# connect C4:7D:CC:44:77:AB Attempting to connect to C4:7D:CC:44:77:AB [CHG] Device C4:7D:CC:44:77:AB Connected: yes Connection successful [CHG] Device C4:7D:CC:44:77:AB ServicesResolved: yes [CHG] Device C4:7D:CC:44:77:AB ServicesResolved: no [CHG] Device C4:7D:CC:44:77:AB Connected: no [CHG] Device C4:7D:CC:44:77:AB Connected: yes [Symbol XYZ123 ]#
hciconfig
[muokkaa]% hciconfig -a
hci0: Type: Primary Bus: USB
BD Address: 00:11:67:0A:B2:C5 ACL MTU: 678:8 SCO MTU: 48:10
UP RUNNING PSCAN ISCAN
RX bytes:14239 acl:403 sco:0 events:296 errors:0
TX bytes:2588 acl:73 sco:0 commands:79 errors:0
Features: 0xff 0xff 0x8d 0x78 0x08 0x18 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy:
Link mode: SLAVE ACCEPT
Name: 'computer.example.com'
Class: 0x0c0108
Service Classes: Rendering, Capturing
Device Class: Computer, Server
HCI Version: 1.2 (0x2) Revision: 0x1ae
LMP Version: 1.2 (0x2) Subversion: 0x1ae
Manufacturer: Integrated System Solution Corp. (57)
hcitool
[muokkaa]% hcitool dev
Devices:
hci0 00:11:67:0A:B2:C5
Näyttää paikalliset bluetooth liitännät.
% hcitool scan
Scanning ...
C4:7D:CC:44:77:AB Symbol XYZ123
Listaa kantavuuden päässä olevat laitteet.
l2ping
[muokkaa]# l2ping C4:7D:CC:44:77:AB Ping: C4:7D:CC:44:77:AB from 00:11:67:0A:B2:C5 (data size 44) ... 44 bytes from C4:7D:CC:44:77:AB id 0 time 11.01ms 44 bytes from C4:7D:CC:44:77:AB id 1 time 31.00ms 44 bytes from C4:7D:CC:44:77:AB id 2 time 24.97ms ^C3 sent, 3 received, 0% loss #
Bluetooth-ohjelmia Linuxille
[muokkaa]- Gnome Bluetooth
- Kde-Bluetooth [1]
- Gnokii
- gnome-phone-manager
- Bluetooth-properties
- syncEvolution
- P3nfs
- Blueman on GTK-pohjanen bluetooth- laitehallinta työkalu.
Jakelukohtaista
[muokkaa]Jossain jakelussa bluetooth löytyy useimpien jakeluiden paketinhallinnasta nimellä gnome-bluetooth tai kde-bluetooth. Lisätietoja ohjelmien asentamisesta löytyy artikkelista Ohjelmien asentaminen.
Fedora
[muokkaa]Fedora 24 tai uudemmassa:
- bluez paketti sisältää mm bluetoothctl, ciptool, hciconfig, hcitool, rfcomm, sdptool, l2ping työkalut.
- btkbdd paketti sisältää HID-näppäimistöpalvelun jolla voi tehdä tietokoneesta bt-näppäimistö-asiakkaan.
- bluedevil paketti sisältää KDE-ohjelmat bluetooth laitteiden hallintaan.
- blueman paketti sisältää GNOME-ohjelmat bluetooth laitteiden hallintaan.
Asennusohjeet löytyvät paketinhallinta sivulta.
Ubuntu
[muokkaa]Ubuntussa on hidd jota ei löydy välttämättä toisista jakeluista.
- bluez-utils paketti sisältää