1BLUETOOTHCTL-ADVERTISE(1) Linux System AdministrationBLUETOOTHCTL-ADVERTISE(1)
2
3
4
6 bluetoothctl-advertise - Advertise Submenu
7
9 bluetoothctl [--options] [advertise.commands]
10
12 uuids
13 Set/Get advertise uuids.
14
15 Usage # uuids [all/uuid1 uuid2 ...]
16
17 Example
18 # uuids 0x1234
19
20 Example
21 # uuids 0x12345678
22
23 Example
24 # uuids 90f95193-35de-4306-a6e9-699328f15059
25
26 service
27 Set/Get advertise service data.
28
29 Usage # service [uuid] [data=xx xx ...]
30
31 manufacturer
32 Set/Get advertise manufacturer data.
33
34 Updating is in real time while advertising. This is currently limited
35 to 25 bytes and will return an error message of "Too much data" if that
36 maximum has been exceeded. However, this does not check if the adver‐
37 tising payload length maximum has been exceeded so you may receive an
38 error from bluetoothd that it "Failed to register advertisement" which
39 means you need to reduce your manufacturer data length.
40
41 Usage # manufacturer [id] [data=xx xx ...]
42
43 data
44 Set/Get advertise data.
45
46 This allows you to advertise data with a given type. You cannot use a
47 registered data type value {1} with this command. For LE the advertis‐
48 ing shows up in the primary advertisements.
49
50 If you set only the type of the data without any data (data 0x0c) this
51 will cause a parse error when turning advertise on.
52
53 You can modify the advertising data while it is advertising.
54
55 To get the currently set data use the command data without any argu‐
56 ments.
57
58 Usage # data [type] [data=xx xx ...]
59
60 Example
61 # data 0x0C 01 0x0F 13
62
63 discoverable
64 Set/Get advertise discoverable.
65
66 For LE discoverable on will set the LE General Discoverable Mode flag
67 to true in the primary advertisement if on.
68
69 This feature can be changed during advertising, but will only trigger
70 LE General Discoverable Mode even if you had previously selected dis‐
71 coverable-timeout this will be ignored.
72
73 Entering the command by itself will show the status of the setting
74
75 Usage # discoverable [on/off]
76
77 discoverable-timeout
78 Set/Get advertise discoverable timeout.
79
80 Using this feature in LE will cause the LE Limited Discoverable Mode
81 flag to be set in the primary advertisement and The LE General Dis‐
82 coverable Mode flag will not be set.
83
84 The LE Limited Discoverable Mode flag will automatically turn off after
85 [seconds] discoverable [on] must be set to use this feature.
86
87 Entering the command by itself will show the current value set.
88
89 Usage # discoverable-timeout [seconds]
90
91 tx-power
92 Show/Enable/Disable TX power to be advertised.
93
94 This sets the TX Power Level field in the advertising packet.
95
96 The value is in dBm and can be between -127 and 127.
97
98 When this feature is turned on the LE device will advertise its trans‐
99 mit power in the primary advertisement.
100
101 This feature can be modified while advertising.
102
103 Entering the command by itself will show the current value set.
104
105 Usage # tx-power [on/off] [power]
106
107 name
108 Configure local name to be advertised.
109
110 Local name to be used in the advertising report.
111
112 If the string is too big to fit into the packet it will be truncated.
113
114 It will either advertise as a complete local name or if it has to be
115 truncated then a shortened local name.
116
117 Usage # name [on/off/name]
118
119 Example
120 # name "0123456789abcdef0123456789abcdef"
121
122 appearance
123 Configure custom appearance to be advertised.
124
125 Usage # appearance [on/off/value]
126
127 duration
128 Set/Get advertise duration.
129
130 The Duration parameter configures the length of an Instance.
131
132 The value is in seconds.
133
134 A value of 0 indicates a default value is chosen for the Duration.
135
136 The default is 2 seconds.
137
138 If only one advertising Instance has been added, then the Duration
139 value will be ignored.
140
141 If multiple advertising Instances have been added, then the Duration
142 value will be used to determine the length of time each Instance is ad‐
143 vertised for.
144
145 The Duration value is used to calculate the number of advertising
146 events that will be used to advertise each Instance.
147
148 The number of advertising events is calculated by dividing the Duration
149 value by the advertising interval.
150
151 The advertising interval is determined by the advertising parameters
152 that are set for each Instance. The advertising interval is the maximum
153 of the advertising intervals set for each Instance.
154
155 Usage # duration [seconds]
156
157 timeout
158 Set/Get advertise timeout.
159
160 Usage # timeout [seconds]
161
162 secondary
163 Set/Get advertise secondary channel.
164
165 Usage # secondary [1M/2M/Coded]
166
167 interval
168 Set/Get advertise interval.
169
170 The Interval parameter configures the advertising interval of an In‐
171 stance.
172
173 The value is in milliseconds.
174
175 A value of 0 indicates a default value is chosen for the Interval.
176
177 The default is 100 milliseconds.
178
179 The Interval value is used to calculate the number of advertising
180 events that will be used to advertise each Instance.
181
182 The number of advertising events is calculated by dividing the Duration
183 value by the advertising interval.
184
185 The advertising interval is determined by the advertising parameters
186 that are set for each Instance.
187
188 The advertising interval is the maximum of the advertising intervals
189 set for each Instance.
190
191 Usage # interval [milliseconds]
192
193 clear
194 Clear advertise config.
195
196 This will stop advertising if it is currently advertising.
197
198 If you want to change the advertise configuration while advertising you
199 must first clear the advertise configuration and then set the new ad‐
200 vertise configuration.
201
202 Usage # clear [uuids/service/manufacturer/config-name...]
203
205 http://www.bluez.org
206
208 linux-bluetooth@vger.kernel.org
209
211 Free use of this software is granted under ther terms of the GNU Lesser
212 General Public Licenses (LGPL).
213
214
215
216
217BlueZ November 2022 BLUETOOTHCTL-ADVERTISE(1)