Vendor Descriptors on Custom BLE GATT Service

froghorn
Posts: 5
Joined: Thu Feb 18, 2021 10:18 pm

Vendor Descriptors on Custom BLE GATT Service

Postby froghorn » Thu Feb 18, 2021 10:54 pm

Hello, I've been trying to set up my own BLE GATT service. I've managed to work my way through the existing documentation with some effort and get things working (almost). I'm able to successfully use my custom service and characteristics, but for some reason my custom descriptor is not showing.

Here is my BLE configuration:

Code: Select all

index,uuid_len,uuid,perm,val_max_len,val_cur_len,value
0,16,0x2800,0x1,2,2,180A
1,16,0x2803,0x1,1,1,2
2,16,0x2A29,0x1,16,10,5865766f2c20496e632e
3,16,0x2803,0x1,1,1,2
4,16,0x2A26,0x1,16,6,76302e302e31
5,16,0x2800,0x1,16,16,338586FB4CAB422A87C479CFD0B2D2D2
6,16,0x2803,0x1,1,1,10
7,128,0x338586FC4CAB422A87C479CFD0B2D2D2,0x1,9,0,
8,128,0x338586FE4CAB422A87C479CFD0B2D2D2,0x1,1,1,0
9,16,0x2902,0x11,2,2,0000
10,16,0x2803,0x1,1,1,10
11,128,0x338586FC4CAB422A87C479CFD0B2D2D2,0x1,9,0,
12,128,0x338586FE4CAB422A87C479CFD0B2D2D2,0x1,1,1,0
13,16,0x2902,0x11,2,2,0000
14,16,0x2803,0x1,1,1,10
15,128,0x338586FD4CAB422A87C479CFD0B2D2D2,0x1,9,0,
16,128,0x338586FE4CAB422A87C479CFD0B2D2D2,0x1,1,1,0
17,16,0x2902,0x11,2,2,0000
And here are my commands:

Code: Select all

ready
AT

OK
AT+BLEINIT=2

OK
AT+BLEGATTSSRVCRE

OK
AT+BLEGATTSSRV?
+BLEGATTSSRV:1,0,0x180A,1
+BLEGATTSSRV:2,0,0x338586FB4CAB422A87C479CFD0B2D2D2,1

OK
AT+BLEGATTSCHAR?
+BLEGATTSCHAR:"char",1,1,0x2A29,0x02
+BLEGATTSCHAR:"char",1,2,0x2A26,0x02
+BLEGATTSCHAR:"char",2,1,0x338586FC4CAB422A87C479CFD0B2D2D2,0x10
+BLEGATTSCHAR:"char",2,2,0x338586FC4CAB422A87C479CFD0B2D2D2,0x10
+BLEGATTSCHAR:"char",2,3,0x338586FD4CAB422A87C479CFD0B2D2D2,0x10

OK
Above, we can see the descriptors specified in the CSV: three 0x2902 (CCCD) and three 0x338586FE4CAB422A87C479CFD0B2D2D2 (my custom descriptor). When I connect to the device via an Android Tablet, I'm able to see all three characteristics and the CCCD for each. However, my custom descriptor is not present.

If I remove my custom descriptors from the CSV but leave the CCCD descriptors, I see an improvement:

Code: Select all

AT+BLEGATTSCHAR?
+BLEGATTSCHAR:"char",1,1,0x2A29,0x02
+BLEGATTSCHAR:"char",1,2,0x2A26,0x02
+BLEGATTSCHAR:"char",2,1,0x338586FC4CAB422A87C479CFD0B2D2D2,0x10
+BLEGATTSCHAR:"desc",2,1,1,0x2902
+BLEGATTSCHAR:"char",2,2,0x338586FC4CAB422A87C479CFD0B2D2D2,0x10
+BLEGATTSCHAR:"desc",2,2,1,0x2902
+BLEGATTSCHAR:"char",2,3,0x338586FD4CAB422A87C479CFD0B2D2D2,0x10
+BLEGATTSCHAR:"desc",2,3,1,0x2902
I also tried changing the first instance of my custom descriptor to 0x2901 (Characteristic User Description). When I do this, AT=BLEGATTSCHAR? reports 0x2901 and 0x2902 descriptors on the first characteristic, then none for the rest.

This would seem to indicate to me that something is going wrong while processing my custom descriptors. It seems processing my custom descriptor also prevents it from properly processing subsequent SIG descriptors correctly (though not entirely, since the clien still reports the, it's just that the server won't show them via the AT command). Are vendor descriptors not supported?

froghorn
Posts: 5
Joined: Thu Feb 18, 2021 10:18 pm

Re: Vendor Descriptors on Custom BLE GATT Service

Postby froghorn » Wed Mar 03, 2021 10:52 pm

Bump. Does anyone have any info on whether or not 128-bit descriptors are supported by ESP-AT?

froghorn
Posts: 5
Joined: Thu Feb 18, 2021 10:18 pm

Re: Vendor Descriptors on Custom BLE GATT Service

Postby froghorn » Wed Jun 02, 2021 6:46 pm

Another bump. I would really appreciate a response from EspressIf at the very least confirming that the issue exists in the closed-source firmware.

froghorn
Posts: 5
Joined: Thu Feb 18, 2021 10:18 pm

Re: Vendor Descriptors on Custom BLE GATT Service

Postby froghorn » Tue Oct 05, 2021 11:15 pm

Bump again

chegewara
Posts: 2230
Joined: Wed Jun 14, 2017 9:00 pm

Re: Vendor Descriptors on Custom BLE GATT Service

Postby chegewara » Wed Oct 06, 2021 3:33 am

I am still learning BLE, but i think there is no such thing like vendor/custom descriptor.
Here is list allowed descriptor UUIDs:
GATT Descriptor 0x2900 Characteristic Extended Properties
GATT Descriptor 0x2901 Characteristic User Description
GATT Descriptor 0x2902 Client Characteristic Configuration
GATT Descriptor 0x2903 Server Characteristic Configuration
GATT Descriptor 0x2904 Characteristic Presentation Format
GATT Descriptor 0x2905 Characteristic Aggregate Format
GATT Descriptor 0x2906 Valid Range
GATT Descriptor 0x2907 External Report Reference
GATT Descriptor 0x2908 Report Reference
GATT Descriptor 0x2909 Number of Digitals
GATT Descriptor 0x290A Value Trigger Setting
GATT Descriptor 0x290B Environmental Sensing Configuration
GATT Descriptor 0x290C Environmental Sensing Measurement
GATT Descriptor 0x290D Environmental Sensing Trigger Setting
GATT Descriptor 0x290E Time Trigger Setting
GATT Descriptor 0x290F Complete BR-EDR Transport Block Data
Page 21:
https://btprodspecificationrefs.blob.co ... cument.pdf

froghorn
Posts: 5
Joined: Thu Feb 18, 2021 10:18 pm

Re: Vendor Descriptors on Custom BLE GATT Service

Postby froghorn » Wed Oct 06, 2021 8:17 am

chegewara wrote: i think there is no such thing like vendor/custom descriptor.
I believe this to be incorrect.

From Bluetooth Core Spec Part G Section 3.3.3:
The GATT profile defines a standard set of characteristic
descriptors that can be used by higher layer profiles. Higher layer profiles may
define additional characteristic descriptors that are profile specific. Each
characteristic descriptor is identified by the characteristic descriptor UUID. A
client shall support the use of both 16-bit and 128-bit characteristic descriptor
UUIDs
I've defined my own BLE GATT profile and therefore I may define additional profile-specific 128-bit characteristic descriptors. However, ESP-AT does not seem to support these. I am, however, able to use these custom descriptors on Android devices without issue.

chegewara
Posts: 2230
Joined: Wed Jun 14, 2017 9:00 pm

Re: Vendor Descriptors on Custom BLE GATT Service

Postby chegewara » Wed Oct 06, 2021 8:28 am

Thanks for that info, like i said, with all my knowledge i am still learning BLE.

Who is online

Users browsing this forum: No registered users and 137 guests