Site Tools


Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
wiki:bluez_4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:bluez_4 [2017/10/21 20:59]
1.241.172.144 [Introduction to BlueZ]
wiki:bluez_4 [2017/10/23 10:49] (current)
1.241.172.144 [BlueZ 4 D-Bus API]
Line 54: Line 54:
 https://​wiki.archlinux.org/​index.php/​Bluetooth_headset https://​wiki.archlinux.org/​index.php/​Bluetooth_headset
 \\ \\
 +http://​trac.gateworks.com/​wiki/​wireless/​bluetooth
  
  
Line 83: Line 84:
  
  
-=====Kernel Configuration=====+=====커널에서의 설정=====
  
-Enable the following options in the kernel configuration and recompile the kernel if necessary:+아래와 같이 커널 설정에 필요한 옵션을 인에이블 한다. 
 +이와 같이 되어 있지 않았었다면 커널을 재 컴파일 해야겠지:
  
   [*] Networking support --->   [*] Networking support --->
Line 98: Line 100:
       Bluetooth device drivers --->       Bluetooth device drivers --->
  
-Select the appropriate drivers for your Bluetooth hardware.+블루투스 디바이스 드라이버는 우리 하드웨어에 따라 설정한다.
  
  
-=====Installation of BlueZ=====+=====BlueZ ​설치=====
  
-Install ​BlueZ by running the following commands:+우리의 ​BlueZ 라이브러리는 Buildroot를 통해 설치 할 수 있다. 
 + 
 +아래와 같이 BlueZ를 따로 설치 가능하다.
  
   ./configure --prefix=/​usr ​       \   ./configure --prefix=/​usr ​       \
Line 127: Line 131:
   make install   make install
  
-Install required configuration files as the root user:\\+Install required configuration files as the //root// user:\\
  
   for CONFFILE in audio input network serial ; do   for CONFFILE in audio input network serial ; do
Line 166: Line 170:
  
  
-=====Configuring ​BlueZ=====+=====설치된 ​BlueZ의 설정=====
  
 ====Config Files==== ====Config Files====
  
-/​etc/​init/​bluetooth.conf - bluetooth daemon init\\ +**/​etc/​init/​bluetooth.conf** - bluetooth daemon init
-/​etc/​bluetooth/​main.conf - main bluetooth daemon config\\ +
-   *name of device (when discoverable)\\ +
-/​etc/​bluetooth/​input.conf - configuration of the input service\\ +
-/​etc/​bluetooth/​audio.conf - configuration of the audio service (SCO routing: PCM or HCI)\\ +
-/​etc/​bluetooth/​network.conf - configuration of the network service (link encryption)\\ +
-/​etc/​bluetooth/​rfcomm.conf - configuration of rfcomm layer\\ +
-/​etc/​bluetooth/​serial.conf - configuration of serial (DUN tty, UID)\\+
  
 + ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.\\
 + ​폴더만 나중에 새로 생성한다
 + 
 +**/​etc/​bluetooth/​main.conf** - main bluetooth daemon config
 +  *name of device (when discoverable)
 + ​존재는 하지만 실제 사용되는지는 알 수 없다.\\
 + ​실제로 여기의 변수를 수정하여도 적용되는 것 같지 않다.\\
 + ​변화가 전혀 없다.
 +
 +**/​etc/​bluetooth/​input.conf** - configuration of the input service
 +
 + ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
 +
 +**/​etc/​bluetooth/​audio.conf** - configuration of the audio service (SCO routing: PCM or HCI)
 +
 + ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
 +
 +**/​etc/​bluetooth/​network.conf** - configuration of the network service (link encryption)
 +
 + ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
 +
 +**/​etc/​bluetooth/​rfcomm.conf** - configuration of rfcomm layer
 +
 + ​존재는 하지만 실제 사용되는지는 알 수 없다.\\
 + ​실제로 여기의 변수를 수정하여도 적용되는 것 같지 않다.\\
 + ​변화가 전혀 없다.
 +
 +**/​etc/​bluetooth/​serial.conf** - configuration of serial (DUN tty, UID)
 +
 + ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
  
 ====Boot Script==== ====Boot Script====
Line 245: Line 272:
 * https://​code.google.com/​archive/​p/​bluez-tools/​ * https://​code.google.com/​archive/​p/​bluez-tools/​
  
 +=====D-Bus Message Bus System=====
  
 +The BlueZ stack uses the [[https://​www.freedesktop.org/​wiki/​Software/​dbus/​|​D-Bus message bus system]] which is a simple way for applications to talk to one another.
  
 +====BlueZ 4 D-Bus API====
  
 +The BlueZ 4 D-Bus API is defined in [[https://​git.kernel.org/​pub/​scm/​bluetooth/​bluez.git/​tree/​doc/​network-api.txt?​id=4.101|​doc/​network-api.txt]]. Some example usage using **dbus-send**:​
  
-D-Bus Message Bus System+* First you need to get the path to the bluetooth controller you wish to use. We will assign it to a shell env variable and export it for future use:
  
-The BlueZ stack uses the ​D-Bus message bus system ​which is a simple way for applications to talk to one another.+  export BTADAPTER=`dbus-send --system ​--dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter | tail -1 | sed '​s/​^.*"​\(.*\)"​.*$/​\1/'​`
  
-BlueZ 4 D-Bus API+* To introspect with you can use something like:
  
-The BlueZ 4 D-Bus API is defined in ​doc/​network-api.txt. Some example usage using dbus-send:+  # dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.freedesktop.DBus.Introspectable.Introspect
  
-First you need to get the path to the bluetooth controller you wish to use. We will assign it to a shell env variable and export it for future use: +* To make your controller discoverable:​
-export BTADAPTER=`dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter | tail -1 | sed 's/^.*"​\(.*\)"​.*$/​\1/'​` +
-To introspect with you can use something like: +
-# dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.freedesktop.DBus.Introspectable.Introspect +
-To make your controller discoverable:​ +
-# dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.SetProperty string:​Discoverable variant:​boolean:​true +
-To disable discovery:​ +
-# dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.SetProperty string:​Discoverable variant:​boolean:​false +
-To list paired devices: +
-# dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.ListDevices +
-To trust a device: +
-dbus-send --system --dest=org.bluez --print-reply $BTADAPTER/​dev_54_46_6B_01_7B_2B org.bluez.Device.SetProperty string:​Trusted variant:​boolean:​true +
-To connect to an HID device (must pair first and can see the path above): +
-# dbus-send --system --dest=org.bluez --print-reply $BTADAPTER/​dev_54_46_6B_01_7B_2B org.bluez.Input.Connect +
-[ 2710.946655] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 +
-[ 2710.952642] Bluetooth: HIDP socket layer initialized +
-method return sender=:1.3 -> dest=:1.13 reply_serial=2 +
-root@ventana:​~#​ [ 2711.352289] hid-generic 0005:​0A5C:​8502.0001:​ unknown main item tag 0x0 +
-[ 2711.359234] input: Bluetooth FAVI as /​devices/​soc0/​soc.0/​2100000.aips-bus/​2184000.usb/​ci_hdrc.0/​usb1/​1-1/​1-1:​1.0/​bluetooth/​hci0/​hci0:​42/​0005:​0A5C:​8502.0001/​input/​input1 +
-[ 2711.374829] hid-generic 0005:​0A5C:​8502.0001:​ input: BLUETOOTH HID v1.1b Keyboard [Bluetooth FAVI] on 00:​15:​83:​3d:​0a:​57 +
-evtest /​dev/​input/​event1+
  
 +  # dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.SetProperty string:​Discoverable variant:​boolean:​true
  
 +* To disable discovery:
  
 +  # dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.SetProperty string:​Discoverable variant:​boolean:​false
  
 +* To list paired devices:
 +
 +  # dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.ListDevices
 +
 +* To trust a device:
 +  dbus-send --system --dest=org.bluez --print-reply $BTADAPTER/​dev_54_46_6B_01_7B_2B org.bluez.Device.SetProperty string:​Trusted variant:​boolean:​true
 +
 +* To connect to an HID device (must pair first and can see the path above):
 +
 +  # dbus-send --system --dest=org.bluez --print-reply $BTADAPTER/​dev_54_46_6B_01_7B_2B org.bluez.Input.Connect
 +  [ 2710.946655] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
 +  [ 2710.952642] Bluetooth: HIDP socket layer initialized
 +  method return sender=:1.3 -> dest=:1.13 reply_serial=2
 +  root@ventana:​~#​ [ 2711.352289] hid-generic 0005:​0A5C:​8502.0001:​ unknown main item tag 0x0
 +  [ 2711.359234] input: Bluetooth FAVI as /​devices/​soc0/​soc.0/​2100000.aips-bus/​2184000.usb/​ci_hdrc.0/​usb1/​1-1/​1-
 +  1:​1.0/​bluetooth/​hci0/​hci0:​42/​0005:​0A5C:​8502.0001/​input/​input1
 +  [ 2711.374829] hid-generic 0005:​0A5C:​8502.0001:​ input: BLUETOOTH HID v1.1b Keyboard [Bluetooth FAVI] on 
 + ​00:​15:​83:​3d:​0a:​57
 +  evtest /​dev/​input/​event1
 +
 +=====Bluetooth Profiles=====
 +
 +In order to use Bluetooth a device must be compatible with a subset of Bluetooth profiles for specific services. These profiles sit on top of the Bluetooth Core specification and protocols.
 +
 +The way a device uses Bluetooth technology depends on its profile capabilities. The profiles provide standards which manufacturers follow to allow devices to be compatible.
 +
 +A full list of profiles can be found [[https://​en.wikipedia.org/​wiki/​List_of_Bluetooth_profiles|​here]] however here are some common ones are described in detail in the sections below
 +
 +
 +[[PAN]]
  
  
Line 367: Line 411:
 \\ \\
 https://​www.linuxquestions.org/​questions/​linux-wireless-networking-41/​setting-up-bluez-with-a-passkey-pin-to-be-used-as-headset-for-iphone-816003/​ https://​www.linuxquestions.org/​questions/​linux-wireless-networking-41/​setting-up-bluez-with-a-passkey-pin-to-be-used-as-headset-for-iphone-816003/​
 +\\
 +https://​www.linuxquestions.org/​questions/​slackware-14/​bluetooth-not-working-slackware-14-0-rc4-and-bluez-4-99-a-4175427292-print/​
 +\\
 +https://​forums.gentoo.org/​viewtopic-t-923578-start-0.html
 \\ \\
  
wiki/bluez_4.1508587178.txt.gz · Last modified: 2017/10/21 20:59 by 1.241.172.144