void bta_hf_client_send_at_bia(void) { char *buf; int at_len; int i; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (bta_hf_client_cb.scb.peer_version < HFP_VERSION_1_6) { APPL_TRACE_DEBUG("Remote does not Support AT+BIA"); return; } buf = osi_malloc(BTA_HF_CLIENT_AT_MAX_LEN); if (buf == NULL) { APPL_TRACE_ERROR("No mem %s", __FUNCTION__); return; } at_len = snprintf(buf, BTA_HF_CLIENT_AT_MAX_LEN, "AT+BIA="); for (i = 0; i < BTA_HF_CLIENT_AT_INDICATOR_COUNT; i++) { int sup = bta_hf_client_cb.scb.at_cb.indicator_lookup[i] == -1 ? 0 : 1; at_len += snprintf(buf + at_len, BTA_HF_CLIENT_AT_MAX_LEN - at_len, "%u,", sup); } buf[at_len - 1] = '\r'; bta_hf_client_send_at(BTA_HF_CLIENT_AT_BIA, buf, at_len); osi_free(buf); }
void bta_hf_client_send_at_bia(void) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; int i; APPL_TRACE_DEBUG1("%s", __FUNCTION__); if (bta_hf_client_cb.scb.peer_version < HFP_VERSION_1_6) { APPL_TRACE_DEBUG0("Remote does not Support AT+BIA"); return; } at_len = snprintf(buf, sizeof(buf), "AT+BIA="); for(i = 0; i < BTA_HF_CLIENT_AT_INDICATOR_COUNT; i++) { int sup = bta_hf_client_cb.scb.at_cb.indicator_lookup[i] == -1 ? 0 : 1; at_len += snprintf(buf + at_len, sizeof(buf) - at_len, "%u,", sup); } buf[at_len - 1] = '\r'; if (at_len < 0) { APPL_TRACE_ERROR0("HFPClient: AT command Framing error"); return; } bta_hf_client_send_at(BTA_HF_CLIENT_AT_BIA, buf, at_len); }
void bta_hf_client_send_at_cnum(void) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); buf = "AT+CNUM\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_CNUM, buf, strlen(buf)); }
void bta_hf_client_send_at_chup(void) { char *buf; APPL_TRACE_DEBUG1("%s", __FUNCTION__); buf = "AT+CHUP\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_CHUP, buf, strlen(buf)); }
void bta_hf_client_send_at_nrec(void) { char *buf; APPL_TRACE_DEBUG1("%s", __FUNCTION__); buf = "AT+NREC=0\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_NREC, buf, strlen(buf)); }
void bta_hf_client_send_at_bcc(void) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); buf = "AT+BCC\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_BCC, buf, strlen(buf)); }
void bta_hf_client_send_at_bcs(UINT32 codec) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+BCS=%u\r", codec); bta_hf_client_send_at(BTA_HF_CLIENT_AT_BCS, buf, at_len); }
void bta_hf_client_send_at_brsf(void) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+BRSF=%u\r", bta_hf_client_cb.scb.features); bta_hf_client_send_at(BTA_HF_CLIENT_AT_BRSF , buf, at_len); }
void bta_hf_client_send_at_vts(char code) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+VTS=%c\r", code); bta_hf_client_send_at(BTA_HF_CLIENT_AT_VTS, buf, at_len); }
void bta_hf_client_send_at_binp(UINT32 action) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+BINP=%u\r", action); bta_hf_client_send_at(BTA_HF_CLIENT_AT_BINP, buf, at_len); }
void bta_hf_client_send_at_vgm(UINT32 volume) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+VGM=%u\r", volume); bta_hf_client_send_at(BTA_HF_CLIENT_AT_VGM, buf, at_len); }
void bta_hf_client_send_at_cops(BOOLEAN query) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (query) buf = "AT+COPS?\r"; else buf = "AT+COPS=3,0\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_COPS, buf, strlen(buf)); }
void bta_hf_client_send_at_cmee(BOOLEAN activate) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (activate) buf = "AT+CMEE=1\r"; else buf = "AT+CMEE=0\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_CMEE, buf, strlen(buf)); }
void bta_hf_client_send_at_bvra(BOOLEAN enable) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (enable) buf = "AT+BVRA=1\r"; else buf = "AT+BVRA=0\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_BVRA, buf, strlen(buf)); }
void bta_hf_client_send_at_ccwa(BOOLEAN activate) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (activate) { buf = "AT+CCWA=1\r"; } else { buf = "AT+CCWA=0\r"; } bta_hf_client_send_at(BTA_HF_CLIENT_AT_CCWA, buf, strlen(buf)); }
static void bta_hf_client_send_queued_at(void) { tBTA_HF_CLIENT_AT_QCMD *cur = bta_hf_client_cb.scb.at_cb.queued_cmd; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (cur != NULL) { bta_hf_client_cb.scb.at_cb.queued_cmd = cur->next; bta_hf_client_send_at(cur->cmd, cur->buf, cur->buf_len); osi_free(cur); } }
void bta_hf_client_send_at_bac(void) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (bta_hf_client_cb.msbc_enabled) { buf = "AT+BAC=1,2\r"; } else { buf = "AT+BAC=1\r"; } bta_hf_client_send_at(BTA_HF_CLIENT_AT_BAC, buf, strlen(buf)); }
void bta_hf_client_send_at_chld(char cmd, UINT32 idx) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (idx > 0) at_len = snprintf(buf, sizeof(buf), "AT+CHLD=%c%u\r", cmd, idx); else at_len = snprintf(buf, sizeof(buf), "AT+CHLD=%c\r", cmd); bta_hf_client_send_at(BTA_HF_CLIENT_AT_CHLD, buf, at_len); }
void bta_hf_client_send_at_vts(char code) { char *buf = osi_malloc(BTA_HF_CLIENT_AT_MAX_LEN); int at_len; if (buf == NULL) { APPL_TRACE_ERROR("No mem %s", __FUNCTION__); return; } APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, BTA_HF_CLIENT_AT_MAX_LEN, "AT+VTS=%c\r", code); bta_hf_client_send_at(BTA_HF_CLIENT_AT_VTS, buf, at_len); osi_free(buf); }
void bta_hf_client_send_at_nrec(void) { char *buf; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (!(bta_hf_client_cb.scb.peer_features & BTA_HF_CLIENT_PEER_FEAT_ECNR)) { APPL_TRACE_ERROR("%s: Remote does not support NREC.", __FUNCTION__); return; } buf = "AT+NREC=0\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_NREC, buf, strlen(buf)); }
void bta_hf_client_send_at_binp(UINT32 action) { char *buf = osi_malloc(BTA_HF_CLIENT_AT_MAX_LEN); int at_len; if (buf == NULL) { APPL_TRACE_ERROR("No mem %s", __FUNCTION__); return; } at_len = snprintf(buf, BTA_HF_CLIENT_AT_MAX_LEN, "AT+BINP=%u\r", action); bta_hf_client_send_at(BTA_HF_CLIENT_AT_BINP, buf, at_len); osi_free(buf); }
void bta_hf_client_send_at_cnum(void) { char *buf; APPL_TRACE_DEBUG1("%s", __FUNCTION__); if (!service_availability) { APPL_TRACE_DEBUG0("Skip AT+CNUM no Service"); return; } buf = "AT+CNUM\r"; bta_hf_client_send_at(BTA_HF_CLIENT_AT_CNUM, buf, strlen(buf)); }
void bta_hf_client_send_at_vgm(UINT32 volume) { char *buf = osi_malloc(BTA_HF_CLIENT_AT_MAX_LEN); int at_len; if (buf == NULL) { APPL_TRACE_ERROR("No mem %s", __FUNCTION__); return; } APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, BTA_HF_CLIENT_AT_MAX_LEN, "AT+VGM=%u\r", volume); bta_hf_client_send_at(BTA_HF_CLIENT_AT_VGM, buf, at_len); osi_free(buf); }
void bta_hf_client_send_at_vts(char code) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG1("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+VTS=%c\r", code); if (at_len < 0) { APPL_TRACE_ERROR0("HFPClient: AT command Framing error"); return; } bta_hf_client_send_at(BTA_HF_CLIENT_AT_VTS, buf, at_len); }
void bta_hf_client_send_at_binp(UINT32 action) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG1("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+BINP=%lu\r", action); if (at_len < 0) { APPL_TRACE_ERROR0("HFPClient: AT command Framing error"); return; } bta_hf_client_send_at(BTA_HF_CLIENT_AT_BINP, buf, at_len); }
void bta_hf_client_send_at_brsf(void) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG1("%s", __FUNCTION__); at_len = snprintf(buf, sizeof(buf), "AT+BRSF=%lu\r", bta_hf_client_cb.scb.features); if (at_len < 0) { APPL_TRACE_ERROR0("HFPClient: AT command Framing error"); return; } bta_hf_client_send_at(BTA_HF_CLIENT_AT_BRSF , buf, at_len); }
void bta_hf_client_send_at_brsf(void) { char *buf = osi_malloc(BTA_HF_CLIENT_AT_MAX_LEN); int at_len; if (buf == NULL) { APPL_TRACE_ERROR("No mem %s", __FUNCTION__); return; } APPL_TRACE_DEBUG("%s", __FUNCTION__); at_len = snprintf(buf, BTA_HF_CLIENT_AT_MAX_LEN, "AT+BRSF=%u\r", bta_hf_client_cb.scb.features); bta_hf_client_send_at(BTA_HF_CLIENT_AT_BRSF , buf, at_len); osi_free(buf); }
void bta_hf_client_send_at_cind(BOOLEAN status) { char *buf; tBTA_HF_CLIENT_AT_CMD cmd; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (status) { buf = "AT+CIND?\r"; cmd = BTA_HF_CLIENT_AT_CIND_STATUS; } else { buf = "AT+CIND=?\r"; cmd = BTA_HF_CLIENT_AT_CIND; } bta_hf_client_send_at(cmd, buf, strlen(buf)); }
void bta_hf_client_send_at_btrh(BOOLEAN query, UINT32 val) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (query == TRUE) { at_len = snprintf(buf, sizeof(buf), "AT+BTRH?\r"); } else { at_len = snprintf(buf, sizeof(buf), "AT+BTRH=%u\r", val); } bta_hf_client_send_at(BTA_HF_CLIENT_AT_BTRH, buf, at_len); }
void bta_hf_client_send_at_atd(char *number, UINT32 memory) { char buf[BTA_HF_CLIENT_AT_MAX_LEN]; int at_len; APPL_TRACE_DEBUG("%s", __FUNCTION__); if (number[0] != '\0') { at_len = snprintf(buf, sizeof(buf), "ATD%s;\r", number); } else { at_len = snprintf(buf, sizeof(buf), "ATD>%u;\r", memory); } bta_hf_client_send_at(BTA_HF_CLIENT_AT_ATD, buf, at_len); }