Add the log for local BT address 20/220620/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 20 Dec 2019 05:04:42 +0000 (14:04 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 20 Dec 2019 05:04:42 +0000 (14:04 +0900)
Change-Id: I9811e8a08d6beaec353a02769e60686977effc39
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
test/ble_mouse.c

index 8b7428b..31305db 100644 (file)
@@ -617,6 +617,7 @@ int main()
 {
        int timeout_id = -1;
        int ret = BT_ERROR_NONE;
+       char *local_address = NULL;
 
        g_mainloop = g_main_loop_new(NULL, FALSE);
 
@@ -654,12 +655,16 @@ int main()
                BLE_PRT("BT was already enabled.");
        }
 
-       /* Set name as "chat_server" */
        if (bt_state != BT_ADAPTER_ENABLED) {
                BLE_PRT("BT is not enabled.");
                return -1;
        }
 
+       ret = bt_adapter_get_address(&local_address);
+       BLE_PRT("\n\nLocal BT address: %s\n", local_address);
+
+       g_free(local_address);
+
        ret = bt_gatt_set_connection_state_changed_cb(
                        __bt_gatt_connection_state_changed_cb, NULL);
        if (ret != BT_ERROR_NONE)