void *user_data)
{
TC_PRT("result: %s", __bt_get_error_message(result));
- TC_PRT("connection_state: %d", connection_state);
+ TC_PRT("connection_state: %s", connection_state == BT_SOCKET_CONNECTED ? "Connected" : "Disconnected");
if (connection == NULL) {
TC_PRT("No connection data!");
TC_PRT("socket fd: %d", connection->socket_fd);
TC_PRT("server socket fd: %d", connection->server_fd);
- TC_PRT("role: %d", connection->local_role);
+ TC_PRT("role: %s", connection->local_role == BT_SOCKET_SERVER ? "Server" :
+ (connection->local_role == BT_SOCKET_CLIENT ? "Client" : "Unknown"));
TC_PRT("remote address: %s", connection->remote_address);
if (strcmp(spp_uuid, connection->service_uuid) == 0) {
TC_PRT("service_uuid: %s", spp_uuid);
void *user_data)
{
TC_PRT("result: %s", __bt_get_error_message(result));
- TC_PRT("connection_state: %d", connection_state);
+ TC_PRT("connection_state: %s", connection_state == BT_SOCKET_CONNECTED ? "Connected" : "Disconnected");
if (connection == NULL) {
TC_PRT("No connection data!");
TC_PRT("socket fd: %d", connection->socket_fd);
TC_PRT("server socket fd: %d", connection->server_fd);
- TC_PRT("role: %d", connection->local_role);
+ TC_PRT("role: %s", connection->local_role == BT_SOCKET_SERVER ? "Server" :
+ (connection->local_role == BT_SOCKET_CLIENT ? "Client" : "Unknown"));
TC_PRT("remote address: %s", connection->remote_address);
TC_PRT("PSM: %d", connection->psm);
l2cap_le_client_fd = connection->socket_fd;
break;
case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_DEVICE_ADDRESS:
case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_DEVICE_NAME:
+ case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_SERVICE_UUID:
case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_RSSI_HIGH_THRES:
param_count = 1;
TC_PRT("Input data for LE scan filter");
if (ret != BT_ERROR_NONE)
TC_PRT("failed with [0x%04x]", ret);
- ret = bt_adapter_le_scan_filter_set_service_uuid(scan_filter, "1805");
+ if (g_test_param.param_count > 0) {
+ ret = bt_adapter_le_scan_filter_set_service_uuid(scan_filter, g_test_param.params[0]);
+ __bt_free_test_param(&g_test_param);
+ } else {
+ ret = bt_adapter_le_scan_filter_set_service_uuid(scan_filter, "1805");
+ }
if (ret != BT_ERROR_NONE)
TC_PRT("failed with [0x%04x]", ret);