Get data for GATT write Characteristic in server mode

kimbap
Posts: 1
Joined: Wed Apr 17, 2024 1:19 am

Get data for GATT write Characteristic in server mode

Postby kimbap » Wed Apr 17, 2024 2:04 am

Hello.
I'm using ESP32-wroom-32D to test the BLE server mode of ESP-AT.
I want to see what data was written in the GATT write Characteristic.
When I look up the data, it says to use AT+BLEGATTCRD, but when I use the command, it only returns an error.
I'm using the 'ESP32-WROOM-32-AT-V3.2.0.0'.

Image

For UUID C302,It's write Characteristic.

The following is my command procedure.

AT+BLEINIT=2

OK
AT+BLEGATTSSRVCRE

OK
AT+BLEGATTSSRVSTART

OK
AT+BLEGATTSCHAR?
+BLEGATTSCHAR:"char",1,1,0xC300,0x02
+BLEGATTSCHAR:"desc",1,1,1,0x2901
+BLEGATTSCHAR:"char",1,2,0xC301,0x02
+BLEGATTSCHAR:"desc",1,2,1,0x2901
+BLEGATTSCHAR:"char",1,3,0xC302,0x08
+BLEGATTSCHAR:"desc",1,3,1,0x2901
+BLEGATTSCHAR:"char",1,4,0xC303,0x04
+BLEGATTSCHAR:"desc",1,4,1,0x2901
+BLEGATTSCHAR:"char",1,5,0xC304,0x08
+BLEGATTSCHAR:"char",1,6,0xC305,0x10
+BLEGATTSCHAR:"desc",1,6,1,0x2902
+BLEGATTSCHAR:"char",1,7,0xC306,0x20
+BLEGATTSCHAR:"desc",1,7,1,0x2902
+BLEGATTSCHAR:"char",1,8,0xC307,0x02
+BLEGATTSCHAR:"desc",1,8,1,0x2901
+BLEGATTSCHAR:"char",2,1,0xC400,0x02
+BLEGATTSCHAR:"desc",2,1,1,0x2901
+BLEGATTSCHAR:"char",2,2,0xC401,0x02
+BLEGATTSCHAR:"desc",2,2,1,0x2901

OK
AT+BLEADVSTART

OK
+BLECONN:0,"f6:28:21:5d:94:1d"
AT+GMR
AT version:3.2.0.0(s-ec2dec2 - ESP32 - Jul 28 2023 07:05:28)
SDK version:v5.0.2-376-g24b9d38a24-dirty
compile time(6118fc22):Jul 28 2023 09:47:28
Bin version:v3.2.0.0(WROOM-32)

OK
AT+BLEGATTCRD=0,1,3,

ERROR
AT+BLEGATTCRD=0,1,3

ERROR


Next is the github link that has similar problems to mine.

https://github.com/espressif/esp-at/issues/460
https://github.com/espressif/esp-at/issues/484


What is the command to know what value written for UUID C302?

thank you.

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: Get data for GATT write Characteristic in server mode

Postby ESP_Sun » Tue Jul 02, 2024 7:21 am

Maybe you can refer to this document. The attribute value 0xC302 is 0x08, representing WRITE Permission, which cannot be read.
Screenshot from 2024-07-02 15-20-48.png
Screenshot from 2024-07-02 15-20-48.png (15.76 KiB) Viewed 3877 times

Who is online

Users browsing this forum: No registered users and 14 guests