diff options
author | DoHyun Pyun <dh79.pyun@samsung.com> | 2019-12-24 08:42:10 +0900 |
---|---|---|
committer | DoHyun Pyun <dh79.pyun@samsung.com> | 2019-12-24 09:18:32 +0900 |
commit | 352e7c71dd69a7aa9bb60dd95d32904f2c50426e (patch) | |
tree | ac45bc111227c94acc32233fcefd09497be0e5cb | |
parent | 962e1114511132282271d712aacbc495e41e103e (diff) | |
download | bluez-tizen_5.5_tv.tar.gz bluez-tizen_5.5_tv.tar.bz2 bluez-tizen_5.5_tv.zip |
Support the keyboard pluginsubmit/tizen_5.5/20191227.013755accepted/tizen/5.5/unified/20191230.212408tizen_5.5_tv
Change-Id: Ia5a640caf07cba2a355af94998aa9000500bb82a
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
-rw-r--r--[-rwxr-xr-x] | packaging/bluez.spec | 15 | ||||
-rw-r--r-- | src/adapter.c | 9 | ||||
-rw-r--r-- | src/main_keyboard.conf | 89 |
3 files changed, 112 insertions, 1 deletions
diff --git a/packaging/bluez.spec b/packaging/bluez.spec index 087aa255..fbc4b144 100755..100644 --- a/packaging/bluez.spec +++ b/packaging/bluez.spec @@ -144,6 +144,12 @@ Requires: %{name}-compat = %{version}-%{release} %description plugin-headless This package is Bluez plugin to manager headless device +%package plugin-keyboard +Summary: Bluez keyboard plugin +Requires: %{name}-compat = %{version}-%{release} +%description plugin-keyboard +This package is Bluez plugin to manager keyboard device + %prep %setup -q cp %{SOURCE1001} . @@ -366,6 +372,7 @@ install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth install -D -m 0644 src/main_w.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.wearable install -D -m 0644 src/main_m.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf install -D -m 0644 src/main_headless.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.headless +install -D -m 0644 src/main_keyboard.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.keyboard #install -D -m 0644 src/org.bluez.service %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service @@ -542,4 +549,12 @@ rm %{_sysconfdir}/bluetooth/main.conf %manifest %{name}.manifest %{_sysconfdir}/bluetooth/main.conf.headless +%post plugin-keyboard +ln -sf main.conf.keyboard %{_sysconfdir}/bluetooth/main.conf +%preun plugin-keyboard +rm %{_sysconfdir}/bluetooth/main.conf +%files plugin-keyboard +%manifest %{name}.manifest +%{_sysconfdir}/bluetooth/main.conf.keyboard + %changelog diff --git a/src/adapter.c b/src/adapter.c index 0049d152..cf4a63f5 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -14318,7 +14318,7 @@ static void read_info_complete(uint8_t status, uint16_t length, case BT_MODE_DUAL: if (missing_settings & MGMT_SETTING_SSP) { #ifdef TIZEN_FEATURE_BLUEZ_MODIFY - if (main_opts.pin_code) + if (main_opts.pin_code || (main_opts.class & 0x1f00) >> 8 == 0x05) set_mode(adapter, MGMT_OP_SET_SSP, 0x00); else #endif @@ -14336,8 +14336,15 @@ static void read_info_complete(uint8_t status, uint16_t length, goto failed; } +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY + if (main_opts.pin_code || (main_opts.class & 0x1f00) >> 8 == 0x05) + set_mode(adapter, MGMT_OP_SET_SSP, 0x00); + else + set_mode(adapter, MGMT_OP_SET_SSP, 0x01); +#else if (missing_settings & MGMT_SETTING_SSP) set_mode(adapter, MGMT_OP_SET_SSP, 0x01); +#endif if (missing_settings & MGMT_SETTING_BREDR) set_mode(adapter, MGMT_OP_SET_BREDR, 0x01); if (adapter->current_settings & MGMT_SETTING_LE) diff --git a/src/main_keyboard.conf b/src/main_keyboard.conf new file mode 100644 index 00000000..bfe94e06 --- /dev/null +++ b/src/main_keyboard.conf @@ -0,0 +1,89 @@ +[General] + +# Default adaper name +# %h - substituted for hostname +# %d - substituted for adapter id +# Defaults to 'BlueZ' +#Name = %h-%d + +# Default device class. Only the major and minor device class bits are +# considered. Defaults to '0x000000'. +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY +Class = 0x40540 # Rendering, Peripheral Keyboard +#else +#Class = 0x000100 +#endif + +# 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 = 0 + +# 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 + +# Automatic connection for bonded devices driven by platform/user events. +# If a platform plugin uses this mechanism, automatic connections will be +# enabled during the interval defined below. Initially, this feature +# intends to be used to establish connections to ATT channels. Default is 60. +#AutoConnectTimeout = 60 + +# Use vendor id source (assigner), vendor, product and version information for +# DID profile support. The values are separated by ":" and assigner, VID, PID +# and version. +# Possible vendor id source values: bluetooth, usb (defaults to usb) +#DeviceID = bluetooth:1234:5678:abcd + +# 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 + +# Enable runtime persistency of debug link keys. Default is false which +# makes debug link keys valid only for the duration of the connection +# that they were created for. +#DebugKeys = false + +# Restricts all controllers to the specified transport. Default value +# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW). +# Possible values: "dual", "bredr", "le" +#ControllerMode = dual + +# Permanently enables the Fast Connectable setting for adapters that +# support it. When enabled other devices can connect faster to us, +# however the tradeoff is increased power consumptions. This feature +# will fully work only on kernel version 4.1 and newer. Defaults to +# 'false'. +#FastConnectable = false + +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY +# Defines PinCode in headless device. If PinCode request is invoked, +# response this PinCode directly instead of delivery to agent. +#PinCode = 0000 +#endif + +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY +# Enable the LE Privacy feature. If value is true, i.e. LE Privacy is enabled +# otherwise the feature is disabled by default for the local device. +EnableLEPrivacy = false +#endif + +[Policy] +# +# The ReconnectUUIDs defines the set of remote services that should try +# to be reconnected to in case of a link loss (link supervision +# timeout). The policy plugin should contain a sane set of values by +# default, but this list can be overridden here. By setting the list to +# empty the reconnection feature gets disabled. +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY +ReconnectUUIDs= +#else +#ReconnectUUIDs= +#endif |