summaryrefslogtreecommitdiff
path: root/android/bluetooth.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Inclusive language changesArchie Pusaka2021-09-211-2/+2
| | | | | | | | 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>
* android: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-2/+2
|
* android: Enable multiadvertisingMartin Fuzzey2017-11-061-0/+129
| | | | | | | 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.
* android: Get max advertising instances from kernelMartin Fuzzey2017-11-061-1/+43
| | | | | Use the mgmnt "advinfo" operation to obtain the number of advertising instances supported by the kernel.
* android: Skip key loading for LE only devices.Martin Fuzzey2017-11-061-1/+5
| | | | Key loading is not supported for LE only devices.
* android: Remove dead codeSzymon Janc2015-10-301-17/+0
| | | | | This removes dead code due to memory allocation with new0 not being able to fail.
* android/bluetooth: Remove address type from BT callbacksSzymon Janc2015-03-051-12/+10
| | | | | | GATT code should always use bt_get_id_addr() when directly dealing with remote address. This is to make sure that proper address and type is used.
* android/bluetooth: Add support for CSRK authetication levelSzymon Janc2015-02-271-13/+22
| | | | | This allows to get information if CSRK is authenticated or not. For client it is don't care if CSRK is authenticated or not.
* android/bluetooth: Store if CSRK is authenticatedSzymon Janc2015-02-271-0/+18
| | | | This adds support for storing information if CSRK is authenticated.
* android/bluetooth: Fix not marking device as bondedSzymon Janc2015-02-271-25/+19
| | | | Any permanently stored key is indication of device being bonded.
* mgmt: Update code to match updated New CSRK specificationJohan Hedberg2015-02-271-2/+4
| | | | | The 'master' parameter was renamed to 'type' and now has two new possible values.
* android/bluetooth: Fix enabling secure connectionLukasz Rymanowski2015-02-191-3/+4
| | | | | | | | | | Current code works fine for controllers supporting BR/EDR secure connections. We want to have LE Secure connection enabled also for controllers which does not support BR/EDR secure connections. For this we need to set secure connection in the kernel just after LE is enabled (if requested on register)
* android/bluetooth: Fix MPS UUIDSzymon Janc2015-02-171-1/+1
| | | | Add service class UUID instead of profile UUID to UUIDs list.
* android: Use common MPS implementationSzymon Janc2015-02-171-100/+9
| | | | This allow for dynamic MPS configuration ie fixing MPS on tablets.
* android/bluetooth: Implement get_connection_state on daemonSzymon Janc2015-02-151-4/+13
| | | | | | Track if ACL is connected and response corretly to get_connection_state call. This seems to be used by some application to query for device connection state.
* android: Add debug when remote device is connectedSzymon Janc2015-01-161-0/+4
|
* android: Fix not updating remote device BR/EDR support correctlySzymon Janc2015-01-161-11/+8
| | | | | | | If device that was previously seen only over LE connected over BR/EDR it's type was not properly updated to dual mode. This was affecting PTS TC_DM_BON_BV_01_C test.
* android/bluetooth: Add API to check if device is bondingLukasz Rymanowski2014-12-191-0/+11
| | | | | | Some modules like GATT might be interested in information about ongoing bonding on device. It can be useful e.g. to take decision if GATT can do service search or should wait until bonding is done.
* android/bluetooth: Add possibility to register for bonded eventLukasz Rymanowski2014-12-191-0/+37
| | | | | | | Some modules might be interested in fact that device has been bonded. This patch allows to register for that event Note that callback is called only on success bonding.
* android/bluetooth: Minor fix, add missing NULL assignmentLukasz Rymanowski2014-12-191-0/+2
|
* android/bluetooth: Minor typo fixLukasz Rymanowski2014-12-191-1/+1
|
* android/gatt: Add connectable flag to device found callbackLukasz Rymanowski2014-12-181-3/+6
| | | | | | GATT is interested in advertising event type i.e if it is connectable or not. It is because GATT does not want to trigger connection to devices doing non-connectable advertising. This patch add such support.
* android/gatt: Remove discoverable flag from device found callbackLukasz Rymanowski2014-12-181-4/+1
| | | | | | | Android is interested in all of the Scan Responses. Also the ones which are set as non discoverable. It is in order to support Observer\Broadcaster mode. Therefore discoverable flag can be removed from the device found callback. This patch does it.
* android: Use shared helpers for endian conversionMarcel Holtmann2014-12-131-17/+17
|
* android/bluetooth: Add support to read Le features by AndroidLukasz Rymanowski2014-12-101-0/+48
| | | | | LE Features is new property added in Android Lollipop. Framework is expecting to get those features on bluetooth start.
* android/hal-bluetooth: Implement read_energy_infoMarcin Kraglak2014-11-241-0/+12
|
* android/hal-bluetooth: Implement get_connection_stateMarcin Kraglak2014-11-241-0/+24
|
* android/bluetooth: Fix whitespace issuesSzymon Janc2014-11-051-2/+2
|
* android/hal-bluetooth: Add parameter to create_bondAndrei Emeltchenko2014-11-041-0/+6
| | | | | | | Add parameter to create_bond following new bluetooth.h HAL, transport is defined in bluedroid include/bt_types.h. Bluetooth daemon shall check transport parameter and make needed decisions, by default parameter is unknown and this is the way bluedroid manage it itself.
* android/bluetooth: Fix Supported feature bitmask for MPMD scenariosMarcin Kraglak2014-10-211-1/+1
| | | | | Set A2DP-SRC_AVRCP-TG instead of A2DP-SNK_AVRCP-CT_DUN-DT bit. It was affecting TC_SDP_CTH_SD_BV_01_I PTS test case.
* android/bluetooth: Extend bt_update_sign_counter function with valueLukasz Rymanowski2014-10-031-3/+4
| | | | | With this patch, gatt can set any value to each local/remote signed counter. It is need by next patch.
* android/bluetooth: Use configured values for DIDSzymon Janc2014-10-021-17/+8
|
* android/bluetooth: Use model name for default adapter nameSzymon Janc2014-09-221-5/+12
|
* android/bluetooth: Minor style fixGrzegorz Kolodziejczyk2014-09-031-28/+23
|
* android/bluetooth: Set unpaired cb list to NULL while unregistering btGrzegorz Kolodziejczyk2014-09-031-0/+1
| | | | | | Unpaired callback list for profiles needs to be set to NULL while unregistering bluetooth. Other profiles may try to unregister and remove its unpair cb, this cause invalid read callback list.
* android/bluetooth: Fix bond state for non-bonded devicesLukasz Rymanowski2014-09-021-8/+19
| | | | | | | When device is paired but no-bonded, Android GUI keep incorrect bonds state after ACL disconnect. This patch fixes that This patch also moved device_is_paired() up in the file
* android/bluetooth: Improve sending bond state notificationLukasz Rymanowski2014-09-021-6/+7
| | | | | This patch makes sure that any bond state changes of remote device is corretly distributed to Android framework.
* android/bluetooth: Fix status in "fake" bonding notificationLukasz Rymanowski2014-09-021-1/+1
| | | | When sending "fake" bonding" we should use SUCCESS status
* android/bluetooth: Extract function sending bond stateLukasz Rymanowski2014-09-021-14/+22
|
* android/bluetooth: Fix handling paring related eventsLukasz Rymanowski2014-09-021-5/+5
| | | | | | | | | | | As it turns out it is possible that kernel send to user space mgmt events related to pairing before device connected event. In such case BfA was dropping such event because he does not know device. With this patch, if device is not in the cache, BfA will create it. Issue triggered by test: "Bluetooth Accept Bond - Just Works - Success"
* android/bluetooth: Add tracking if device is in white listLukasz Rymanowski2014-09-021-2/+21
| | | | | | This patch adds tracking if device is in white list or not. This is in order to make sure that we call mgmt inteface only when neccessary
* android/bluetooth: Add unpaired device callbackLukasz Rymanowski2014-08-291-3/+48
| | | | | | GATT, HID, HOG, might be interested in the fact that some device has been unpaired in order to clear cache or similar. This patch adds means to register and unregister callback for unpaired event.
* android/bluetooth: Fix incoming just works bondingLukasz Rymanowski2014-08-281-1/+13
| | | | | With this patch Android framework will be notified about bonded device which initiated bonding and used just works association model.
* android/bluetooth: Add debug log to select_device_bearerLukasz Rymanowski2014-08-201-3/+10
| | | | | | This patch refactor a bit select_device_bearer function so we can get debug log out of it. This log might be very useful in dual mode devices scenarios
* android/bluetooth: Fix bdaddr_type in pairing scenarioLukasz Rymanowski2014-08-201-3/+5
| | | | With this patch correct bdaddr type is used in ssp pairing scenario
* android/bluetooth: Update pairing status on pair complete eventLukasz Rymanowski2014-08-201-8/+5
| | | | | | | | | | | | | | | | | | | | | | So far BfA updates android bond state after link key(s) are distributed. With LE pairing it might happen that no keys are distributed e.g remote device has Initiator Key Distribution and Responder Key Distribution set to 0. In such case link is encrypted with STK and after its disconnected, pairing needs to be done again. With this patch Android will get update about pairing complete just after BfA gets pairing complete from the kernel. It solve issue withnot updated Android settings application, which is hanging on "Pairing", in case when no keys are distributed. However, bacause Android does not see the difference between bonded / paired devices and because Android does not allow to update its bond state if FSM it is not in 'pending' state, BfA updates Android with BONDED state on pair_complete with success. This is how we are doing so far for bonding and non-bonding pairing. Note: BfA will update its bonded state after link key(s) are distribiuted.
* android/bluetooth: Fix device found notificationLukasz Rymanowski2014-08-191-3/+4
| | | | | | | | | | | | | | If device is dual mode and can be seen on both LE and BREDR, then bdaddr_type in device struct keeps LE address type of that device. During discovery, we should take current bdaddr_type to decide about passing that device up to application or not. Using dev->braddr_type might be misleading This patch fix scenario when remote device is known as LE device and recently has been found on inquiry seesion as DUAL mode device. In such case, based on braddr_type and eir flags we could incorectly skip new device notification for Android framework.
* android/bluetooth: Fix getting RFCOMM channel instead of L2CAP PSMJohan Hedberg2014-08-151-1/+1
|
* android: Fix memory leakAndrei Emeltchenko2014-08-151-2/+7
| | | | protos gets allocated and needs to be freed