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/23 10:16]
1.241.172.144 [Config Files]
wiki:bluez_4 [2017/10/23 10:49] (current)
1.241.172.144 [BlueZ 4 D-Bus API]
Line 174: Line 174:
 ====Config Files==== ====Config Files====
  
-/​etc/​init/​bluetooth.conf - bluetooth daemon init+**/​etc/​init/​bluetooth.conf** - bluetooth daemon init
  
  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.\\  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.\\
  ​폴더만 나중에 새로 생성한다  ​폴더만 나중에 새로 생성한다
    
-/​etc/​bluetooth/​main.conf - main bluetooth daemon config+**/​etc/​bluetooth/​main.conf** - main bluetooth daemon config
   *name of device (when discoverable)   *name of device (when discoverable)
  ​존재는 하지만 실제 사용되는지는 알 수 없다.\\  ​존재는 하지만 실제 사용되는지는 알 수 없다.\\
Line 185: Line 185:
  ​변화가 전혀 없다.  ​변화가 전혀 없다.
  
-/​etc/​bluetooth/​input.conf - configuration of the input service+**/​etc/​bluetooth/​input.conf** - configuration of the input service
  
  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
  
-/​etc/​bluetooth/​audio.conf - configuration of the audio service (SCO routing: PCM or HCI)+**/​etc/​bluetooth/​audio.conf** - configuration of the audio service (SCO routing: PCM or HCI)
  
  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
  
-/​etc/​bluetooth/​network.conf - configuration of the network service (link encryption)+**/​etc/​bluetooth/​network.conf** - configuration of the network service (link encryption)
  
  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
  
-/​etc/​bluetooth/​rfcomm.conf - configuration of rfcomm layer+**/​etc/​bluetooth/​rfcomm.conf** - configuration of rfcomm layer
  
  ​존재는 하지만 실제 사용되는지는 알 수 없다.\\  ​존재는 하지만 실제 사용되는지는 알 수 없다.\\
Line 203: Line 203:
  ​변화가 전혀 없다.  ​변화가 전혀 없다.
  
-/​etc/​bluetooth/​serial.conf - configuration of serial (DUN tty, UID)+**/​etc/​bluetooth/​serial.conf** - configuration of serial (DUN tty, UID)
  
  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.  ​buildroot로 만든 rootfs에는 이의 폴더와 파일은 존재하지 않는다.
Line 272: 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.txtSome example usage using dbus-send:+  # 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 
 + 
 +=====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
  
-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: 
-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 
  
 [[PAN]] [[PAN]]
wiki/bluez_4.1508721397.txt.gz · Last modified: 2017/10/23 10:16 by 1.241.172.144