Age | Commit message (Collapse) | Author | Files | Lines |
|
Bonding is handled in device.c and auth_type_t is private device data
not used outside of it.
|
|
|
|
This allow to remove number of local variables used only to get device
address and pass it as pointer later on.
bdaddr_type parameter is also removed as there is device_get_addr_type
already present which can be used to get it if needed.
|
|
Since controllers don't support more than one ongoing connection
procedure at the same time, new connection attempts needs to yield if
there is an ongoing connection procedure already.
|
|
Refactor code to drop the device authorizing flag by replacing it with a
private authorization pointer in btd_adapter. After all, no more than
one authorization can be ongoing, so the code is easier to follow if
this is made explicit.
|
|
|
|
Particularly With the introduction of external profiles the probe
functions must be possible to be triggered at any point during runtime.
|
|
This patch removes redundant references and function parameters for
DBusConnection object and uses btd_get_dbus_connection() call wherever
such object is needed instead.
Pointer returned by this call is guaranteed to be valid for entire
bluetoothd lifetime and thus do not need to be refcounted.
|
|
When a connection is needed for a LE device it is added to the adapter
connect list instead of directly connecting the ATT io channel.
|
|
|
|
This is a utility function similar to device_address_cmp but comparing
bdaddr instead of the string representing the address. This way is
possible to avoid allocating two buffers to temporarily hold the
strings, two sprintf() calls to generate the strings from the bdaddr
arrays, and a string comparison, substituting all of it for one memcmp()
call.
|
|
|
|
This patch removes the btd_device_driver concept and replaces it with
btd_profile. The new construct also contains the necessary parts for
adapter drivers, so btd_adapter_driver is only needed for non-profile
related functionality (most of which is in plugins/*).
The main purpose of this new construct is to facilitate a centralized
connection creation mechanism for profiles, ultimately enabling the
addition of a Device.Connect() method instead of requiring a UI to know
to call e.g. Input.Connect or Audio.Connect.
This feature will also be extended to externally implemented profiles
once the internal implementation gets more stable, such as OBEX (obexd)
and HFP (oFono). The new D-Bus interface will also partially restore
functionality which was previously available through the Serial
interface.
|
|
This patch address the "Service Changed" scenario on which the start
and end Primary Service attribute handle interval doesn't change.
|
|
Emit PropertyChanged changed signal in the Device hierarchy when the
Appearance characteristic value is read from the remote GAP service.
|
|
This patch adds a new device method to access the Appearance GAP
characteristic value stored previously as result of the discovery
procedure or GATT characteristic read procedure.
|
|
Addressing types can be either BR/EDR, BLE public or BLE random so
the entries in the "ccc" file did not contain enough information to
distinguish which addressing type it's supposed to be. Entries will
now contain both address number and address type as a single key in
every entry in the file.
|
|
This patch replaces addr_type_t by the new Bluetooth address type
constants defined in bluetooth.h
|
|
This new authentication type accepts a pincode and calls the
DisplayPinCode agent method, a fallback is provided so that if the
method is not implemented the older RequestPinCode method is used
instead.
Due to this fallback, the agent_pincode_cb is used and calling
functions should send the pincode passed to the callback to the
adapter, which may differ from that generated.
|
|
This allows alternate data of a different type to be passed to
device_request_authentication() for other notification types such
as those that require a PIN.
|
|
This makes room for additional notification types to be added.
|
|
Read the PNP ID characteristic of the DeviceInfo Service, and
store it inside the btd_device, for use by other profiles.
|
|
In the case of incomming connections we have to know the type of
the device that connected to us.
Through hciops we have the LE Connection Complete event, that
information was lost when Management interface was being used.
|
|
|
|
Skeleton of automatic connections driven by platform/user event.
Two layers will manage connections: Profiles can request on demand
connections registering ATTIO connection callbacks(one attempt) for
a given device and platform/user action can trigger automatic
connections for devices with ATTIO callbacks registered.
|
|
This identifiers can be used by applications to implements quirks which
seems to be very common in some profiles such as syncml and since this
information is already stored permanently we can quickly retrieve it
without having to connect or parse the records again.
|
|
Add support for mgmt interface events for device blocking/unblocking.
Kernel sends a mgmt event when a device has been blocked by another
management socket or with ioctl command (e.g. by hciconfig).
Parameter update_only is added to device_block/unblock functions in
device.c to avoid code copying. When update_only is true, blocking
command is not sent to kernel, but only device status is updated and
dbus signal is sent.
|
|
|
|
Fix Paired device property if 'No Bonding' authentication is used. It is
set to be false when device is disconnected and no link key is stored.
Otherwise, there can be cases when device is still valid and being
claimed as paired without available bonding information.
For instanse, use of CreateDevice method call and obex client file
transfer is such use case.
|
|
Use secure pin code parameter received from the kernel in
MGMT_EV_PIN_CODE_REQUEST event and propagate this to agent
code.
Secure flag is specific for the pin code request only.
|
|
Adds a new device function to address the PropertyChanged
signal when the device's class changes. event.c file should
avoid sending signals that belongs to device objects.
|
|
|
|
|
|
btd_device_add_service is no longer necessary if the object paths for
the primary services can be returned during the registration.
|
|
|
|
There's no need to expose the auto-accept case to the core daemon so
move it to hciops. For the management interface this will all be handled
on the kernel side.
|
|
This patch refactors the pairing code in hciops and the core daemon to
better match the management interface. Particularly all logic regarding
IO capabilities and authentication requirements are moved into hciops.c.
The patch is quite big because there are a lot of cross-dependencies
which makes it difficult to split the changes up into smaller chunks.
The important adapter_ops preparations for the management interface in
this patch are the create_bonding and cancel_bonding callbacks. Those
will be directly mapped to corresponding management commands.
|
|
There's no point to export connection handle details to the core daemon
since it will not be available in the management interface. Instead
track the handles inside hciops (managment interface will do this inside
the kernel).
|
|
CreatePairedDevice implements now the same behaviour of CreateDevice,
triggering Discover All Primary Services when needed. SMP negotiation
starts when the link is established. LE capable kernel is required to
test this method properly.
Limitation: For dual mode devices, Discover All Primary Services is not
being executed after SDP search if GATT record is found.
|
|
This is needed to keep consistency, as device_add_service would be used
from outside the core bluetoothd.
|
|
As the primary services were discovered by the core bluetoothd, we need
a way to export that information.
The service discovery uses the same primary list as the device, there's no
need to free that list when the discovery finishes. That list will be removed
when the device is free'd.
|
|
This adds a way to restore devices from their types.
|
|
In the case of upgrading an unauthenticated key to an authenticated one
there will be a second authentication request which needs to be cleared
upon the link key notification event.
|
|
If EIR Flags field is sent in the advertising data, it can be used
to detect the operation mode. If the remote device is dual mode,
GAP operation mode defines that it shall follow the connectable
mode for BR/EDR and non-connectable mode for LE. This patch forces
service discovery protocol prior to Discover All Primary Services.
|
|
For CreateDevice, if the remote device is LE capable, Discover All
Primary Services shall be issued instead of SDP queries. The logic
to define if the remote is LE capable shall be based on the result
of the interleaved discovery results. Meaning, the remote device
is classified as LE capable only if an advertising event from this
device was collected during the discovery.
Limitation: Advertising event data is not being considered yet to
infer the remote properties and CreateDevice needs to be called
during the discovery session.
|
|
Add a new property "Services" representing the object paths of the
available GATT primary services. "Services" is an array of D-Bus object
paths.
|
|
|
|
When a new link key is created but it doesn't match any criteria to be
stored any previouly one should be removed from filesystem.
|
|
This patch adds the possibility of using debug keys for consequtive
connections by storing them in runtime memory instead of discarding them
after the connection. This functionality can be enabled using a new
DebugKeys boolean parameter in main.conf.
|
|
|