You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
754 B

3 years ago
3 years ago
3 years ago
3 years ago
  1. #include "esp_gatts_api.h"
  2. #include "esp_log.h"
  3. #include "esp_system.h"
  4. #include "freertos/FreeRTOS.h"
  5. #include "freertos/event_groups.h"
  6. #include "freertos/task.h"
  7. #include "nvs_flash.h"
  8. #include "string.h"
  9. //
  10. #include "ble_spp_server_demo.h"
  11. uint16_t table_conn_id_m;
  12. esp_gatt_if_t table_gatts_if_m;
  13. uint16_t table_handle_m;
  14. void app_main(void) {
  15. ble_spp_server_demo_app_main(&table_conn_id_m, &table_gatts_if_m, &table_handle_m);
  16. // table_conn_id_m =
  17. // char temp_buffer[5] = {'1', '2', '3', '4', '5'};
  18. // while (true) {
  19. // if (table_handle_m != 0) {
  20. // ets_delay_us(1000000);
  21. // esp_ble_gatts_send_indicate(table_gatts_if_m, table_conn_id_m, table_handle_m, 5, (uint8_t *)temp_buffer, false);
  22. // }
  23. // }
  24. return;
  25. }