{
int timeout_id = -1;
int ret = BT_ERROR_NONE;
+ char *local_address = NULL;
g_mainloop = g_main_loop_new(NULL, FALSE);
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)