diff --git a/src/hfp.h b/src/hfp.h index 62e8b42ff..bdd633514 100644 --- a/src/hfp.h +++ b/src/hfp.h @@ -94,7 +94,7 @@ extern "C" { #define HFP_Generic_Status_Indicator "+BIND" #define HFP_OK "OK" -#define HFP_Codec_CSVD 0x01 +#define HFP_Codec_CVSD 0x01 #define HFP_Codec_mSBC 0x02 diff --git a/src/hfp_hf.c b/src/hfp_hf.c index 12196b360..420373b6a 100644 --- a/src/hfp_hf.c +++ b/src/hfp_hf.c @@ -271,7 +271,7 @@ void hfp_parse_indicators(hfp_connection_t * context, uint8_t *packet, uint16_t i = 0; break; case 3: // min-range - if (byte == ','){ + if (byte == ',' || byte == '-'){ state++; min_range[i] = 0; i = 0; diff --git a/test/pts/hfp_hf_test.c b/test/pts/hfp_hf_test.c index a8c56dc1c..0789a87b3 100644 --- a/test/pts/hfp_hf_test.c +++ b/test/pts/hfp_hf_test.c @@ -74,7 +74,7 @@ const char hfp_hf_service_name[] = "BTstack HF Test"; static bd_addr_t pts_addr = {0x00,0x1b,0xDC,0x07,0x32,0xEF}; static bd_addr_t local_mac = {0x04, 0x0C, 0xCE, 0xE4, 0x85, 0xD3}; - +static bd_addr_t phone = {0xD8,0xBb,0x2C,0xDf,0xF1,0x08}; // prototypes static void show_usage(); @@ -101,8 +101,8 @@ static int stdin_process(struct data_source *ds){ hfp_hf_connect(pts_addr); break; case 'e': - printf("Establishing HFP connection to local mac %s...\n", bd_addr_to_str(local_mac)); - hfp_hf_connect(local_mac); + printf("Establishing HFP connection to %s...\n", bd_addr_to_str(phone)); + hfp_hf_connect(phone); break; case 'd': printf("Releasing HFP connection.\n"); @@ -126,7 +126,7 @@ void packet_handler(uint8_t * event, uint16_t event_size){ int btstack_main(int argc, const char * argv[]){ // init L2CAP - uint8_t codecs[1] = {HFP_Codec_CSVD}; + uint8_t codecs[1] = {HFP_Codec_CVSD}; uint16_t indicators[1] = {0x01}; l2cap_init();