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.