Datasheet
Output: None
AT+GAPSTOPADV
OK
AT+GAPSETADVDATA
Sets the raw advertising data payload to the specified byte array (overriding the normal advertising data), following the
guidelines in the Bluetooth 4.0 or 4.1 Core Specification (https://adafru.it/ddd).
In particular, Core Specification Supplement (CSS) v4 contains the details on common advertising data fields like
'Flags' (Part A, Section 1.3) and the various Service UUID lists (Part A, Section 1.1). A list of all possible GAP Data Types
is available on the Bluetooth SIG's Generic Access Profile (https://adafru.it/cYs) page.
The Advertising Data payload consists of Generic Access Profile (https://adafru.it/cYs) data that is inserted into the
advertising packet in the following format: [U8:LEN] [U8:Data Type Value] [n:Value]
For example, to insert the 'Flags' Data Type (Data Type Value 0x01), and set the value to 0x06/0b00000110 (BR/EDR
Not Supported and LE General Discoverable Mode) we would use the following byte array:
02-01-06
0x02 indicates the number of bytes in the entry
0x01 is the 'Data Type Value (https://adafru.it/cYs)' and indicates that this is a 'Flag'
0x06 (0b00000110) is the Flag value, and asserts the following fields (see Core Specification 4.0, Volume 3, Part
C, 18.1):
LE General Discoverable Mode (i.e. anyone can discover this device)
BR/EDR Not Supported (i.e. this is a Bluetooth Low Energy only device)
If we also want to include two 16-bit service UUIDs in the advertising data (so that listening devices know that we
support these services) we could append the following data to the byte array:
05-02-0D-18-0A-18
WARNING: This command requires a degree of knowledge about the low level details of the Bluetooth 4.0 or
4.1 Core Specification, and should only be used by expert users. Misuse of this command can easily cause
your device to be undetectable by central devices in radio range.
WARNING: This command will override the normal advertising payload and may prevent some services from
acting as expected.
To restore the advertising data to the normal default values use the AT+FACTORYRESET command.
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le Page 131 of 211










