| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Previously le device found callback was set every time we triggered the scan
from gatt. But it does no longer work like that. This callback is now set
when gatt profile is registered and should not be used for checking if we
should be retriggering the scan. Expected discovery flag should be
used directly instead.
|
|
|
|
|
|
| |
In android we add devices to auto connect list when application trigger
connect. We need to make sure that when bluetooth is turn on there is
no devices in auto connect list in the kernel.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This patch set option kernel connection control to TRUE if mgmt interface
is 1.7 or higier. Kernel connect control means that things like
background scan, auto connect or white list are supported by kernel and
can be used by daemon.
|
|
|
|
|
| |
g_clear_error() frees err and set it to NULL. This fixes dead code
warnings from analyzers.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Current bearer pair state needs to be checked as well since event
triggering state update can be received multiple times.
This fix crash on bluetoothd shutdown due to double free of device.
|
| |
|
|
|
|
| |
If device was using RPA but address was resolved IDA must be used.
|
|
|
|
|
|
|
|
|
| |
This patch allows to pair with devices using RPA. There is no API
to notify HAL about new Identity Address. When New IRK event is
received ID address is stored in device and map to RPA is done.
This allows to use RPA after address was resolved making this
transparent to Android Framework. When daemon is restarted device
is advertised to Framework with ID address.
|
|
|
|
| |
This will be used to fake address for Android Framework.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Address type is stored as "AddressType" key. Also this is valid only
for LE capable devices.
|
| |
|
|
|
|
| |
Set bonded state if received new CSRK.
|
|
|
|
| |
CSRK information should be removed when unpaired.
|
|
|
|
|
| |
The code was not setting the expected discovery type for the next round
when discovering is active.
|
| |
|
|
|
|
|
| |
This is necessary so that devices found during regular discovery can be
handled by gatt HAL.
|
| |
|
|
|
|
| |
Load IRKs from file.
|
|
|
|
| |
Persistent storage is used so we can load IRKs on startup.
|
|
|
|
|
|
| |
Client Characteristic Configuration for Service Changed Characteristic
should be stored for every bonded device, so we know if we should be
sending value (range affected by changes) indication.
|
|
|
|
|
| |
This was affecting TC_AG_SRC_HFAV_ACT_SD_BV_01_I and
TC_SDP_CTH_SD_BV_01_I PTS qualification tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following:
==25759== Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to
uninitialised byte(s)
==25759== at 0x521C570: __sendmsg_nocancel (syscall-template.S:82)
==25759== by 0x41688F: ipc_send (ipc.c:366)
==25759== by 0x40ECF8: send_ssp_request (bluetooth.c:1028)
==25759== by 0x4110A6: user_confirm_request_callback
(bluetooth.c:1055)
==25759== by 0x4094FE: queue_foreach (queue.c:186)
==25759== by 0x409FCF: can_read_data (mgmt.c:287)
==25759== by 0x408E4C: read_callback (io-glib.c:168)
==25759== by 0x4E79D12: g_main_context_dispatch (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==25759== by 0x4E7A05F: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==25759== by 0x4E7A459: g_main_loop_run (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==25759== by 0x40454D: main (main.c:538)
==25759== Address 0x7ff00085d is on thread 1's stack
==25759== Uninitialised value was created by a stack allocation
==25759== at 0x40EC77: send_ssp_request (bluetooth.c:1018)
|
|
|
|
|
| |
If CSRK is valid between sessions we should remember sign counter.
Therefor store it.
|
| |
|
|
|
|
|
| |
CSRK is generated while paring and should be used for sign att packets
when LE devices uses write signed command.
|
| |
|
|
|
|
|
| |
This is needed so GATT can notify GAP that write sign has been done and
sign counter shall be increased as per spec.
|
|
|
|
|
| |
GATT will take CSRK key and sign counter each time it needs it to sign
att package or to verify att package
|
|
|
|
|
|
| |
If device is bonded then discoverable flag is not set. This cause that
gatt application will not get scan callback with advertising bonded
device.
|
|
|
|
|
| |
This makes code easier to follow. Also LE address type is not lost
if dual mode device connected over BR/EDR.
|
|
|
|
|
|
|
|
|
| |
This is a preparation for correctly handling no bond pairing.
Currently paired but not bonded devices are left on list of bonded
devices in Framework until BT is restarted on device. This is due to
Android Framework is not allowing stack to unpair device by its own
(setting bond state bonded->no_bond is ignored).
|
|
|
|
|
| |
If device is paired on LE and BR/EDR it should be unpaired on both
bearers.
|
|
|
|
|
|
|
|
|
| |
It is possible that dual mode device is paired both for LE and BR/EDR
link. This patch add tracking of this.
Due to HAL API contraints second pairing will result in following bond
state changed events:
bonded -> bonding (success) -> bonded (success/failed)
|
|
|
|
|
| |
This allows to correctly choose address type when pairing dual mode
devices.
|
| |
|
| |
|
|
|
|
| |
This will be used by GATT HAL.
|
|
|
|
|
| |
BR/EDR and LE features can be toggled before daemon is started and
we should not assume their state.
|
|
|
|
|
| |
If device is not known (ie. OOB pairing) create new device object
so it can be later used in pairing events.
|
|
|
|
| |
This allows to fill event with all required data.
|
|
|
|
|
| |
This is in preparation for always having device object present when
handling events.
|