diff --git a/test/pts/hfp_ag_test.c b/test/pts/hfp_ag_test.c index 2fd7d8f19..7f1956d6f 100644 --- a/test/pts/hfp_ag_test.c +++ b/test/pts/hfp_ag_test.c @@ -195,152 +195,124 @@ static void show_usage(void){ } static void stdin_process(char cmd){ + log_info("stdin: %c", cmd); switch (cmd){ case 'a': - log_info("USER:\'%c\'", cmd); printf("Establish HFP service level connection to %s...\n", bd_addr_to_str(device_addr)); hfp_ag_establish_service_level_connection(device_addr); break; case 'A': - log_info("USER:\'%c\'", cmd); printf("Release HFP service level connection.\n"); hfp_ag_release_service_level_connection(acl_handle); break; case 'Z': - log_info("USER:\'%c\'", cmd); printf("Release HFP service level connection to %s...\n", bd_addr_to_str(device_addr)); hfp_ag_release_service_level_connection(acl_handle); break; case 'b': - log_info("USER:\'%c\'", cmd); printf("Establish Audio connection %s...\n", bd_addr_to_str(device_addr)); hfp_ag_establish_audio_connection(acl_handle); break; case 'B': - log_info("USER:\'%c\'", cmd); printf("Release Audio connection.\n"); hfp_ag_release_audio_connection(acl_handle); break; case 'c': - log_info("USER:\'%c\'", cmd); printf("Simulate incoming call from 1234567\n"); hfp_ag_set_clip(129, "1234567"); hfp_ag_incoming_call(); break; case 'C': - log_info("USER:\'%c\'", cmd); printf("Simulate terminate call\n"); hfp_ag_call_dropped(); break; case 'd': - log_info("USER:\'%c\'", cmd); printf("Report AG failure\n"); hfp_ag_report_extended_audio_gateway_error_result_code(acl_handle, HFP_CME_ERROR_AG_FAILURE); break; case 'D': - printf("Deleting all link keys\n"); gap_delete_all_link_keys(); break; case 'e': - log_info("USER:\'%c\'", cmd); printf("Answer call on AG\n"); hfp_ag_answer_incoming_call(); break; case 'E': - log_info("USER:\'%c\'", cmd); printf("Reject call on AG\n"); hfp_ag_terminate_call(); break; case 'f': - log_info("USER:\'%c\'", cmd); printf("Disable cellular network\n"); hfp_ag_set_registration_status(0); break; case 'F': - log_info("USER:\'%c\'", cmd); printf("Enable cellular network\n"); hfp_ag_set_registration_status(1); break; case 'g': - log_info("USER:\'%c\'", cmd); printf("Set signal strength to 0\n"); hfp_ag_set_signal_strength(0); break; case 'G': - log_info("USER:\'%c\'", cmd); printf("Set signal strength to 5\n"); hfp_ag_set_signal_strength(5); break; case 'h': - log_info("USER:\'%c\'", cmd); printf("Disable roaming\n"); hfp_ag_set_roaming_status(0); break; case 'H': - log_info("USER:\'%c\'", cmd); printf("Enable roaming\n"); hfp_ag_set_roaming_status(1); break; case 'i': - log_info("USER:\'%c\'", cmd); printf("Set battery level to 3\n"); hfp_ag_set_battery_level(3); break; case 'I': - log_info("USER:\'%c\'", cmd); printf("Set battery level to 5\n"); hfp_ag_set_battery_level(5); break; case 'j': - log_info("USER:\'%c\'", cmd); printf("Answering call on remote side\n"); hfp_ag_outgoing_call_established(); break; case 'r': - log_info("USER:\'%c\'", cmd); printf("Disable in-band ring tone\n"); hfp_ag_set_use_in_band_ring_tone(0); break; case 'k': - log_info("USER:\'%c\'", cmd); printf("Memory 1 cleared\n"); memory_1_enabled = 0; break; case 'K': - log_info("USER:\'%c\'", cmd); printf("Memory 1 set\n"); memory_1_enabled = 1; break; case 'l': - log_info("USER:\'%c\'", cmd); printf("Last dialed number cleared\n"); hfp_ag_clear_last_dialed_number(); break; case 'L': - log_info("USER:\'%c\'", cmd); printf("Set last dialed number to 7654321\n"); hfp_ag_set_last_dialed_number("7654321"); break; case 'm': - log_info("USER:\'%c\'", cmd); printf("Simulate incoming call from 7654321\n"); hfp_ag_set_clip(129, "7654321"); hfp_ag_incoming_call(); break; case 'M': - log_info("USER:\'%c\'", cmd); printf("Outgoing call inited and connected, ringing\n"); hfp_ag_set_clip(129, "1234567"); hfp_ag_outgoing_call_initiated(); hfp_ag_outgoing_call_established(); break; case 'n': - log_info("USER:\'%c\'", cmd); printf("Disable Voice Recognition\n"); hfp_ag_deactivate_voice_recognition(acl_handle); break; case 'N': - log_info("USER:\'%c\'", cmd); printf("Enable Voice Recognition\n"); hfp_ag_activate_voice_recognition(acl_handle); break; @@ -425,57 +397,46 @@ static void stdin_process(char cmd){ } case 'o': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 0 (minimum)\n"); hfp_ag_set_speaker_gain(acl_handle, 0); break; case 'O': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 9 (default)\n"); hfp_ag_set_speaker_gain(acl_handle, 9); break; case 'p': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 12 (higher)\n"); hfp_ag_set_speaker_gain(acl_handle, 12); break; case 'P': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 15 (maximum)\n"); hfp_ag_set_speaker_gain(acl_handle, 15); break; case 'q': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 0\n"); hfp_ag_set_microphone_gain(acl_handle, 0); break; case 'Q': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 9\n"); hfp_ag_set_microphone_gain(acl_handle, 9); break; case 's': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 12\n"); hfp_ag_set_microphone_gain(acl_handle, 12); break; case 'S': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 15\n"); hfp_ag_set_microphone_gain(acl_handle, 15); break; case 'R': - log_info("USER:\'%c\'", cmd); printf("Enable in-band ring tone\n"); hfp_ag_set_use_in_band_ring_tone(1); break; case 't': - log_info("USER:\'%c\'", cmd); printf("Terminate HCI connection. 0x%2x\n", acl_handle); gap_disconnect(acl_handle); break; case 'u': - log_info("USER:\'%c\'", cmd); printf("Join held call\n"); hfp_ag_join_held_call(); break; @@ -484,17 +445,14 @@ static void stdin_process(char cmd){ gap_inquiry_start(INQUIRY_INTERVAL); break; case 'w': - log_info("USER:\'%c\'", cmd); printf("AG: Put incoming call on hold (Response and Hold)\n"); hfp_ag_hold_incoming_call(); break; case 'x': - log_info("USER:\'%c\'", cmd); printf("AG: Accept held incoming call (Response and Hold)\n"); hfp_ag_accept_held_incoming_call(); break; case 'X': - log_info("USER:\'%c\'", cmd); printf("AG: Reject held incoming call (Response and Hold)\n"); hfp_ag_reject_held_incoming_call(); break; diff --git a/test/pts/hfp_hf_test.c b/test/pts/hfp_hf_test.c index d5662b35f..9e379c7eb 100644 --- a/test/pts/hfp_hf_test.c +++ b/test/pts/hfp_hf_test.c @@ -159,6 +159,8 @@ static void show_usage(void){ } static void stdin_process(char c){ + log_info("stdin: %c", cmd); + cmd = c; // used in packet handler if (cmd >= '0' && cmd <= '9'){ @@ -172,262 +174,210 @@ static void stdin_process(char c){ case '-': case '+': case '*': - log_info("USER:\'%c\'", cmd); printf("DTMF Code: %c\n", cmd); hfp_hf_send_dtmf_code(acl_handle, cmd); break; case 'a': - log_info("USER:\'%c\'", cmd); printf("Establish Service level connection to device with Bluetooth address %s...\n", bd_addr_to_str(device_addr)); hfp_hf_establish_service_level_connection(device_addr); break; case 'A': - log_info("USER:\'%c\'", cmd); printf("Release Service level connection.\n"); hfp_hf_release_service_level_connection(acl_handle); break; case 'b': - log_info("USER:\'%c\'", cmd); printf("Establish Audio connection to device with Bluetooth address %s...\n", bd_addr_to_str(device_addr)); hfp_hf_establish_audio_connection(acl_handle); break; case 'B': - log_info("USER:\'%c\'", cmd); printf("Release Audio service level connection.\n"); hfp_hf_release_audio_connection(acl_handle); break; case 'C': - log_info("USER:\'%c\'", cmd); printf("Enable registration status update for all AG indicators.\n"); hfp_hf_enable_status_update_for_all_ag_indicators(acl_handle); break; case 'c': - log_info("USER:\'%c\'", cmd); printf("Disable registration status update for all AG indicators.\n"); hfp_hf_disable_status_update_for_all_ag_indicators(acl_handle); break; case 'D': - log_info("USER:\'%c\'", cmd); printf("Set HFP AG registration status update for individual indicators (0111111).\n"); hfp_hf_set_status_update_for_individual_ag_indicators(acl_handle, 63); break; case 'd': - log_info("USER:\'%c\'", cmd); printf("Query network operator.\n"); hfp_hf_query_operator_selection(acl_handle); break; case 'E': - log_info("USER:\'%c\'", cmd); printf("Enable reporting of the extended AG error result code.\n"); hfp_hf_enable_report_extended_audio_gateway_error_result_code(acl_handle); break; case 'e': - log_info("USER:\'%c\'", cmd); printf("Disable reporting of the extended AG error result code.\n"); hfp_hf_disable_report_extended_audio_gateway_error_result_code(acl_handle); break; case 'f': - log_info("USER:\'%c\'", cmd); printf("Answer incoming call.\n"); hfp_hf_answer_incoming_call(acl_handle); break; case 'F': - log_info("USER:\'%c\'", cmd); printf("Hangup call.\n"); hfp_hf_terminate_call(acl_handle); break; case 'G': - log_info("USER:\'%c\'", cmd); printf("Reject incoming call.\n"); hfp_hf_reject_incoming_call(acl_handle); break; case 'g': - log_info("USER:\'%c\'", cmd); printf("Query operator.\n"); hfp_hf_query_operator_selection(acl_handle); break; case 't': - log_info("USER:\'%c\'", cmd); printf("Terminate HCI connection.\n"); gap_disconnect(acl_handle); break; case 'i': - log_info("USER:\'%c\'", cmd); printf("Dial 1234567\n"); hfp_hf_dial_number(acl_handle, "1234567"); break; case 'I': - log_info("USER:\'%c\'", cmd); printf("Dial 7654321\n"); hfp_hf_dial_number(acl_handle, "7654321"); break; case 'j': - log_info("USER:\'%c\'", cmd); printf("Dial #1\n"); hfp_hf_dial_memory(acl_handle,1); break; case 'J': - log_info("USER:\'%c\'", cmd); printf("Dial #99\n"); hfp_hf_dial_memory(acl_handle,99); break; case 'k': - log_info("USER:\'%c\'", cmd); printf("Deactivate call waiting notification\n"); hfp_hf_deactivate_call_waiting_notification(acl_handle); break; case 'K': - log_info("USER:\'%c\'", cmd); printf("Activate call waiting notification\n"); hfp_hf_activate_call_waiting_notification(acl_handle); break; case 'l': - log_info("USER:\'%c\'", cmd); printf("Deactivate calling line notification\n"); hfp_hf_deactivate_calling_line_notification(acl_handle); break; case 'L': - log_info("USER:\'%c\'", cmd); printf("Activate calling line notification\n"); hfp_hf_activate_calling_line_notification(acl_handle); break; case 'm': - log_info("USER:\'%c\'", cmd); printf("Deactivate echo canceling and noise reduction\n"); hfp_hf_deactivate_echo_canceling_and_noise_reduction(acl_handle); break; case 'n': - log_info("USER:\'%c\'", cmd); printf("Deactivate voice recognition\n"); hfp_hf_deactivate_voice_recognition(acl_handle); break; case 'N': - log_info("USER:\'%c\'", cmd); printf("Activate voice recognition %s\n", bd_addr_to_str(device_addr)); hfp_hf_activate_voice_recognition(acl_handle); break; case 'o': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 0 (minimum)\n"); hfp_hf_set_speaker_gain(acl_handle, 0); break; case 'O': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 9 (default)\n"); hfp_hf_set_speaker_gain(acl_handle, 9); break; case 'p': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 12 (higher)\n"); hfp_hf_set_speaker_gain(acl_handle, 12); break; case 'P': - log_info("USER:\'%c\'", cmd); printf("Set speaker gain to 15 (maximum)\n"); hfp_hf_set_speaker_gain(acl_handle, 15); break; case 'q': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 0\n"); hfp_hf_set_microphone_gain(acl_handle, 0); break; case 'Q': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 9\n"); hfp_hf_set_microphone_gain(acl_handle, 9); break; case 's': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 12\n"); hfp_hf_set_microphone_gain(acl_handle, 12); break; case 'S': - log_info("USER:\'%c\'", cmd); printf("Set microphone gain to 15\n"); hfp_hf_set_microphone_gain(acl_handle, 15); break; case 'u': - log_info("USER:\'%c\'", cmd); printf("Send 'user busy' (Three-Way Call 0)\n"); hfp_hf_user_busy(acl_handle); break; case 'U': - log_info("USER:\'%c\'", cmd); printf("End active call and accept waiting/held call (Three-Way Call 1)\n"); hfp_hf_end_active_and_accept_other(acl_handle); break; case 'v': - log_info("USER:\'%c\'", cmd); printf("Swap active call and hold/waiting call (Three-Way Call 2)\n"); hfp_hf_swap_calls(acl_handle); break; case 'V': - log_info("USER:\'%c\'", cmd); printf("Join hold call (Three-Way Call 3)\n"); hfp_hf_join_held_call(acl_handle); break; case 'w': - log_info("USER:\'%c\'", cmd); printf("Connect calls (Three-Way Call 4)\n"); hfp_hf_connect_calls(acl_handle); break; case 'W': - log_info("USER:\'%c\'", cmd); printf("Redial\n"); hfp_hf_redial_last_number(acl_handle); break; case 'x': - log_info("USER:\'%c\'", cmd); printf("Request phone number for voice tag\n"); hfp_hf_request_phone_number_for_voice_tag(acl_handle); break; case 'X': - log_info("USER:\'%c\'", cmd); printf("Query current call status\n"); hfp_hf_query_current_call_status(acl_handle); break; case 'y': - log_info("USER:\'%c\'", cmd); printf("Release call with index 2\n"); hfp_hf_release_call_with_index(acl_handle, 2); break; case 'Y': - log_info("USER:\'%c\'", cmd); printf("Private consulation with call 2\n"); hfp_hf_private_consultation_with_call(acl_handle, 2); break; case '[': - log_info("USER:\'%c\'", cmd); printf("Query Response and Hold status (RHH ?)\n"); hfp_hf_rrh_query_status(acl_handle); break; case ']': - log_info("USER:\'%c\'", cmd); printf("Place call in a response and held state (RHH 0)\n"); hfp_hf_rrh_hold_call(acl_handle); break; case '{': - log_info("USER:\'%c\'", cmd); printf("Accept held call (RHH 1)\n"); hfp_hf_rrh_accept_held_call(acl_handle); break; case '}': - log_info("USER:\'%c\'", cmd); printf("Reject held call (RHH 2)\n"); hfp_hf_rrh_reject_held_call(acl_handle); break; case '?': - log_info("USER:\'%c\'", cmd); printf("Query Subscriber Number\n"); hfp_hf_query_subscriber_number(acl_handle); break; case '!': - log_info("USER:\'%c\'", cmd); printf("Update HF indicator with assigned number 1 (HFI)\n"); hfp_hf_set_hf_indicator(acl_handle, 1, 1); break; case 'R': - log_info("USER:\'%c\'", cmd); printf("eVRA ready for audio\n"); hfp_hf_enhanced_voice_recognition_report_ready_for_audio(acl_handle); break; diff --git a/test/security_manager_sc/sm_test.c b/test/security_manager_sc/sm_test.c index 539718e87..f71c9671d 100644 --- a/test/security_manager_sc/sm_test.c +++ b/test/security_manager_sc/sm_test.c @@ -375,7 +375,7 @@ static void att_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t * } static void stdin_process(char c){ - log_info("stdin: %c (%02x)", c, c); + log_info("stdin: %c", c); // passkey input if (ui_digits_for_passkey && c >= '0' && c <= '9'){ printf("%c", c);