{"action":"created","issue":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/1773","repository_url":"https://api.github.com/repos/espressif/esp-idf","labels_url":"https://api.github.com/repos/espressif/esp-idf/issues/1773/labels{/name}","comments_url":"https://api.github.com/repos/espressif/esp-idf/issues/1773/comments","events_url":"https://api.github.com/repos/espressif/esp-idf/issues/1773/events","html_url":"https://github.com/espressif/esp-idf/issues/1773","id":308539735,"number":1773,"title":"[TW#19884] BT mic/speaker","user":{"login":"mingshima","id":32331703,"avatar_url":"https://avatars3.githubusercontent.com/u/32331703?v=4","gravatar_id":"","url":"https://api.github.com/users/mingshima","html_url":"https://github.com/mingshima","followers_url":"https://api.github.com/users/mingshima/followers","following_url":"https://api.github.com/users/mingshima/following{/other_user}","gists_url":"https://api.github.com/users/mingshima/gists{/gist_id}","starred_url":"https://api.github.com/users/mingshima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingshima/subscriptions","organizations_url":"https://api.github.com/users/mingshima/orgs","repos_url":"https://api.github.com/users/mingshima/repos","events_url":"https://api.github.com/users/mingshima/events{/privacy}","received_events_url":"https://api.github.com/users/mingshima/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-26T11:50:32Z","updated_at":"2018-05-04T03:24:55Z","closed_at":null,"author_association":"NONE","body":"Hi, all. I am trying to do a project of BT mic/speaker, I have tried spp examples, the spp initator collects the voice by using adc1_get_voltage(), and then transmit the data to the speaker, but it seems to work poorly. Each time, the mic send an array and the size is 10 or the other, and then the speaker receives the array and output each data, but the voice is not smooth, the sampling speed is about 1KHz, I think it's enough. Can anyone help me to find the reason or give some suggestion? Many thanks.\r\n\r\nthe mic\r\n```\r\nif (param->write.cong == 0) {\r\n\t\t\tfor (int i = 0; i < SPP_DATA_LEN; ++i) {\r\n\t\t\tint val = adc1_get_voltage(ADC1_CHANNEL_5);\r\n\t\t\tint output = val * 255 / 4095;\r\n\t\t\tspp_data[i] = output & 0xff;\r\n\t\t\t//printf(\"%5d\",spp_data[i]);\r\n\t\t\t}\r\n            esp_spp_write(param->write.handle, SPP_DATA_LEN, spp_data);\r\n        }\r\n```\r\nthe speaker\r\n```\r\nfor( int i = 0; i < param->data_ind.len; i++)\r\n\t\t{\r\n\t\t\tdac_out_voltage(DAC_CHANNEL_1, param->data_ind.data[i]);\r\n\t\t}\r\n\r\n```\r\nthe log of initiator\r\n```\r\nI (5648) SPP_INITIATOR_DEMO: ESP_SPP_WRITE_EVT len=10 cong=0\r\nI (5648) : 95 95 95 95 94 95 95 95 95 95\r\nI (5658) SPP_INITIATOR_DEMO: ESP_SPP_WRITE_EVT len=10 cong=0\r\nI (5658) : 95 95 95 96 95 95 96 95 95 94\r\nI (5668) SPP_INITIATOR_DEMO: ESP_SPP_WRITE_EVT len=10 cong=0\r\nI (5668) : 95 96 95 95 95 96 95 94 96 95\r\nI (5678) SPP_INITIATOR_DEMO: ESP_SPP_WRITE_EVT len=10 cong=0\r\nI (5678) : 95 96 95 95 90 96 96 95 90 95\r\nI (5688) SPP_INITIATOR_DEMO: ESP_SPP_WRITE_EVT len=10 cong=0\r\nI (5688) : 96 95 95 95 99 95 95 96 95 92\r\n```\r\n\r\nthe log of acceptor\r\n```\r\nI (326208) SPP_ACCEPTOR_DEMO: ESP_SPP_DATA_IND_EVT len=10 handle=129\r\nI (326208) : 97 97 97 97 97 97 97 97 97 97\r\nI (326218) SPP_ACCEPTOR_DEMO: ESP_SPP_DATA_IND_EVT len=10 handle=129\r\nI (326228) : 8f 97 97 97 97 97 97 97 97 96\r\nI (326228) SPP_ACCEPTOR_DEMO: ESP_SPP_DATA_IND_EVT len=10 handle=129\r\nI (326238) : 97 96 96 97 96 97 97 97 96 96\r\nI (326238) SPP_ACCEPTOR_DEMO: ESP_SPP_DATA_IND_EVT len=10 handle=129\r\nI (326248) : 9c 96 97 94 97 97 96 97 97 96\r\nI (326248) SPP_ACCEPTOR_DEMO: ESP_SPP_DATA_IND_EVT len=10 handle=129\r\nI (326258) : 96 95 97 96 95 96 96 96 9b 96\r\nI (326268) SPP_ACCEPTOR_DEMO: ESP_SPP_DATA_IND_EVT len=10 handle=129\r\nI (326268) : 96 96 97 96 96 96 96 96 96 96\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/comments/386497307","html_url":"https://github.com/espressif/esp-idf/issues/1773#issuecomment-386497307","issue_url":"https://api.github.com/repos/espressif/esp-idf/issues/1773","id":386497307,"user":{"login":"blueMoodBHD","id":34707939,"avatar_url":"https://avatars2.githubusercontent.com/u/34707939?v=4","gravatar_id":"","url":"https://api.github.com/users/blueMoodBHD","html_url":"https://github.com/blueMoodBHD","followers_url":"https://api.github.com/users/blueMoodBHD/followers","following_url":"https://api.github.com/users/blueMoodBHD/following{/other_user}","gists_url":"https://api.github.com/users/blueMoodBHD/gists{/gist_id}","starred_url":"https://api.github.com/users/blueMoodBHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueMoodBHD/subscriptions","organizations_url":"https://api.github.com/users/blueMoodBHD/orgs","repos_url":"https://api.github.com/users/blueMoodBHD/repos","events_url":"https://api.github.com/users/blueMoodBHD/events{/privacy}","received_events_url":"https://api.github.com/users/blueMoodBHD/received_events","type":"User","site_admin":false},"created_at":"2018-05-04T03:24:55Z","updated_at":"2018-05-04T03:24:55Z","author_association":"CONTRIBUTOR","body":"Hi, @mingshima Does it work well, now?"}}
{"actor":{"display_login":"blueMoodBHD"}}