Hello,
Im using the ESP32-C3 dev kit and running the example (without any changes) ESP-IDF Gatt Server Demo located here:
https://github.com/espressif/esp-idf/bl ... tts_demo.c
The result is that the advertised services are duplicated and there are no characteristics to read. Is there something wrong with this example project? Does anyone know how to fix this and get the correct number of services reported and ability to read characteristics?
ESP-IDF Gatt Server Demo Not Functional
Re: ESP-IDF Gatt Server Demo Not Functional
Update:
The example code works on ESP32-WROOM-32D chip, however the advertised services is still incorrect.
Summary of issues:
1) Advertised services are duplicated on ESP32-WROOM-32D and ESP32-C3 Dev kit board
2) Reading characteristics does not work when running on the ESP32-C3 Dev kit
Thank you
The example code works on ESP32-WROOM-32D chip, however the advertised services is still incorrect.
Summary of issues:
1) Advertised services are duplicated on ESP32-WROOM-32D and ESP32-C3 Dev kit board
2) Reading characteristics does not work when running on the ESP32-C3 Dev kit
Thank you
Re: ESP-IDF Gatt Server Demo Not Functional
Update 2:
Apparently PlatformIO is using an older version of the esp-idf sdk. The latest version works however the advertised services count is doubled.
I dont know why, but changing line 71 second value from 0x03 to 0x01 fixes the count issue. If anyone knows where to find the format of the advertising data please let me know.
static uint8_t raw_adv_data[] = {
66 /* flags */
67 0x02, 0x01, 0x06,
68 /* tx power*/
69 0x02, 0x0a, 0xeb,
70 /* service uuid */
71 0x03, 0x01, 0xFF, 0x00,
72 /* device name */
73 0x0f, 0x09, 'E', 'S', 'P', '_', 'G', 'A', 'T', 'T', 'S', '_', 'D','E', 'M', 'O'
74 };
75 static uint8_t raw_scan_rsp_data[] = {
76 /* flags */
77 0x02, 0x01, 0x06,
78 /* tx power */
79 0x02, 0x0a, 0xeb,
80 /* service uuid */
81 0x03, 0x03, 0xFF,0x00
82 };
Apparently PlatformIO is using an older version of the esp-idf sdk. The latest version works however the advertised services count is doubled.
I dont know why, but changing line 71 second value from 0x03 to 0x01 fixes the count issue. If anyone knows where to find the format of the advertising data please let me know.
static uint8_t raw_adv_data[] = {
66 /* flags */
67 0x02, 0x01, 0x06,
68 /* tx power*/
69 0x02, 0x0a, 0xeb,
70 /* service uuid */
71 0x03, 0x01, 0xFF, 0x00,
72 /* device name */
73 0x0f, 0x09, 'E', 'S', 'P', '_', 'G', 'A', 'T', 'T', 'S', '_', 'D','E', 'M', 'O'
74 };
75 static uint8_t raw_scan_rsp_data[] = {
76 /* flags */
77 0x02, 0x01, 0x06,
78 /* tx power */
79 0x02, 0x0a, 0xeb,
80 /* service uuid */
81 0x03, 0x03, 0xFF,0x00
82 };
Who is online
Users browsing this forum: No registered users and 107 guests