param_type = "int(1, 2, 10, ...., 512)";
TC_PRT("Input param(%d) : %s", param_index + 1, param_type);
break;
+ case BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH:
+ param_count = 2;
+ switch (param_index) {
+ case 0:
+ TC_PRT("Input max octets (27 ~ 251)");
+ break;
+ case 1:
+ TC_PRT("Input max time (328 ~ 2120)");
+ break;
+ }
+ break;
default:
TC_PRT("There is no param to set\n");
need_to_set_params = false;
TC_PRT("LE CODED PHY Support [%s]", is_coded_phy_supported ? "YES" : "NO");
break;
}
- case BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH: {
-
- TC_PRT("Set LE Data length paramters cmd");
-
- unsigned int tx_octets = 50;
- unsigned int tx_time = 500;
-
- TC_PRT("settting le data length values tx octects: %d tx time: %d",
- tx_octets, tx_time);
- ret = bt_device_le_set_data_length(remote_addr,
- tx_octets, tx_time);
- TC_PRT("returns %s\n", __bt_get_error_message(ret));
-
- break;
- }
- case BT_UNIT_TEST_FUNCTION_LE_DEVICE_DATA_LENGTH_CHANGED_CB: {
-
- TC_PRT("Setting LE Data length change callback");
-
- ret = bt_device_le_set_data_length_change_cb(
- __bt_le_set_data_length_changed_cb,
- NULL);
- TC_PRT("returns %s\n", __bt_get_error_message(ret));
-
- break;
- }
case BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS:
need_to_set_params = true;
TC_PRT("Select the function again");
TC_PRT("returns %s\n", __bt_get_error_message(ret));
break;
}
+ case BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH: {
+
+ TC_PRT("Set LE Data length paramters cmd");
+
+ unsigned int tx_octets = 50;
+ unsigned int tx_time = 500;
+
+ if (g_test_param.param_count > 0) {
+ tx_octets = atoi(g_test_param.params[0]);
+ tx_time = atoi(g_test_param.params[1]);
+
+ __bt_free_test_param(&g_test_param);
+ }
+ TC_PRT("settting le data length values tx octects: %d tx time: %d",
+ tx_octets, tx_time);
+ ret = bt_device_le_set_data_length(remote_addr,
+ tx_octets, tx_time);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+
+ break;
+ }
+ case BT_UNIT_TEST_FUNCTION_LE_DEVICE_DATA_LENGTH_CHANGED_CB: {
+
+ TC_PRT("Setting LE Data length change callback");
+
+ ret = bt_device_le_set_data_length_change_cb(
+ __bt_le_set_data_length_changed_cb,
+ NULL);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+
+ break;
+ }
case BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS:
need_to_set_params = true;
TC_PRT("Select the function again");
BT_UNIT_TEST_FUNCTION_ADAPTER_LE_READ_HOST_SUGGESTED_DEFAULT_DATA_LENGTH,
BT_UNIT_TEST_FUNCTION_LE_2M_PHY_SUPPORT,
BT_UNIT_TEST_FUNCTION_LE_CODED_PHY_SUPPORT,
- BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH,
- BT_UNIT_TEST_FUNCTION_LE_DEVICE_DATA_LENGTH_CHANGED_CB,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_TRUE = 1,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_FALSE,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_CHANGED_CB,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_REQUEST_ATT_MTU_CHANGED_CB,
BT_UNIT_TEST_FUNCTION_DEVICE_UNSET_REQUEST_ATT_MTU_CHANGED_CB,
BT_UNIT_TEST_FUNCTION_DEVICE_GET_ATT_MTU,
+ BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH,
+ BT_UNIT_TEST_FUNCTION_LE_DEVICE_DATA_LENGTH_CHANGED_CB,
BT_UNIT_TEST_FUNCTION_SOCKET_CREATE_RFCOMM = 1,
BT_UNIT_TEST_FUNCTION_SOCKET_DESTROY_RFCOMM,
BT_UNIT_TEST_FUNCTION_SOCKET_LISTEN_AND_ACCEPT_RFCOMM,