summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
...
* client: Add support for player submenuLuiz Augusto von Dentz2022-03-303-0/+1138
| | | | | This moves adds the functionality of bluetooth-player into bluetoothctl.
* client: Add support for scan <le/bredr>Luiz Augusto von Dentz2022-03-021-2/+24
| | | | | This adds support for entering the transport directly as an scan argument rather than having to first set it scan.transport.
* build: Replace use of g_memdup with util_memdupLuiz Augusto von Dentz2022-01-061-1/+1
| | | | | | | | | | | 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.
* client/gatt: Fix property_change in WriteValue for descUlisses Costa2021-12-071-1/+1
| | | | | g_dbus_emit_property_changed was not working properly in the WriteValue for the descriptor because the Characteristic interface was being used.
* client: Fix uninitiailzed scalar variableTedd Ho-Jeong An2021-11-151-0/+3
| | | | | This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan.
* client/gatt: Fix using atoiLuiz Augusto von Dentz2021-11-091-11/+60
| | | | | | 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.
* client: Print error code for connect methodsMiao-chen Chou2021-10-041-1/+2
| | | | | | | | | 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>
* client: Print MTU on attribute-infoLuiz Augusto von Dentz2021-09-281-0/+1
| | | | This prints the MTU of the characteristic when available.
* client: Inclusive language changesArchie Pusaka2021-09-211-3/+3
| | | | | | Use "parent" to describe dbus hierarchy. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* client: Add support for printing ExperimentalFeatures propertyLuiz Augusto von Dentz2021-09-081-5/+28
| | | | | | | | Thid adds support to show command to print ExperimentalFeatures property: [bluetooth]# show Controller ... Experimental: BlueZ Experimental LL p.. (15c0a148-c273-11ea-b3de-0242ac130004)
* client: add AffectedByPolicy propertyYun-Hao Chung2021-08-111-4/+16
| | | | | | | | | | 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>
* client: add admin submenu and allow commandYun-Hao Chung2021-08-113-0/+227
| | | | | | | This creates a menu - admin and add a commands to bluetoothctl - allow [clear/uuid1 uuid2 ...] Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
* client/advertising: Fix not disabling local-name in IncludesLuiz Augusto von Dentz2021-08-101-0/+7
| | | | | | 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.
* client: Fix advertise broadcastLuiz Augusto von Dentz2021-05-141-0/+3
| | | | | When advertising with type broadcast it cannot be discoverable as that would require setting flags which is not allowed by the spec.
* client/advertising: Add support for setting min/max intervalsLuiz Augusto von Dentz2021-05-133-0/+108
| | | | This adds support for setting MinInterval/MaxInterval.
* client: Add adv SupportedFeatures to bluetoothctlDaniel Winkler2021-03-171-0/+1
| | | | | | | | | | | 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: advmon rssi support for mgmtArchie Pusaka2021-01-153-131/+210
| | | | | Using the new opcode MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI to monitor advertisement according to some RSSI criteria.
* client: Use correct root path for RegisterMonitorManish Mandlik2020-12-021-2/+2
| | | | | | | 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.
* client: Remove reference to g_steal_pointer()Inga Stotland2020-11-091-4/+10
| | | | | | In order to avoid requiring higher version of GLib, replace g_steal_pointer() with explicitly setting the pointer value to NULL.
* client: Add SupportedCapabilities to bluetoothctlDaniel Winkler2020-10-291-0/+1
| | | | | | | | This patch adds the new "SupportedCapabilities" property to the bluetoothctl "show" view. The change is tested by verifying bluetoothctl shows the desired properties.
* client: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-2111-146/+11
| | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- GPL-2.0-or-later : 11 License: GPL-2.0-or-later client/adv_monitor.c client/adv_monitor.h client/advertising.h client/display.c client/main.c client/display.h client/agent.h client/gatt.c client/agent.c client/advertising.c client/gatt.h
* client: Expose ADV monitor objectsHoward Chung2020-09-161-3/+182
| | | | | This adds logic to expose user-defined advertisement monitor to dbus and also implements methods for exposed objects.
* client: Implement more interfaces of ADV monitor in bluetoothctlHoward Chung2020-09-163-0/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a submenu in bluetoothctl and implements several commands. new commands: [bluetooth]# menu monitor [bluetooth]# add-or-pattern 1 2 ab0011 Advertisement Monitor 0 added [bluetooth]# add-or-pattern-rssi -80, ,5 1 2 aa 3 4 ff Advertisement Monitor 1 added [bluetooth]# get-pattern all Advertisement Monitor 0 path: /org/bluez/adv_monitor_app/0 type: or_patterns pattern 1: start position: 1 AD data type: 2 content: ab0011 Advertisement Monitor 1 path: /org/bluez/adv_monitor_app/1 type: or_patterns rssi: high threshold: -50 high threshold timer: 5 low threshold: -80 low threshold timer: 5 pattern 1: start position: 1 AD data type: 2 content: aa pattern 2: start position: 3 AD data type: 4 content: ff [bluetooth]# get-supported-info Supported Features: Supported Moniter Types: or_patterns [bluetooth]# remove-pattern 0 Monitor 0 deleted
* client: Implement basic interface of ADV monitor in bluetoothctlHoward Chung2020-09-163-0/+216
| | | | | | | | | | This patch implements some basic functions for ADV monitor in bluetoothctl [bluetooth]# show ... Advertisement Monitor Features: SupportedMonitorTypes: or_patterns
* client: Fix typo in bluetoothctlBarry Byford2020-08-311-2/+2
|
* client: Add cancel-pairing commandMiao-chen Chou2020-08-211-0/+35
| | | | | This adds cancel-pairing command which can be used to cancel the ongoing pairing.
* client: Add support for the Roles property.Alain Michaud2020-07-071-0/+1
| | | | | | | | | | | This adds support for reading the Roles property through bluetootctl's show option. [bluetooth]# show ... Roles: central Roles: peripheral Roles: central-peripheral
* client: Display wake allowed property with infoAbhishek Pandit-Subedi2020-07-071-0/+1
| | | | | Display whether the device is configured as wake allowed when queried with cmd_info.
* client: Add battery percentage to info commandSonny Sasaka2020-07-021-3/+46
| | | | | | | | | | | | | 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)
* client: Update write callbacks with invalid offset error handlersMariusz Skamra2020-05-111-0/+15
| | | | This patch adds invalid offset handlers to write callbacks of attributes.
* client: Fix possible stack corruptionŁukasz Rymanowski2020-05-111-3/+6
| | | | | | | 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
* client: Make advertise instances default to discoverableLuiz Augusto von Dentz2020-04-071-0/+1
| | | | | The more common case is that advertisements are discoverable not the other way around.
* client: Add scan.pattern commandLuiz Augusto von Dentz2020-02-191-1/+32
| | | | | | | | | | | 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
* client: Fix memory leakSyam Sidhardhan2019-12-081-2/+2
|
* client/main: add help option for available argsRonan Pigott2019-09-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* client: Fix not able to select attributes if parent existsLuiz Augusto von Dentz2019-08-201-1/+1
| | | | | When selecting attributes by UUID the code was not checking attributes that are not a children of the current selected attribute.
* client: Allow UUID 16 bits on select-attributeLuiz Augusto von Dentz2019-08-201-0/+3
| | | | This allow passing UUIDs on 16 bits format.
* client: Fix crash when setting advertising.discoverable onLuiz Augusto von Dentz2019-05-101-2/+3
| | | | DBUS_TYPE_BOOLEAN expect a pointer to dbus_bool_t not bool.
* client: Fix build with older version on libdbusLuiz Augusto von Dentz2019-02-261-10/+5
| | | | | | | 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'
* client: Print AdvertisingManager properties on command 'show'Luiz Augusto von Dentz2019-02-211-15/+21
| | | | | | | | | | | | | This outputs the AdvertisingManager properties command 'show': bluetoothctl> show ... Advertising Features: ActiveInstances: 0x00 SupportedInstances: 0x05 SupportedIncludes: tx-power SupportedIncludes: appearance SupportedIncludes: local-name
* client: Add advertise.secondary commandLuiz Augusto von Dentz2019-02-213-0/+64
| | | | | This adds advertose.secondary command which can be used to set a secondary channel to advertise.
* client: Fix uninitialized errorLuiz Augusto von Dentz2019-02-131-1/+1
| | | | | trusted should be initialized with false since the property may not be available.
* client: Improve logging of GATT operationsLuiz Augusto von Dentz2019-02-131-17/+34
| | | | | This prints the UUID along with attribute path and also print the hexdump when payload is available.
* client: Forward notifications from cloned attributesLuiz Augusto von Dentz2019-02-131-0/+17
| | | | | Notifications come in a form of 'Value' property changes thus this copies the values to the local attribute so they are in sync.
* client: Remove cloned services if the proxy is removedLuiz Augusto von Dentz2019-02-131-0/+22
| | | | | This unregister the cloned services if the proxy is removed since they would no longer be accessible.
* client: Proxy calls to StartNotify/StopNotifyLuiz Augusto von Dentz2019-02-131-2/+87
| | | | | This uses the proxies created by clone command to forward the subscriptions to the cloned services.
* client: Proxy calls to ReadValue and WriteValueLuiz Augusto von Dentz2019-02-131-0/+141
| | | | | This uses the proxies created by clone command to forward the requests to the cloned services.
* client: Add gatt.clone commandLuiz Augusto von Dentz2019-02-133-0/+253
| | | | | | | | | | | | | | | | | | | 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
* client: Add type to write commandLuiz Augusto von Dentz2019-02-112-73/+53
| | | | | | | | | | | 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
* client: Don't expose pointer value in attribute pathLuiz Augusto von Dentz2019-01-311-3/+6
| | | | | | | | | | 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