| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
uinput.h is part of kernel uapi nowadays so it can be included directly
from linux/uinput.h which has a compatible definition with 32 bits
systems:
https://github.com/bluez/bluez/issues/84#issuecomment-942155841
Fixes: https://github.com/bluez/bluez/issues/84
|
|
|
|
|
| |
This makes use of vhci_open to isntanciate the vhci btdev since that
has proper support for reading the index assigned to it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", "accept list", and "reject list".
Note that some suggestions come from
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
Also use "primary" to refer the global mgmt struct.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", and "accept list".
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL uses "central" as it is deemed to be more appropriate.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", and "accept list".
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The util_get/clear_uid functions use int type for bitmap, and are used
e.g. for SEID allocation. However, valid SEIDs are in range 1 to 0x3E
(AVDTP spec v1.3, 8.20.1), and 8*sizeof(int) is often smaller than 0x3E.
The function is also used in src/advertising.c, but an explicit maximum
value is always provided, so growing the bitmap size is safe there.
Use 64-bit bitmap instead, to be able to cover the valid range.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
Apache-2.0 : 80
LGPL-2.1-or-later : 42
GPL-2.0-or-later : 9
License: Apache-2.0
android/bluetoothd-wrapper.c
android/tester-hidhost.c
android/tester-map-client.c
android/hal-audio-aptx.c
android/hal-audio.c
android/hal-handsfree-client.c
android/tester-gatt.c
android/hal-pan.c
android/hal-socket.c
android/tester-hdp.c
android/tester-pan.c
android/tester-avrcp.c
android/hal-a2dp-sink.c
android/hal-gatt.c
android/hal-avrcp.c
android/tester-a2dp.c
android/hal-audio.h
android/hal-bluetooth.c
android/tester-socket.c
android/hal-health.c
android/hal-a2dp.c
android/hal-ipc.c
android/hal-avrcp-ctrl.c
android/hal-sco.c
android/hal-ipc.h
android/tester-main.c
android/hal-audio-sbc.c
android/hal-utils.c
android/hal-map-client.c
android/hal-handsfree.c
android/hal-log.h
android/hal.h
android/hal-utils.h
android/tester-bluetooth.c
android/hal-hidhost.c
android/audio_utils/resampler.h
android/audio_utils/resampler.c
android/system/audio.h
android/hardware/bt_sock.h
android/hardware/bt_gatt_client.h
android/hardware/bt_hh.h
android/hardware/bluetooth.h
android/hardware/hardware.h
android/hardware/bt_hf_client.h
android/hardware/bt_rc.h
android/hardware/bt_hf.h
android/hardware/bt_pan.h
android/hardware/bt_gatt_types.h
android/hardware/hardware.c
android/hardware/audio_effect.h
android/hardware/audio.h
android/hardware/bt_gatt_server.h
android/hardware/bt_gatt.h
android/hardware/bt_hl.h
android/hardware/bt_mce.h
android/hardware/bt_av.h
android/client/if-hh.c
android/client/if-sco.c
android/client/pollhandler.h
android/client/haltest.c
android/client/tabcompletion.c
android/client/if-hf-client.c
android/client/history.h
android/client/if-audio.c
android/client/terminal.h
android/client/if-av.c
android/client/if-main.h
android/client/if-av-sink.c
android/client/terminal.c
android/client/if-mce.c
android/client/if-hf.c
android/client/pollhandler.c
android/client/if-sock.c
android/client/if-rc-ctrl.c
android/client/if-rc.c
android/client/history.c
android/client/if-pan.c
android/client/if-gatt.c
android/client/if-bt.c
android/client/if-hl.c
License: LGPL-2.1-or-later
android/sco.h
android/socket.c
android/tester-main.h
android/hidhost.h
android/map-client.h
android/utils.h
android/hal-msg.h
android/health.h
android/avrcp-lib.c
android/bluetoothd-snoop.c
android/a2dp.c
android/bluetooth.h
android/a2dp-sink.c
android/handsfree-client.c
android/audio-msg.h
android/main.c
android/pan.c
android/ipc-tester.c
android/health.c
android/socket.h
android/handsfree.h
android/avrcp-lib.h
android/a2dp-sink.h
android/system-emulator.c
android/gatt.c
android/avrcp.h
android/pan.h
android/test-ipc.c
android/hidhost.c
android/a2dp.h
android/avrcp.c
android/sco-msg.h
android/bluetooth.c
android/map-client.c
android/handsfree-client.h
android/ipc.c
android/handsfree.c
android/gatt.h
android/ipc.h
android/ipc-common.h
android/compat/wordexp.h
android/cutils/properties.h
License: GPL-2.0-or-later
android/avdtp.h
android/avctp.c
android/avdtptest.c
android/sco.c
android/log.c
android/avdtp.c
android/avctp.h
android/compat/readline/history.h
android/compat/readline/readline.h
|
|
|
|
|
| |
HOG UUID is defined at multiple places in the code. Move that
definition to lib/uuid.h where all other UUIDs are defined.
|
|
|
|
|
|
| |
This is to test the behaviour of L2CAP channel when closed with
shut_down(sock, SHUT_WR). In this case, we should wait until we
receive a disconnection response before raising G_IO_HUP.
|
|
|
|
|
|
| |
status and state are used to hold various enum types depending on test
and callback passed. Define them as int to avoid warnings about enum
assignment from invalid type.
|
|
|
|
|
|
|
| |
android/handsfree.c: In function ‘bt_sco_get_fd’:
android/handsfree.c:2913:47: error: taking address of packed member of ‘struct sco_rsp_get_fd’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
2913 | if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &rsp.mtu))
| ^~~~~~~~
|
|
|
|
|
|
|
| |
android/hal-bluetooth.c: In function ‘set_adapter_property’:
android/hal-bluetooth.c:659:46: error: taking address of packed member of ‘struct hal_cmd_set_adapter_prop’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
659 | adapter_prop_from_hal(property, &cmd->type, &cmd->len, cmd->val);
| ^~~~~~~~~
|
|
|
|
|
|
|
| |
android/avrcp-lib.c: In function ‘get_element_attributes’:
android/avrcp-lib.c:967:24: error: taking address of packed member of ‘struct get_element_attributes_req’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
967 | if (!parse_attributes(* (&req->attrs), params_len - sizeof(*req),
| ^~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to A2DP specification; section SBC; Codec Specific Information
Elements; Minimum / Maximum Bitpool Value, range for Bitpool value is from
2 to 250.
A2DP specification also defines bitpool values for two SBC modes: Middle
Quality and High Quality. They depends on channel mode and frequency. So
add definitions for them into a2dp-codecs file too.
File android/hal-audio-sbc.c was updated to use High Quality mode for
chosen frequency.
|
|
|
|
|
|
| |
And define new macros A2DP_GET_VENDOR_ID(), A2DP_GET_CODEC_ID() and
A2DP_SET_VENDOR_ID_CODEC_ID() for easily filling a2dp_vendor_codec_t
struct.
|
|
|
|
| |
Those two constants are SBC codec specific.
|
| |
|
|
|
|
|
| |
This removes mainloop_set_signal and replaces it usage with
mainloop_run_with_signal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `./configure --enable-coverage` is given and lcov is present,
MISC_CFLAGS and MISC_LDFLAGS will be set to --coverage. However,
1. obexd uses per-target LDFLAGS and, in doing so, forget to re-mention
$(AM_LDFLAGS). This problem existed for a long time.
2. obexd uses per-target CFLAGS and, in doing so, forgot to re-mention
$(AM_CFLAGS). This got broken in 06dbb223fbe50acc48b3ba1d33cb424275b4baaa.
This led to no --coverage showing up in the linker line for obexd,
causing a link failure indicating unresolved symbols like
__gcov_exit.
|
|
|
|
|
|
|
|
|
| |
-D and -I are preprocessor directives, they are therefore to appear
in CPPFLAGS, not CFLAGS. (It is unfortunate that pkg-config does not
make the distinction / or it was misnamed, because only -D/-I make
sense to be emitted by pkg-config in the first place — anything else
(-f/-m) has the potential to mess up someone's compilation. So
pkg-config's Cflags is actually used to convery Cppflags.)
|
|
|
|
|
|
| |
It is an error to put -l arguments into LDFLAGS, because the linker
command line is order-sensitive and libs must appear in certain
places. For this, automake has the LDADD/LIBADD.
|
|
|
|
|
|
| |
When using automake, all AC_SUBSTed variables are made available as
make variables, so that they can also be set at make time. Therefore,
they need not use the @harcoded@ style.
|
|
|
|
| |
Use bt_log_* to send messages to the logging channel.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CC android/client/android_haltest-if-gatt.o
android/client/if-gatt.c: In function ‘multi_adv_set_inst_data_p’:
android/client/if-gatt.c:2034:7: error: ‘set_scan_rsp’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
EXEC(if_gatt->client->multi_adv_set_inst_data, client_if, set_scan_rsp,
^~~~~~~
android/client/if-gatt.c:2034:7: error: ‘include_name’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
android/client/if-gatt.c:2034:7: error: ‘include_txpower’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
android/client/if-gatt.c: In function ‘set_adv_data_p’:
android/client/if-gatt.c:1859:7: error: ‘set_scan_rsp’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
EXEC(if_gatt->client->set_adv_data, client_if, set_scan_rsp,
^~~~~~~
android/client/if-gatt.c:1859:7: error: ‘include_name’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
android/client/if-gatt.c:1859:7: error: ‘include_txpower’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:6431: android/client/android_haltest-if-gatt.o] Error 1
make: *** [Makefile:3262: all] Error 2
|
| |
|
|
|
|
|
|
| |
This is intended for use for automated logging or unatrended systems.
It doesn't contain any packet decoding functionality which results
in much smaller binary.
|
|
|
|
|
|
| |
This makes sure that emulated device starts advertising only after
discovery is ongoing and that tests go further only after device
was found. Otherwise tests were randomly failing.
|
| |
|
|
|
|
|
| |
Advertising Data doesn't have terminator field like EIR. This was
causing error logs from kernel when data length was corrected.
|
|
|
|
|
|
|
| |
This is required for custom advertising data.
The HAL entry points related to multiadvertising are now implemented
and map to the mgmnt "add advertising" operation.
|
|
|
|
|
| |
Use the mgmnt "advinfo" operation to obtain the number of advertising
instances supported by the kernel.
|
|
|
|
| |
Key loading is not supported for LE only devices.
|
| |
|
|
|
|
|
|
| |
This add support of passing a gatt-db to avoid having to discover the
services again, this should also make it easier to port to bt_gatt_client
once Android code support it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> ACL Data RX: Handle 256 flags 0x02 dlen 20 [hci0] 9.242155
Channel: 66 len 16 [PSM 25 mode 0] {chan 2}
AVDTP: Get Capabilities (0x02) Response Accept (0x02) type 0x00 label 1 nosp 0
Service Category: Media Transport (0x01)
Service Category: Media Codec (0x07)
Media Type: Audio (0x00)
Media Codec: SBC (0x00)
Frequency: 0x30
44100
48000
Channel Mode: 0x0f
Mono
Dual Channel
Stereo
Joint Channel
Block Length: 0xf0
4
8
12
16
Subbands: 0x0c
4
8
Allocation Method: 0x03
SNR
Loudness
Minimum Bitpool: 2
Maximum Bitpool: 53
Service Category: Content Protection (0x04)
Content Protection Type: SCMS-T (0x0002)
< ACL Data TX: Handle 256 flags 0x00 dlen 18 [hci0] 9.272120
Channel: 258 len 14 [PSM 25 mode 0] {chan 2}
AVDTP: Set Configuration (0x03) Command (0x00) type 0x00 label 5 nosp 0
ACP SEID: 1
INT SEID: 3
Service Category: Media Transport (0x01)
Service Category: Media Codec (0x07)
Media Type: Audio (0x00)
Media Codec: SBC (0x00)
Frequency: 44100 (0x20)
Channel Mode: Joint Channel (0x01)
Block Length: 16 (0x10)
Subbands: 8 (0x04)
Allocation Method: Loudness (0x01)
Minimum Bitpool: 2
Maximum Bitpool: 53
|
|
|
|
|
|
|
|
|
|
| |
< ACL Data TX: Handle 256 flags 0x00 dlen 6
Channel: 258 len 2 [PSM 25 mode 0] {chan 2}
AVDTP: Discover (0x01) Command (0x00) type 0x00 label 0 nosp 0
> ACL Data RX: Handle 256 flags 0x02 dlen 14
Channel: 66 len 10 [PSM 25 mode 0] {chan 2}
AVDTP: Discover (0x01) Response Accept (0x02) type 0x00 label 0 nosp 0
04 08 14 08 0c 08 08 08 ........
|
| |
|
|
|
|
|
| |
Since code.google.com is now read-only, sample implementation of BfA is
moved to GitHub. README is updated with new links.
|
|
|
|
|
| |
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
|
|
|
|
|
| |
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
|
|
|
|
|
| |
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
|
|
|
|
|
| |
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
|
|
|
|
|
|
|
|
| |
This align the 2 copies of Hog since the plan is to merge android
version back to profiles and just reuse from there.
The fix for incomplete discover is modified so the reports are keep
while attempting to discover.
|
|
|
|
| |
btd_debug() has new parameter introduced in dcfdc556.
|
| |
|
|
|
|
|
| |
This removes dead code due to memory allocation with new0 not being
able to fail.
|