Datasheet

Page 133 of 161
nRF8001 Product Specification
Revision 1.2
25 Data commands
Data commands are commands that either aim to transfer, or receive, application data when nRF8001 is in
a connected state with a peer device.
25.1 SetLocalData (0x0D)
SetLocalData sets a local Characteristic Value or Characteristic Descriptor.
25.1.1 Functional description
The SetLocalData command is used to set data stored in the local server (Server) through the
associated service pipe. For local transmit pipes, this command does not trigger a Handle Value
Notification or Handle Value Indication to the peer device.
See the operating mode during which this command can be used in Table 32. on page 92
. The command
will return a Command Response Event with status ACI_STATUS_ERROR_DEVICE_STATE_INVALID
when it is used in the incorrect mode.
25.1.2 Message format
Table 74.ACI message structure for SetLocalData
25.1.3 Accepted values
Table 75. Accepted values for parameters, SetLocalData
25.1.4 Returned events
This command returns a CommandResponseEvent. Data returned in the event is:
Command code:
SetLocalData
Status: Success / Status code
Response data: None
Message field/parameter
Value size
(bytes)
Data value Description
Header
Length 1 2..22 Packet length
Command 1 0x0D
SetLocalData
Content
ServicePipeNumber
1 ID of the service transmit pipe
through which the data is set
Data 0..20 Application data
Parameter Data value Description
ServicePipeNumber
1..62 One of the available ServicePipeNumbers identified
in the
PipeStatusEvent
Data The data payload size must not exceed the
maximum length defined in the local server (Server)
(Limited to a maximum of 20 bytes in length)