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/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
#install -D -m 0644 profiles/audio/audio.conf %{buildroot}%{_sysconfdir}/bluetooth/audio.conf
#install -D -m 0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/network.conf
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
uint8_t central_rpa_res_support;
bluetooth_a2dp_role_t a2dp_role;
+ bool auto_pairing;
+ char *pin_code;
#ifdef TIZEN_FEATURE_PLATFROM_SCAN_FILTER
bool scan_filter_support; /* platform's scan filtering support */
uint8_t scan_type; /* scan type */
if (adapter->stored_alias)
g_key_file_set_string(key_file, "General", "Alias",
adapter->stored_alias);
+
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
/* Store A2DP Role */
if (adapter->a2dp_role == BLUETOOTH_A2DP_SINK_ROLE)
else
g_key_file_set_string(key_file, "General", "DefaultA2DPRole", "source");
#endif
+
ba2str(&adapter->bdaddr, address);
snprintf(filename, PATH_MAX, STORAGEDIR "/%s/settings", address);
adapter->pairable_timeout = main_opts.pairto;
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
adapter->advertising = FALSE;
+ adapter->auto_pairing = main_opts.auto_pairing;
+ adapter->pin_code = main_opts.pin_code;
#endif
DBG("System name: %s", adapter->system_name);
}
return;
}
-
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ /* check auto pairing mode */
+ if (adapter->auto_pairing) {
+ btd_adapter_pincode_reply(adapter, &ev->addr.bdaddr,
+ adapter->pin_code, adapter->pin_code ? strlen(adapter->pin_code) : 0);
+ return;
+ }
+#endif
err = device_request_pincode(device, ev->secure);
if (err < 0) {
btd_error(adapter->dev_id, "device_request_pin: %s",
"MultiProfile",
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
"EnableLEPrivacy",
+ "AutoParing",
+ "PinCode",
#endif
};
g_clear_error(&err);
else
main_opts.le_privacy = boolean;
+
+ boolean = g_key_file_get_boolean(config, "General",
+ "AutoPairing", &err);
+ if (err)
+ g_clear_error(&err);
+ else
+ main_opts.auto_pairing = boolean;
+
+ str = g_key_file_get_string(config, "General", "PinCode", &err);
+ if (err) {
+ g_clear_error(&err);
+ } else {
+ DBG("PinCode=%s", str);
+ g_free(main_opts.pin_code);
+ main_opts.pin_code = str;
+ }
#endif
}
# 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
+
+# Enable the Auto Pairing feature. If value is true, Auto Paring is enabled
+# otherwise the feature is disabled by defaut for the local device.
+AutoPairing = false
+
+# Set the Pin Code for device paring. If AutoPairing is enabled, local device
+# will use the specified pin code for device paring. Default value is "0000".
+PinCode = 0000
#endif
#[Policy]
# 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
+
+# Enable the Auto Pairing feature. If value is true, Auto Paring is enabled
+# otherwise the feature is disabled by defaut for the local device.
+AutoPairing = false
+
+# Set the Pin Code for device paring. If AutoPairing is enabled, local device
+# will use the specified pin code for device paring. Default value is "0000".
+PinCode = 0000
#endif
[Policy]