5.4.3.2 Define Service Characteristic or Set Proprietary Characteristics
| Firmware Version 1.0 | Firmware Version 1.2 and Later |
|---|---|
PC,<hex16/hex128>,<hex8>,<hex8> |
|
Note: All firmware version 1.0 syntax remains valid in version 1.2 and later. | |
The PC or SPC command sets private characteristics. It expects three parameters:
- The first parameter is a 16-bit UUID for public characteristics or a 128-bit UUID for private characteristics. There are many ways to generate a 128-bit UUID with little possibility of conflict. For more details on UUID, refer to the Universally Unique Identifier (UUID).
- The second parameter is an 8-bit property bitmap of the characteristics. For more details on the characteristic property, see Table 9-1.
- The third parameter is an 8-bit value that indicates the maximum data size in octet that holds the value of the characteristics.
- An optional parameter in the last is an 8-bit permission bitmap to request extra permission when remote device accesses it. Refer to Appendix A. Bluetooth Low Energy
Fundamentals for more details. The basic read/write permission will be enabled automatically upon the characteristic property. Users can request extra permissions for each characteristic but the security setting of local RNBD set by
SAcommand shall be considered. This parameter is supported in RNBD350 v1.2 and later.Note: Size Limitation: The maximum size for data in the custom characteristics is 127 bytes.
The user must call command PC or SPC after the service UUID is set by command PS. For more details on command PS, refer to Define Service UUID or Set Proprietary
Service. If service UUID is set to be a 16-bit public UUID in command PS or SPS, the UUID input parameter for command PC or SPC must also be a 16-bit public UUID. In addition, if the service UUID is set to be a 128-bit private UUID by command PS or SPS, then the UUID input parameter must also be a 128-bit private UUID by command PC or SPC . The user issues this command to add the characteristic to the service one by one until the characteristic is defined.
The RNBD350 module supports up to four private services with eight characteristics for each service and six public services with eight characteristics for each service.
| Item | Firmware Version 1.0 and Later | Description |
|---|---|---|
| Example: | PC,11223344556677889900AABBCCDDEEFF,1A,05 | Define a private characteristic with UUID 0x11223344556677889900AABBCCDDEEFF. It is readable, writable and can perform notification. Maximum data size for this characteristic is five octets. |
| Response: | AOK | Success |
Err | Syntax error, invalid parameter or not enough space to add new characteristics | |
Note: The PDS stores the defined services. The defined services are effective immediately. | ||
| Item | Firmware Version 1.2 and Later | Description |
|---|---|---|
| Example: | SPC,11223344556677889900AABBCCDDEEFF,1A,05 | Define a private characteristic with UUID 0x11223344556677889900AABBCCDDEEFF. It is readable, writable and can perform notification. Maximum data size for this characteristic is five octets. |
| Response: | AOK | Success |
Err | Syntax error, invalid parameter or not enough space to add new characteristics | |
Note: The PDS stores the defined services. The defined services are effective immediately. | ||
