This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Trouble adding descriptors to characteristics

I'm in the process off trying to learn the world of BLE.  Currently, I'm using nRF Connect for Desktop (w/USB dongle) as the learning platform.  Using 'Server Setup' I configure different services and characteristics, advertise them, and connect to nRF Connect on my Android phone to interact.  I have configured both a Battery Service and a Current Time Service just fine.  I am in the process of trying to set up a custom service.  I have defined the service with a single characteristic (read/notify) along with an associated CCCD (for notify).  This configuration interacts with the Adroid phone as expected.

Here is where I have a problem.  I am trying to add additional descriptors to the characteristic of my custom service, but nRF Connect Desktop keeps giving me errors.  For instance, if I try to add a CPFD (2904) and activate the profile, I get Error: Error occured when adding descriptor. Errorcode: NRF_ERROR_FORBIDDEN (0xf).  If I try to add a a CUDD(2901) and activate, I am rewarded with Error occurred adding characteristic. (NRF_ERROR_INVALID_PARAM).

Is a CCCD the only valid descriptor you can add to a custom characteristic?  Maybe I just haven't figured out the magic values to enter into the dialog boxes that will make it work.  Can someone provide examples (I have yet to find any)?  I've attach the server configuration file I have created in case you want to look at it.

Thanks,

Steve

{
	"selectedComponent": "local.server.10.11",
	"showingDeleteDialog": false,
	"showingApplyDialog": false,
	"showingClearDialog": false,
	"showingDiscardDialog": false,
	"children": {
		"local.server.1": {
			"instanceId": "local.server.1",
			"uuid": "1800",
			"name": "Generic Access",
			"expanded": false,
			"discoveringChildren": false,
			"children": {
				"local.server.1.1": {
					"instanceId": "local.server.1.1",
					"uuid": "2A00",
					"name": "Device Name",
					"value": [80, 105, 99, 107, 108, 101, 115, 50],
					"properties": {
						"broadcast": false,
						"read": true,
						"write": false,
						"notify": false,
						"indicate": false
					},
					"readPerm": "open",
					"writePerm": "open",
					"fixedLength": false,
					"maxLength": 20,
					"expanded": true,
					"discoveringChildren": false,
					"children": {},
					"errorMessage": null
				},
				"local.server.1.2": {
					"instanceId": "local.server.1.2",
					"uuid": "2A01",
					"name": "Appearance",
					"value": [0, 0],
					"properties": {
						"read": true
					},
					"readPerm": "open",
					"writePerm": "open",
					"fixedLength": false,
					"maxLength": 20,
					"expanded": true,
					"discoveringChildren": false,
					"children": {},
					"errorMessage": null
				},
				"local.server.1.3": {
					"instanceId": "local.server.1.3",
					"uuid": "2A04",
					"name": "Peripheral Preferred Connection Parameters",
					"value": [255, 255, 255, 255, 0, 0, 255, 255],
					"properties": {
						"read": true
					},
					"readPerm": "open",
					"writePerm": "open",
					"fixedLength": false,
					"maxLength": 20,
					"expanded": true,
					"discoveringChildren": false,
					"children": {},
					"errorMessage": null
				}
			}
		},
		"local.server.2": {
			"instanceId": "local.server.2",
			"uuid": "1801",
			"name": "Generic Attribute",
			"expanded": false,
			"discoveringChildren": false,
			"children": {}
		},
		"local.server.4": {
			"instanceId": "local.server.4",
			"uuid": "180F",
			"name": "Battery Service",
			"expanded": true,
			"discoveringChildren": false,
			"children": {
				"local.server.4.5": {
					"instanceId": "local.server.4.5",
					"uuid": "2A19",
					"name": "Battery Level",
					"value": [97],
					"properties": {
						"broadcast": false,
						"read": true,
						"write": false,
						"notify": true,
						"indicate": false
					},
					"readPerm": "open",
					"writePerm": "open",
					"fixedLength": true,
					"maxLength": 1,
					"expanded": true,
					"discoveringChildren": false,
					"children": {
						"local.server.4.5.6": {
							"instanceId": "local.server.4.5.6",
							"uuid": "2902",
							"name": "Client Characteristic Configuration",
							"value": [],
							"readPerm": "open",
							"writePerm": "open",
							"fixedLength": false,
							"maxLength": 20,
							"errorMessage": null
						}
					},
					"errorMessage": null
				}
			}
		},
		"local.server.7": {
			"instanceId": "local.server.7",
			"uuid": "1805",
			"name": "Current Time Service",
			"expanded": true,
			"discoveringChildren": false,
			"children": {
				"local.server.7.8": {
					"instanceId": "local.server.7.8",
					"uuid": "2A2B",
					"name": "Current Time",
					"value": [227, 7, 1, 7, 11, 30, 2, 1, 64, 0],
					"properties": {
						"broadcast": false,
						"read": true,
						"write": true,
						"notify": true,
						"indicate": false
					},
					"readPerm": "open",
					"writePerm": "open",
					"fixedLength": false,
					"maxLength": 20,
					"expanded": false,
					"discoveringChildren": false,
					"children": {
						"local.server.7.8.9": {
							"instanceId": "local.server.7.8.9",
							"uuid": "2902",
							"name": "Client Characteristic Configuration",
							"value": [],
							"readPerm": "open",
							"writePerm": "open",
							"fixedLength": false,
							"maxLength": 20,
							"errorMessage": null
						}
					},
					"errorMessage": null
				}
			}
		},
		"local.server.10": {
			"instanceId": "local.server.10",
			"uuid": "00000001F2808EB211E8FE53A5B0F99E",
			"name": "New Service",
			"expanded": true,
			"discoveringChildren": false,
			"children": {
				"local.server.10.11": {
					"instanceId": "local.server.10.11",
					"uuid": "00000002F2808EB211E8FE53A5B0F99E",
					"name": "Battery Voltage (mv)",
					"value": [196, 11],
					"properties": {
						"broadcast": false,
						"read": true,
						"write": false,
						"notify": true,
						"indicate": false
					},
					"readPerm": "open",
					"writePerm": "open",
					"fixedLength": false,
					"maxLength": 20,
					"expanded": true,
					"discoveringChildren": false,
					"children": {
						"local.server.10.11.12": {
							"instanceId": "local.server.10.11.12",
							"uuid": "2902",
							"name": "Client Characteristic Configuration",
							"value": [],
							"readPerm": "open",
							"writePerm": "open",
							"fixedLength": false,
							"maxLength": 20,
							"errorMessage": null
						},
						"local.server.10.11.13": {
							"instanceId": "local.server.10.11.13",
							"uuid": "2904",
							"name": "Characteristic Presentation Format",
							"value": [6, 253, 0, 0, 0, 0, 0],
							"readPerm": "open",
							"writePerm": "open",
							"fixedLength": false,
							"maxLength": 20,
							"errorMessage": null
						},
						"local.server.10.11.14": {
							"instanceId": "local.server.10.11.14",
							"uuid": "2901",
							"name": "Characteristic User Description",
							"value": [72, 101, 108, 108, 111],
							"readPerm": "open",
							"writePerm": "open",
							"fixedLength": false,
							"maxLength": 20,
							"errorMessage": null
						}
					},
					"errorMessage": null
				}
			}
		}
	}
}

Parents Reply Children
No Data
Related