</li>
<li>Bluetooth GATT operations
<ul class="toc">
+ <li><a href="#gatt">Precondition to use GATT operations</a>
<li><a href="#gatt">Managing the Client Operations</a></li>
<li><a href="#gatt_getter">Managing Common Getter Operations</a></li>
<li><a href="#gatt_setter">Managing Common Setter Operations</a></li>
</ul></li>
<li>Bluetooth GATT operations
<ul>
+ <li><a href="#gatt">Precondition to use GATT operations</a>
<li><a href="#gatt">Managing the Client Operations</a>
<p>Create a client to connect to a remote service, get service details, read and set service attributes, and set and release callbacks when the characteristic value changes.</p></li>
<li><a href="#gatt_getter">Managing Common Getter Operations</a>
dlog_print(DLOG_INFO, LOG_TAG, "[bt_socket_destroy_rfcomm] Succeeded. server_socket_fd = %d.", server_socket_fd);
}</pre></li></ul>
+<h2 id="gatt" name="gatt">Precondition to use the GATT operations</h2>
+<p> There is an essential precondition for use GATT APIs. To use those, you need to connect BLE target you want successfully.</p>
+<p> This is the process to connect BLE target below.</p>
+<pre class="prettyprint">
+int ret = BT_ERROR_NONE;
+ret = bt_adapter_le_start_scan(__bt_adapter_le_scan_result_cb, NULL);
+/* If you want to know the cb function, you can refer to the list, "Managing Bluetooth LE Scans" */
+if (ret != BT_ERROR_NONE) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "[bt_adapter_le_start_scan] Failed.");
+}
+/* You should wait while searching LE target you want to connect */
+ret = bt_adapter_le_stop_scan();
+/* If you find LE target you want, you should stop finding LE target */
+ret = bt_gatt_connect(ADDRESS_BLE_DEVICE_YOU_WANT, false);
+if (ret != BT_ERROR_NONE) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "Fail to connect LE device.");
+}
+</pre></li>
+
<h2 id="gatt" name="gatt">Managing the Client Operations</h2>
<p>To perform GATT client operations:</p>
<ol>
</script>
</body>
-</html>
\ No newline at end of file
+</html>