Datasheet

SDEP Data Transactions
Either connected device can initiate SDEP transactions, though certain transport protocols imposes restrictions on who
can initiate a transfer. The master device, for example, always initiates transactions with Bluetooth Low Energy or USB,
meaning that slave devices can only reply to incoming commands.
Every device that receives a
Command Message
must reply with a
Response Message
,
Error Message
or
Alert
message
.
Message Types
Command Messages
Command messages (Message Type = 0x10) have the following structure:
Command ID (bytes 1-2) and Payload Length (byte 3) are mandatory in any command message. The message payload
is optional, and will be ignored if Payload Length is set to 0 bytes. When a message payload is present, it’s length can
be anywhere from 1..16 bytes, to stay within the 20-byte maximum message length.
A long command (>16 bytes payload) must be divided into multiple packets. To facilitate this, the More data field (bit 7
of byte 3) is used to indicate whether additional packets are available for the same command. The SDEP receiver must
continue to reads packets until it finds a packet with More data == 0, then assemble all sub-packets into one command
if necessary.
The contents of the payload are user defined, and can change from one command to another.
A sample command message would be:
10 34 12 01 FF
Message Type
Command
Response
Alert
Error
ID (U8)
0x10
0x20
0x40
0x80
Name
Message Type
Command ID
Payload Length
Payload
Type
U8
U16
U8
...
Meaning
Always '0x10'
Unique Command Identifier
[7] More data
[6-5] Reserved
[4-0] Payload length (0..16)
Optional command payload (parameters, etc.)
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le Page 156 of 211