summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-05-05 22:27:19 -0700
committerJaikumar Ganesh <jaikumar@google.com>2009-06-04 21:05:33 -0700
commit12f7feb45d8bfcf8514143103ac30bc4efee26f6 (patch)
treef12b1c14dd0c2e85d074ebaab85a2eb349e4d3b5
parent47653588a022190d4b3e20194ef643dfb7b90632 (diff)
downloadbluetooth-12f7feb45d8bfcf8514143103ac30bc4efee26f6.tar.gz
Bluez4 changes.
Rename hcid to bluetoothd, and add the new config files.
-rw-r--r--bluedroid/bluetooth.c12
-rw-r--r--data/Android.mk2
-rw-r--r--data/audio.conf29
-rw-r--r--data/hcid.conf64
-rw-r--r--data/input.conf14
-rw-r--r--data/main.conf52
6 files changed, 96 insertions, 77 deletions
diff --git a/bluedroid/bluetooth.c b/bluedroid/bluetooth.c
index 4559eee..f36dd09 100644
--- a/bluedroid/bluetooth.c
+++ b/bluedroid/bluetooth.c
@@ -178,9 +178,9 @@ int bt_enable() {
goto out;
}
- LOGI("Starting hcid deamon");
- if (property_set("ctl.start", "hcid") < 0) {
- LOGE("Failed to start hcid");
+ LOGI("Starting bluetoothd deamon");
+ if (property_set("ctl.start", "bluetoothd") < 0) {
+ LOGE("Failed to start bluetoothd");
goto out;
}
sleep(HCID_START_DELAY_SEC);
@@ -198,9 +198,9 @@ int bt_disable() {
int ret = -1;
int hci_sock = -1;
- LOGI("Stopping hcid deamon");
- if (property_set("ctl.stop", "hcid") < 0) {
- LOGE("Error stopping hcid");
+ LOGI("Stopping bluetoothd deamon");
+ if (property_set("ctl.stop", "bluetoothd") < 0) {
+ LOGE("Error stopping bluetoothd");
goto out;
}
usleep(HCID_STOP_DELAY_USEC);
diff --git a/data/Android.mk b/data/Android.mk
index a4dfdab..07501e1 100644
--- a/data/Android.mk
+++ b/data/Android.mk
@@ -21,7 +21,7 @@ dest_dir := $(TARGET_OUT)/etc/bluez
files := \
audio.conf \
input.conf \
- hcid.conf
+ main.conf
copy_to := $(addprefix $(dest_dir)/,$(files))
diff --git a/data/audio.conf b/data/audio.conf
index 434848a..a093ffb 100644
--- a/data/audio.conf
+++ b/data/audio.conf
@@ -1,5 +1,7 @@
-# Configuration file for the bluez audio plugin (A2DP)
+# Configuration file for the audio service
+# This section contains options which are not specific to any
+# particular interface
[General]
Enable=Source,Control,Sink
Disable=Headset,Gateway
@@ -7,6 +9,31 @@ Disable=Headset,Gateway
# Switch to master role for incoming connections (defaults to true)
#Master=true
+# If we want to disable support for specific services
+# Defaults to supporting all implemented services
+#Disable=Control,Source
+
+# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
+# Defaults to HCI
+#SCORouting=PCM
+
+# Automatically connect both A2DP and HFP/HSP profiles for incoming
+# connections. Some headsets that support both profiles will only connect the
+# other one automatically so the default setting of true is usually a good
+# idea.
+#AutoConnect=true
+
+# Headset interface specific options (i.e. options which affect how the audio
+# service interacts with remote headset devices)
+#[Headset]
+
+# Set to true to support HFP (in addition to HSP only which is the default)
+# Defaults to false
+#HFP=true
+
+# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
+#MaxConnections=1
+
# Just an example of potential config options for the other interfaces
[A2DP]
SBCSources=1
diff --git a/data/hcid.conf b/data/hcid.conf
deleted file mode 100644
index 56df63a..0000000
--- a/data/hcid.conf
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# HCI daemon configuration file.
-#
-
-# HCId options
-options {
- # Automatically initialize new devices
- autoinit yes;
-
- # Security Manager mode
- # none - Security manager disabled
- # auto - Use local PIN for incoming connections
- # user - Always ask user for a PIN
- #
- security user;
-
- # Pairing mode
- # none - Pairing disabled
- # multi - Allow pairing with already paired devices
- # once - Pair once and deny successive attempts
- pairing multi;
-}
-
-# Default settings for HCI devices
-device {
- # Local device name
- # %d - device id
- # %h - host name
- # %b - ro.product.brand
- # %m - ro.product.model
- # %n - ro.product.name
- name "%m";
-
- # Local device class
- # 0x400000 - Service class: Telephony
- # 0x000200 - Major class: Phone
- # 0x00000C - Minor class: Smart phone
- class 0x40020C;
-
- # Default packet type
- #pkt_type DH1,DM1,HV1;
-
- # Inquiry and Page scan
- iscan disable;
- pscan enable;
-
- # Page timeout (in 0.625ms slots): 10 seconds
- pageto 16384;
-
- # Default link mode
- # none - no specific policy
- # accept - always accept incoming connections
- # master - become master on incoming connections,
- # deny role switch on outgoing connections
- lm accept;
-
- # Default link policy
- # none - no specific policy
- # rswitch - allow role switch
- # hold - allow hold mode
- # sniff - allow sniff mode
- # park - allow park mode
- lp rswitch,hold,sniff,park;
-}
diff --git a/data/input.conf b/data/input.conf
index 0fe7b0b..abfb64f 100644
--- a/data/input.conf
+++ b/data/input.conf
@@ -1,5 +1,9 @@
-[Bluetooth Service]
-Identifier=input
-Name=Input service
-Description=Bluetooth HID based Input service
-Autostart=false
+# Configuration file for the input service
+
+# This section contains options which are not specific to any
+# particular interface
+[General]
+
+# Set idle timeout (in minutes) before the connection will
+# be disconnect (defaults to 0 for no timeout)
+#IdleTimeout=30
diff --git a/data/main.conf b/data/main.conf
new file mode 100644
index 0000000..b03e169
--- /dev/null
+++ b/data/main.conf
@@ -0,0 +1,52 @@
+[General]
+
+# List of plugins that should not be loaded on bluetoothd startup
+#DisablePlugins = network,input
+
+# Default adaper name
+# %h - substituted for hostname
+# %d - substituted for adapter id
+Name = "Bluez"
+
+# Default device class. Only the major and minor device class bits are
+# considered.
+Class = 0x000100
+
+# How long to stay in discoverable mode before going back to non-discoverable
+# The value is in seconds. Default is 180, i.e. 3 minutes.
+# 0 = disable timer, i.e. stay discoverable forever
+DiscoverableTimeout = 120
+
+# How long to stay in pairable mode before going back to non-discoverable
+# The value is in seconds. Default is 0.
+# 0 = disable timer, i.e. stay pairable forever
+PairableTimeout = 0
+
+# Use some other page timeout than the controller default one
+# which is 16384 (10 seconds).
+PageTimeout = 8192
+
+# Discover scheduler interval used in Adapter.DiscoverDevices
+# The value is in seconds. Defaults is 0 to use controller scheduler.
+DiscoverSchedulerInterval = 0
+
+# What value should be assumed for the adapter Powered property when
+# SetProperty(Powered, ...) hasn't been called yet. Defaults to true
+InitiallyPowered = true
+
+# Remember the previously stored Powered state when initializing adapters
+RememberPowered = true
+
+# Use vendor, product and version information for DID profile support.
+# The values are separated by ":" and VID, PID and version.
+DeviceID = android:generic:1.5
+
+# Do reverse service discovery for previously unknown devices that connect to
+# us. This option is really only needed for qualification since the BITE tester
+# doesn't like us doing reverse SDP for some test cases (though there could in
+# theory be other useful purposes for this too). Defaults to true.
+ReverseServiceDiscovery = true
+
+# Enable name resolving after inquiry. Set it to 'false' if you don't need
+# remote devices name and want shorter discovery cycle. Defaults to 'true'.
+NameResolving = true