Re: ESP32 Bluetooth SPP with bidirectional communication (send and receive)
Posted: Mon Nov 18, 2019 10:08 am
If you are flashing this code, i am guessing it is just echoing received data:
https://docs.espressif.com/projects/esp ... TA_IND_EVT
Code: Select all
case ESP_SPP_DATA_IND_EVT:
#if (SPP_SHOW_MODE == SPP_SHOW_DATA)
ESP_LOGI(SPP_TAG, "ESP_SPP_DATA_IND_EVT len=%d handle=%d",
param->data_ind.len, param->data_ind.handle);
if (param->data_ind.len < 1023) {
snprintf(buf, (size_t)param->data_ind.len, (char *)param->data_ind.data);
printf("%s\n", buf);
sprintf(spp_data, "Receined characters: %d\n", param->data_ind.len);
esp_spp_write(param->write.handle, strlen(spp_data), (uint8_t *)spp_data);
}