summaryrefslogtreecommitdiff
path: root/client
Commit message (Collapse)AuthorAgeFilesLines
* client/player: Add codec as parameter to endpoint.presetsLuiz Augusto von Dentz2023-05-121-61/+171
| | | | This changes endpoint.presets command to take codec as parameter.
* client/player: Fix not checking for SupportedUUIDsLuiz Augusto von Dentz2023-05-121-24/+42
| | | | When registering an endpoint it should always check for SupportedUUIDs.
* client/player: Add support to Max Transports in endpoint.registerLuiz Augusto von Dentz2023-05-121-2/+59
| | | | | | | | [bluetooth]# endpoint.register 00002bc9-0000-1000-8000-00805f9b34fb 0x06 [/local/endpoint/ep0] Auto Accept (yes/no): y [/local/endpoint/ep0] Max Transports (auto/value): 1 [/local/endpoint/ep0] CIG (auto/value): a [/local/endpoint/ep0] CIS (auto/value): a
* client/player: Fix crashes accessing metadataLuiz Augusto von Dentz2023-05-121-2/+3
| | | | | If metadata is not set the respective iovec is left NULL so it needs to be checked before accessing its fields.
* client/player: Fix crash when RegisterEndpoint failsLuiz Augusto von Dentz2023-05-011-2/+4
| | | | | If RegisterEndpoint fails when there are multiple adapters it would attempt to free the same endpoint multiple times.
* client/player: Add support for Metadata in BAP ProfileAbhay Maheta2023-04-281-2/+85
| | | | | | | | | | | | | | | This adds support for Metadata in BAP profile. In order to register zero Metadata, 0 shall be entered when prompted. [bluetooth]# endpoint.register 00002bc9-0000-1000-8000-00805f9b34fb 0x06 [/local/endpoint/ep0] Enter Metadata (value/no): n [/local/endpoint/ep0] Auto Accept (yes/no): y [/local/endpoint/ep0] CIG (auto/value): a [/local/endpoint/ep0] CIS (auto/value): a Capabilities: 03 01 ff 00 02 02 03 02 03 03 05 04 1e 00 f0 00 ................ Endpoint /local/endpoint/ep0 registered
* client/advertising: Add support for advertise.rsi commandLuiz Augusto von Dentz2023-04-053-2/+46
| | | | | | | | | | | | | | | | | | | | | This adds support for advertise.rsi command which can be used to request the generation of RSI and include it as part of advertising data: [bluetooth]# advertise.rsi --help Show/Enable/Disable RSI to be advertised Usage: rsi [on/off] [bluetooth]# advertise.rsi RSI: on [bluetooth]# advertise on ... Advertising object registered Tx Power: off Name: off Appearance: off Discoverable: on RSI: on [bluetooth]#
* Split bt_iso_qos into dedicated structuresIulia Tanasescu2023-03-311-3/+4
| | | | | Split bt_iso_qos into dedicated unicast and broadcast structures and add additional broadcast parameters.
* client: Add samples init scriptsLuiz Augusto von Dentz2023-03-2411-0/+53
| | | | | This adds sample init scripts that can be passed to bluetoothctl for testing.
* client: Use AdvertisingFlags when availableLuiz Augusto von Dentz2023-03-101-24/+55
| | | | | This prints devices not discoverable in grey so the user are able to distict when for example set members are actually visible.
* client: Add support for DeviceSet proxyLuiz Augusto von Dentz2023-03-101-10/+103
|
* client/player: Update High Reliability presetsLuiz Augusto von Dentz2023-03-101-8/+32
| | | | | | This updates High Reliability presets as published in BAP 1.0.1: https://www.bluetooth.com/specifications/bap-1-0-1/
* client: Allow transport.send command to work with multiple transportsLuiz Augusto von Dentz2023-03-021-33/+40
| | | | | This enables transport.send to work with multiple transports instead of sending one by one which can create synchronization problems.
* media: Rework support of Vendor to use uint32_t as typeLuiz Augusto von Dentz2023-01-311-7/+17
| | | | This reworks the handlings of Vendor property to use a single uint32_t.
* client/player: Add support for Company ID, Vendor IDAbhay Maheta2023-01-311-7/+54
| | | | | | | | | | This adds support for Company ID and Vendor Codec ID in BAP profile. This also adds handling of Vendor Specific Coding format for BAP Profile. Now it allows to enter zero codec capabilities for vendor codec. In order to register zero codec capabilities, 0 shall be entered when prompted.
* client/player: Fix transport.send/receice tab completionLuiz Augusto von Dentz2022-12-151-2/+4
| | | | | | Commands transport.send/receive were not settings any completion callback so this makes sure it uses transport_generator to generate the list of transport that could be used to send.
* client/player: Print transport progressLuiz Augusto von Dentz2022-12-151-2/+14
| | | | | This uses bt_shell_echo to print out the transfer progress on the echo area.
* client/player: Use bt_shell_echo to print transfer progressLuiz Augusto von Dentz2022-12-151-8/+4
| | | | This uses bt_shell_echo to print transfer progress.
* client/player: Make transport.send non-blockingLuiz Augusto von Dentz2022-12-141-61/+132
| | | | | This makes transport.send command non-blocking by using timerfd callback to initiate the transfers.
* client/player: Fix not calculating time to waitLuiz Augusto von Dentz2022-12-091-0/+4
| | | | | The difference of time start and current time may have advanced just enough to add a second leaving start nanoseconds to be bigger.
* client: Allow gatt.select-attribute to work with local attributesLuiz Augusto von Dentz2022-12-063-65/+285
| | | | | | | | | | | | | | | | | | This allows gatt.select-attribute local to select from the registered attributes: [bluetooth]# gatt.select-attribute local /org/bluez/app/service0/chrc0 [/org/bluez/app/service0/chrc0]# gatt.write 0x01 [CHG] Attribute /org/bluez/app/service0/chrc0 (%UUID) written [/org/bluez/app/service0/chrc0]# gatt.read 01 . [/org/bluez/app/service0/chrc0]# gatt.select-attribute local /org/bluez/app/service0/chrc1 [/org/bluez/app/service0/chrc1]# gatt.write 0x01 [CHG] Attribute /org/bluez/app/service0/chrc1 (%UUID) written [/org/bluez/app/service0/chrc1]# gatt.read 01 . [/org/bluez/app/service0/chrc1]#
* client: Move common print_* functions to its own fileLuiz Augusto von Dentz2022-12-024-247/+210
| | | | | This move common print_* functions to its own file so they can be properly reused instead of duplicating the code.
* client/player: Add support for custom presetLuiz Augusto von Dentz2022-12-021-48/+366
| | | | | | | | | | | | | | | | | | | This adds support for a custom preset which asks the user to enter its configuration: [bluetooth]# endpoint.presets 00002bc9-0000-1000-8000-00805f9b34fb custom [Codec] Enter frequency (Khz): 48 [Codec] Enter frame duration (ms): 10 [Codec] Enter channel allocation: 0x000000003 [Codec] Enter frame length: 100 [QoS] Enter Target Latency (Low, Balance, High): Low [QoS] Enter SDU Interval (us): 10000 [QoS] Enter Framing (Unframed, Framed): Unframed [QoS] Enter PHY (1M, 2M): 2M [QoS] Enter Max SDU: 200 [QoS] Enter RTN: 3 [QoS] Enter Max Transport Latency (ms): 20 [QoS] Enter Presentation Delay (us): 10000
* client/player: Fix scan-build warningLuiz Augusto von Dentz2022-11-211-0/+3
| | | | | | | | | This fixes the following warning: client/player.c:1775:25: warning: Dereference of null pointer [core.NullDereference] iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len); ^~~~~~~~~~~~~~~~~~~~~
* client: Fix advertise.data commandLuiz Augusto von Dentz2022-10-201-1/+1
| | | | | | advertise.data when no parameter is given shall print what is set on ad.data not the ad.manufacturer which is a different field set by advertise.manufacturer.
* client/player: Fix attempting to acquire already acquired transportLuiz Augusto von Dentz2022-09-291-5/+65
| | | | | | If the transport has links check if the link is acquiring before attempting to call Acquire otherwise it may cause an error to be printed.
* client/player: fix printf format stringChristian Eggers2022-09-261-2/+2
| | | | | Use macros from inttypes.h for correct printf format specifier for int64_t
* client/gatt: Fix scan-build warningLuiz Augusto von Dentz2022-09-231-1/+2
| | | | | | | | | This fixes the following warning: client/gatt.c:2146:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull' [core.NonNullParamChecker] memcpy(*dst_value + offset, src_val, src_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* client/gatt: proxy_property_changed: check for NULL iteratorChristian Eggers2022-09-231-7/+10
| | | | | | | | | | The passed iterator can be NULL as in gdbus/client.c::properties_changed(): ... proxy->prop_func(..., ..., iter=NULL, ...) +--client/gatt.c::proxy_property_changed(..., ..., iter, ...); +--dbus_message_iter_get_arg_type(iter); ...
* client/gatt: Fix notification enabled/disabled outputLuiz Augusto von Dentz2022-09-211-2/+3
| | | | | When notifications are enabled/disable the output was not print a new line.
* client: Print the PowerState propertyBastien Nocera2022-09-011-0/+1
|
* client/player: Fix checkpatch warningLuiz Augusto von Dentz2022-08-301-7/+4
| | | | | | | | | This fixes the following checkpatch warning: WARNING:LINE_SPACING: Missing a blank line after declarations 216: FILE: client/player.c:625: + GDBusProxy *proxy = l->data; + print_player(proxy, NULL);
* client: Add -e/--endpoint option to auto register endpointsLuiz Augusto von Dentz2022-08-292-38/+98
| | | | | This adds -e/--endpoint option that can be used to auto register supported endpoints.
* client/advertising: Fix typos: *_exits --> *_existsChristian Eggers2022-08-291-16/+18
|
* client: Add missing return statement in error pathChristian Eggers2022-08-291-1/+1
| | | | Client will SEGFAULT if default_ctrl==NULL
* client/player: Use QoS interval on transport.sendLuiz Augusto von Dentz2022-08-291-2/+67
| | | | This makes use of QoS interval when sending a file.
* client/player: Add support for PACS endpointsLuiz Augusto von Dentz2022-08-291-88/+531
| | | | | This adds support for PAC_SINK and PAC_SOURCE endpoints as well as LC3 presets.
* client: Move admin submenuLuiz Augusto von Dentz2022-08-153-91/+96
| | | | | This moves admin submenu to admin.c so it is not mixed up with other submenus code.
* client: Fix build warningLuiz Augusto von Dentz2022-07-051-1/+1
| | | | | | | This fixes the following build warning: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations]
* client/advertising: Fixes errors found by scan-buildLuiz Augusto von Dentz2022-06-221-4/+2
| | | | | | | | | | | | | This fixes the following errors: client/advertising.c:129:4: warning: Value stored to 'n' is never read [deadcode.DeadStores] n = sizeof(str) - 1; ^ ~~~~~~~~~~~~~~~ client/advertising.c:1012:25: warning: Dereference of null pointer (loaded from variable 'min') [core.NullDereference] if (ad.min_interval != *min) { ^~~~
* client/player: Fixes errors found by scan-buildLuiz Augusto von Dentz2022-06-221-1/+7
| | | | | | | | | | | | | This fixes the following errors: client/player.c:1406:44: warning: Dereference of null pointer [core.NullDereference] reply = endpoint_select_config_reply(msg, p->data.iov_base, ^~~~~~~~~~~~~~~~ client/player.c:1866:2: warning: 3rd function call argument is an uninitialized value [core.CallAndMessage] iov_append(&cfg->caps, data, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* client/player: Enable acquiring multiple transportsLuiz Augusto von Dentz2022-06-221-70/+144
| | | | This enables acquiring multiple transports simultaneously.
* client/gatt: Fix memory leak issuesGopal Tiwari2022-05-311-3/+9
| | | | | | | | | | | | | | | | | 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.
* client: Fix setting of advertisement intervalInga Stotland2022-05-231-1/+1
| | | | | This fixes incorrect argument read when using "interval" command in "advertisement" submenu
* client: Add filter to devices and show Bonded in infoZhengping Jiang2022-05-041-25/+47
| | | | | | | | 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>
* client/player: Add transport.receive commandLuiz Augusto von Dentz2022-04-261-4/+53
| | | | | | | | This adds transport.receive command: Get/Set file to receive Usage: receive [filename]
* client/player: Add transport.volume commandLuiz Augusto von Dentz2022-04-221-2/+52
| | | | | | | | This adds transport.volume command: Get/Set transport volume Usage: volume <transport> [value]
* client/player: Fix use of unsupported config_qosLuiz Augusto von Dentz2022-04-181-113/+1
| | | | QoS is not yet supported by bluetoothd so remove them.
* client/player: Add transport menuLuiz Augusto von Dentz2022-04-141-1/+384
| | | | | | | | | | | | | | 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
* client/player: Add endpoint menuLuiz Augusto von Dentz2022-04-141-5/+1183
| | | | | | | | | | | | | | | 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