While performing the static tool analysis using coverity tool
found following reports
Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:1531: leaked_storage: Variable "service"
going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:2626: leaked_storage: Variable "chrc"
going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:2906: leaked_storage: Variable "desc"
going out of scope leaks the storage it points to.
Use the property name as optional filters to the command "devices" and
show the "Bonded" property for the command "info".
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Yun-Hao Chung <howardchung@chromium.org>
This adds transport menu:
[bluetooth]# menu transport
Menu transport:
Available commands:
-------------------
list List available transports
show <transport> Transport information
acquire <transport> Acquire Transport
release <transport> Release Transport
send <filename> Send contents of a file
This adds endpoint menu:
[bluetooth]# menu endpoint
Menu endpoint:
Available commands:
-------------------
list [local] List available endpoints
show <endpoint> Endpoint information
register <UUID> <codec> [capabilities...] Register Endpoint
unregister <UUID/object> Register Endpoint
config <endpoint> <local endpoint> [preset] Configure Endpoint
presets <UUID> [default] List available presets
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:
warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
[-Wdeprecated-declarations]
g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
atoi doesn't support values entered in hexadecimal (0x...) which is
likely the prefered format for the likes of handles, etc, so this
replaces the uses of atoi with strtol.
The following steps were performed.
- Issuing repeated commands to connect the same BLE device.
- Verifying the print in bluetoothctl console
Reviewed-by: Alain Michaud <alainm@chromium.org>
Reviewed-by: Howard Chung <howardchung@google.com>
Thid adds support to show command to print ExperimentalFeatures property:
[bluetooth]# show
Controller ...
Experimental: BlueZ Experimental LL p.. (15c0a148-c273-11ea-b3de-0242ac130004)
This prints property AffectedByPolicy in device info if
org.bluez.AdminPolicyStatus1 exists.
This also rename find_battery_by_path to find_proxies_by_path to reuse
the function.
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
When setting a advertising.name other than on/off it shall also disable
local-name flag from Includes as that would cause an error when parsed
by the daemon.
This change adds SupportedFeatures to be shown in "show" option of
bluetoothctl. It was tested with and without kernel support for features
to verify that they are shown or not shown correctly.
Change was tested by verifying SupportedFeatures were populated
correctly in bluetoothctl on hatch and kukui chromebooks
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Bluetoothctl uses "/" as the app root path. So, use the same
app root path while invoking RegisterMonitor method. This will
also ensure that InterfacesAdded/InterfacesRemoved signals are
emitted on the correct app root path.
This patch adds the new "SupportedCapabilities" property to the
bluetoothctl "show" view.
The change is tested by verifying bluetoothctl shows the desired
properties.
This patch implements some basic functions for ADV monitor in
bluetoothctl
[bluetooth]# show
...
Advertisement Monitor Features:
SupportedMonitorTypes: or_patterns
This adds support for reading the Roles property through bluetootctl's
show option.
[bluetooth]# show
...
Roles: central
Roles: peripheral
Roles: central-peripheral
This adds the Battery Percentage to the info command based on
org.bluez.Battery1 API. Example usage:
[bluetooth]# info XX:XX:XX:XX:XX:XX
Device XX:XX:XX:XX:XX:XX (random)
Name: ...
Alias: ...
...
Modalias: ...
Battery Percentage: 0x64 (100)
DBUS_TYPE_BOOLEAN is 'int', which does not have to be the same size as
'bool'.
On architecture where bool is smaller than in, getting prepare-authorize
will corrupt the stack
This uses the new Pattern filter:
[bluetooth]# scan.pattern Living
[bluetooth]# scan on
SetDiscoveryFilter success
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
[NEW] Device XX:XX:XX:XX:XX:XX Living Room TV
This option exists to facilitate external completion of commands that
have specially defined arguments. It effectively adds two new commands
to bluetoothctl with the following output:
$ bluetoothctl agent help
on
off
DisplayOnly
DisplayYesNo
KeyboardDisplay
KeyboardOnly
NoInputNoOutput
$ bluetoothctl advertise help
on
off
peripheral
broadcast
Shell completion scripts can then parse this output to provide
completions for those commands.
This fixes the following error when building with older version of
D-Bus:
client/gatt.c:2973: undefined reference to `dbus_message_iter_get_element_count'
This adds clone command to gatt submenu which can be use to clone
services as follow:
Clone all services from the connected device:
> gatt.clone
Clone a given service
> gatt.select-attribute <attribute/uuid>
> gatt.clone
In either case there is a prompt to confirm since this may add a lot of
service the user must confim before proceding.
Then finally:
> gatt.register-application
This enables setting the write type as optional third parameter:
write <data=xx xx ...> [offset] [type]
The type can be used to force a specific procedure to be used, for
example to force reliable writes one can enter:
> write 00 0 reliable
Instead use the position in the list to create a unique path:
[bluetooth]# register-service 0x1820
[NEW] Primary Service (Handle 0x0000)
/org/bluez/app/service0
0x1820
Internet Protocol Support
This enable passing "local" to list-attributes to print the attributes
registered locally:
> list-attributes local
Primary Service (Handle 0x0400)
/org/bluez/app/service0x74ccb0
0x1820
Internet Protocol Support
If call to SetDiscoveryFilter comes with any value set the daemon will
not attempt to clear the filters, instead the client is suppose to send
an empty dict.
This adds discoverable command to scan menu which can be used to set
if adapter should become discoverable while scanning:
[bluetooth]# scan.discoverable on
[bluetooth]# scan on
SetDiscoveryFilter success
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: yes
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
[bluetooth]# scan off
Discovery stopped
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: no
This adds discoverable-timeout command which can be used to get/set
DiscoverableTimeout property:
[bluetooth]# discoverable-timeout 180
Changing discoverable-timeout 180 succeeded
This prints both Data and Discoverable if advertise command succeeds:
[bluetooth]# advertise.data 0x26 0x01 0x00
[bluetooth]# advertise.discoverable on
[bluetooth]# advertise on
Advertising object registered
Data Type: 0x26
01 00 ..
Tx Power: off
Name: off
Apperance: off
Discoverable: on
This adds advertise.discoverable command which can be used to set it
own instance:
[bluetooth]# advertise.discoverable on
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 14
Instance: 1
Flags: 0x00000001
Switch into Connectable mode
Duration: 0
Timeout: 0
Advertising data length: 3
Flags: 0x02
LE General Discoverable Mode
Scan response length: 0
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
Length: 3
Flags: 0x02
LE General Discoverable Mode
This adds data command to advertise menu which can be used to set
an arbitrary/profile specific advertising type and data:
[bluetooth]# data 0x26 0x01 0x01 0x00
Returns the FAILURE status since there is no meaning of stay in
non-interactive mode when executing some commands with an invalid
argument or with no controller. Also returns with the SUCCESS status
when getting a scan filtering value or disconnecting a non-default
device.
While value has more than single MTU can carry long read procedure will
be triggered. In such cases offset need to bo considered while getting
value from storage.
Since commit 65eff5c2 ("client: Rename set-service to service"), data
are appended in every run of advertise service with data arguments as
below:
[bluetooth]# service 1 1 2
[bluetooth]# service
UUID: SDP(1)
01 02 ..
[bluetooth]# service 1 1 2 3
[bluetooth]# service
UUID: SDP(1)
01 02 01 02 03 .....
Make the command return the current value if no parameters:
[bluetooth]# service 0x1820 00 00 00
[bluetooth]# service
UUID: Internet Protocol Support (0x1820)
00 00 00 ...
This reintroduces the option to clear individual fields which was
removed when redesining the commands which now read the fields when
no arguments are provided.
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters.
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:
[bluetooth]# duplicate-data on
SetDiscoveryFilter success
[bluetooth]# duplicate-data
DuplicateData: on
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:
[bluetooth]# transport le
SetDiscoveryFilter success
[bluetooth]# transport
Transport: le
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:
[bluetooth]# pathloss 0
SetDiscoveryFilter success
[bluetooth]# pathloss
Pathloss: 0
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:
[bluetooth]# rssi 0
SetDiscoveryFilter success
[bluetooth]# rssi
RSSI: 0
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:
[bluetooth]# uuids 0x1820
SetDiscoveryFilter success
[bluetooth]# uuids
UUID: Internet Protocol Support (0x1820)
Note that to filter all UUIDs user must now use "all" instead of empty
list.
disconnect callback was writing on the argv pointer causing word
wordfree to access invalid memory:
Invalid free() / delete / delete[] / realloc()
at 0x4C2FD18: free (vg_replace_malloc.c:530)
by 0x56E8588: wordfree (in /usr/lib64/libc-2.25.so)
by 0x41D0EB: rl_handler (shell.c:388)
by 0x53CDB6D: rl_callback_read_char (in /usr/lib64/libreadline.so.7.0)
by 0x41CA20: input_read (shell.c:661)
by 0x41D88A: watch_callback (io-glib.c:170)
by 0x4E85246: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5200.3)
by 0x4E855E7: ??? (in /usr/lib64/libglib-2.0.so.0.5200.3)
by 0x4E85901: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5200.3)
by 0x41D77D: bt_shell_run (shell.c:609)
by 0x4055E4: main (main.c:2502)
Address 0x76afcb4 is 4 bytes inside a block of size 30 alloc'd
at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
by 0x517F803: ??? (in /usr/lib64/libdbus-1.so.3.19.0)
by 0x516D32A: dbus_message_copy (in /usr/lib64/libdbus-1.so.3.19.0)
by 0x4195F4: prop_entry_update.isra.1 (client.c:186)
by 0x4197C4: prop_entry_new (client.c:202)
by 0x4197C4: add_property (client.c:237)
by 0x4199A5: update_properties (client.c:277)
by 0x419E74: parse_properties (client.c:974)
by 0x419E74: parse_interfaces (client.c:1001)
by 0x41B412: parse_managed_objects (client.c:1093)
by 0x41B412: get_managed_objects_reply (client.c:1114)
by 0x51607A1: ??? (in /usr/lib64/libdbus-1.so.3.19.0)
by 0x516411E: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.19.0)
by 0x41261F: message_dispatch (mainloop.c:72)
by 0x4E81C26: ??? (in /usr/lib64/libglib-2.0.so.0.5200.3)
All commands related to gatt settings are now under gatt
submenu:
[bluetooth]# menu gatt
Menu gatt:
Available commands:
-------------------
list-attributes [dev] List attributes
set-alias <alias> Set device alias
select-attribute <attribute/UUID> Select attribute
attribute-info [attribute/UUID] Select attribute
read Read attribute value
write <data=[xx xx ...]> Write attribute value
acquire-write Acquire Write file descriptor
release-write Release Write file descriptor
acquire-notify Acquire Notify file descriptor
release-notify Release Notify file descriptor
notify <on/off> Notify attribute value
register-application [UUID ...] Register profile to connect
unregister-application Unregister profile
register-service <UUID> Register application service.
unregister-service <UUID/object> Unregister application service
register-characteristic <UUID> <Flags=read,write,notify...> Register application characteristic
unregister-characteristic <UUID/object> Unregister application characteristic
register-descriptor <UUID> <Flags=read,write...> Register application descriptor
unregister-descriptor <UUID/object> Unregister application descriptor
back Return to main menu
version Display version
quit Quit program
exit Quit program
help Display help about this program
All commands related to scan settings are now under scan
submenu:
[bluetooth]# menu scan
Menu scan:
Available commands:
-------------------
set-filter-uuids [uuid1 uuid2 ...] Set scan filter uuids
set-filter-rssi [rssi] Set scan filter rssi, and clears pathloss
set-filter-pathloss [pathloss] Set scan filter pathloss, and clears rssi
set-filter-transport [transport] Set scan filter transport
set-filter-duplicate-data [on/off] Set scan filter duplicate data
set-filter-clear Clears discovery filter.
back Return to main menu
version Display version
quit Quit program
exit Quit program
help Display help about this program
All commands related to advertise settings are now under advertise
submenu:
> menu advertise
Menu advertise:
Available commands:
-------------------
set-uuids [uuid1 uuid2 ...] Set advertise uuids
set-service [uuid][data=[xx xx ...] Set advertise service data
set-manufacturer [id][data=[xx xx ...] Set advertise manufacturer data
set-tx-power <on/off> Enable/disable TX power to be advertised
set-name <on/off/name> Enable/disable local name to be advertised
set-appearance <value> Set custom appearance to be advertised
set-duration <seconds> Set advertise duration
set-timeout <seconds> Set advertise timeout
back Return to main menu
version Display version
quit Quit program
exit Quit program
help
This adds submenu support so application can have one extra level of
menus to better organize the interface.
Submenus will be show in the output of help command, to select a
submenu:
> menu <name>
To move back to main menu:
> back
This adds the following command which can be used to control the
advertisement intervals:
[bluetooth]# set-advertise-duration 4
[bluetooth]# set-advertise-timeout 4
[bluetooth]# advertise on
[CHG] Controller B8:8A:60:D8:17:D7 SupportedInstances: 0x04
[CHG] Controller B8:8A:60:D8:17:D7 ActiveInstances: 0x01
Advertising object registered
[CHG] Controller B8:8A:60:D8:17:D7 SupportedInstances: 0x05
[CHG] Controller B8:8A:60:D8:17:D7 ActiveInstances: 0x00
When data is too much, the data may include values not making sense, so
this patch clears the advertising manufacturer/service data corresponding
to the running command.
Even if running set-advertise-manufacturer with data having an invalid
value, client does not clear the advertising service data and clears the
advertising manufacturer data.
While testing advertisement, I encountered Seg fault in client, when bluetoothd
tries to fetch the Adv data set by client. It can happen either while fetching
Manufacturer specific data or Service data. Backtrace is provided below for reference
After fix is applied, advertisement works fine for me. I am sending the following patch
your review. Thank you.
Passing val instead of &val in dbus_message_iter_append_fixed_array
DBUS API causes segmentation fault while fecthing Manufacturer
data or service data set by client.
BT Before Fix:
[bluetooth]# set-advertise-name Test
[bluetooth]# set-advertise-uuids 0x1824
[bluetooth]# set-advertise-manufacturer 0x75 0x02 0x03 0x04
[bluetooth]# advertise on
Program received signal SIGSEGV, Segmentation fault.
in append_array_variant(iter=iter@entry=0x7fffffffd780,
val=val@entry=0x62485a <ad+90>, n_elements=n_elements@entry=3, type=121) at client/advertising.c:178
in dict_append_basic_array(type=121, n_elements=3,
val=0x62485a <ad+90>, key=0x624858 <ad+88>, key_type=113, dict=0x7fffffffd730) at client/advertising.c:205
get_manufacturer_data(property=<optimized out>, iter=0x7fffffffd840,
user_data=<optimized out>) at client/advertising.c:253
After Fix:
[bluetooth]# set-advertise-name Test
[bluetooth]# set-advertise-uuids 0x1824
[bluetooth]# set-advertise-manufacturer 0x75 0x02 0x03 0x04
[bluetooth]# advertise on
[CHG] Controller 00:19:0E:11:55:44 SupportedInstances: 0x04
[CHG] Controller 00:19:0E:11:55:44 ActiveInstances: 0x01
Advertising object registered
[bluetooth]#
If repeating to set on/off with set-advertise-name after setting local
name, and then may dump core by double free. This patch uses g_free()
instead of free().
Since advertise command does not free the variable ad.type when repeating
to enable and disable advertising, the following memory leak occurs.
11 bytes in 1 blocks are definitely lost in loss record 20 of 190
at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E89718: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
by 0x4EA24EE: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
by 0x40EBC8: ad_register (advertising.c:343)
by 0x40A666: cmd_advertise (main.c:2344)
by 0x40ABA3: rl_handler (main.c:2664)
by 0x53C16F4: rl_callback_read_char (in /lib/x86_64-linux-gnu/libreadline.so.6.3)
by 0x405AFC: input_handler (main.c:110)
by 0x4E84049: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
by 0x4E843EF: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
by 0x4E84711: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
by 0x4055FE: main (main.c:2865)
The unexpected generator is used if the input string forward matches
with the unexpected command string which a generator for completion
is registered on. Thus,
- since 496b6abf74, list command
generates the unneeded argument, which is device id like that
list-attributes command generates.
- since b0fe6045b7, pair command
generates the invalid argument, which is on/off like that
pairable command generates.
This patch use the exact matching command.
Since 4e111f3448, when another adapter is
found, the default adapter would be changed, which is not expected.
Default adapter can only be changed by select command.
For some commands bluetoothctl gives the hint of argument, which is "on"
and "off", it is convenient even if the argument of command was overlooked
in help message.
If there are multiple adapters, bluetoothctl may choose the wrong
advertising manager. In addition, select command cannot update
current advertising manager when choosing another adapter. Therefore, we
need to put advertising manager under adapter structure to resolve this
issue.
This allows bluetoothd to detect changes done by the user without
having to rely on advertise command to unregister and register again:
bluetooth]# set-advertise-name blah
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 17
Instance: 1
Flags: 0x00000003
Switch into Connectable mode
Advertise as Discoverable
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 6
Name (complete): blah
[bluetooth]# set-advertise-name bleh
@ MGMT Command: Add Advertising (0x003e) plen 17
Instance: 1
Flags: 0x00000003
Switch into Connectable mode
Advertise as Discoverable
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 6
Name (complete): bleh
set-advertise-appearance enables the use of adapter's appearance in the
scan response:
[bluetooth]# set-advertise-appearance on
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 11
Instance: 1
Flags: 0x00000023
Switch into Connectable mode
Advertise as Discoverable
Add Appearance field to Scan Response
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 0
set-advertise-name enables the use of adapter's name/alias in the
scan response:
[bluetooth]# set-advertise-name on
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 11
Instance: 1
Flags: 0x00000043
Switch into Connectable mode
Advertise as Discoverable
Add Local Name in Scan Response
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 0
When bluetoothctl runs with the command line option "-a <capability>", it
does not free the variable auto_register_agent registering the initial
agent and allocates new memory for it.
This frees the allocated memory before allocating new memory.
(The related commit id is 6db3470c2ea161b4b808ad1fc80dfd7e014fd359.)
This adds release-notify command which closes an existing fd unlocking
the attribute:
[Test peripheral:/service001f/char0020]# release-notify
[CHG] Attribute /org/bluez/hci1/dev_69_16_5B_9A_06_CD/service001f/char0020 NotifyAcquired: no
This adds release-write command which closes an existing fd unlocking
the attribute:
[Test peripheral:/service001f/char0020]# release-write
[CHG] Attribute /org/bluez/hci1/dev_00_1B_DC_07_31_88/service001f/char0020 WriteAcquired: no
This adds unregister-descriptor which can be used to unregister
descriptors registered with register-descriptor:
unregister-descriptor /org/bluez/app/service0xf48150/chrc0xf49a40/desc0xf4d350
[DEL] Descriptor
/org/bluez/app/service0xf48150/chrc0xf49a40/desc0xf4d350
8260c653-1a54-426b-9e36-e84c238bc669
Vendor specific
This adds register-descriptor which can be used to register
descriptors to a characteristic registered with register-characteristic:
register-descriptor 8260c653-1a54-426b-9e36-e84c238bc669 read,write
[NEW] Descriptor
/org/bluez/app/service0x902610/chrc0x91d690/desc0x9095a0
8260c653-1a54-426b-9e36-e84c238bc669
Vendor specific
[/org/bluez/app/service0x902610/chrc0x91d690/desc0x9095a0] Enter value: 00
This adds unregister-characteristic which can be used to unregister
characteristics registered with register-characteristic:
unregister-characteristic /org/bluez/app/service0xc80150/chrc0xc99960
[DEL] Characteristic
/org/bluez/app/service0xc80150/chrc0xc99960
00002a06-0000-1000-8000-00805f9b34fb
Alert Level
This adds register-characteristic which can be used to register
characteristic to a service registered with register-service:
register-characteristic 00002a06-0000-1000-8000-00805f9b34fb write-without-response
[NEW] Characteristic
/org/bluez/app/service0x1122150/chrc0x113fa40
00002a06-0000-1000-8000-00805f9b34fb
Alert Level
This adds unregister-service which can be used to unregister an
application service registered with register-service:
register-service 00001820-0000-1000-8000-00805f9b34fb
[NEW] Primary Service
/org/bluez/app/service0x92a150
00001820-0000-1000-8000-00805f9b34fb
Internet Protocol Support
[bluetooth]# unregister-service /org/bluez/app/service0x92a150
[DEL] Primary Service
/org/bluez/app/service0x92a150
00001820-0000-1000-8000-00805f9b34fb
Internet Protocol Support
This adds register-service command which can be used to add GATT services
to the application:
[bluetooth]# register-service 00001820-0000-1000-8000-00805f9b34fb
[NEW] Primary Service
/org/bluez/app/service0x8c2610
00001820-0000-1000-8000-00805f9b34fb
Internet Protocol Support
[/org/bluez/app/service0x8c2610] Primary (yes/no): yes
[bluetooth]# register-application
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001820-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Note: register-application still has to be called at the end to register
with bluetoothd as everything is done with ObjectManager.
This outputs the help message by two lines as follows if the string of
a command and a argument is long.
set-alias <alias> Set device alias
select-attribute <attribute/UUID>
Select attribute
attribute-info [attribute/UUID]
Select attribute
read Read attribute value