Initial test script for Proximity Monitor. This patch allows the
user to set the Link Loss alert level of a given Reporter.
Usage example:
$test-proximity -i hci1 --device <mac> LinkLossAlertLevel mild
GetProperties method of Proximity Monitor should not append the
LinkLossAlertLevel property if the LinkLoss service is not enabled
in the configuration file.
Changes SetProperty method of the Proximity Monitor to verify if the
LinkLoss service is enabled before allowing to change the alert level.
Not available error is returned if LinkLoss service is disabled in the
Proximity configuration file.
Initial config file to disable Proximity and Find ME support in the
proximity monitor side. By default all services will be supported.
Config file is necessary at least to disable Find ME profile since the
Immediate Alert service is shared between Pass Loss and Find ME.
When the Proximity Monitor connects to the Reporter, it shall write its
current Alert Level (usually defined by the user) into the Alert Level
characteristic on the Monitor. So once the link is lost, the Monitor
will alert with the appropriate level.
Note: Register connection callback to write alert level to the Reporter.
There is only one instance of the Alert level in the Link Loss service.
Signal is emitted to notify other local clients that the alert level
has changed. Necessary if the proximity monitor wants to notify the user
and the application responsible for alerting is another application.
Delegates the Immediate Alert Level control to the caller(client).
Immediate Alert Service is shared between Path Loss and Find Me.
Three signal level states are defined: "good", "regular" and "weak".
Meaning that at least two thresholds are necessary to implement a
proper state transition. "unknown" will be returned if the link is not
active. For Path Loss, the logic to trigger the writting operation of
the Immediate Alert Level characteristic needs to be implemented in
the client. SignalLevel can be only one of the inputs to define when
and which value to write in the characteristic.
Currently, use of RequestSession and SetProperty adapter method
calls sets global_mode to on. Switching adapter off via plug-in
interface in this scenario releases all sessions, that, in turn,
restores adapter's state to global_mode, which is on.
Result is the adapter is switched off and immediately switched on.
This patch fixes such inconsistency by overwriting global_mode to
mode off when request comes from plug-in.
Without this patch, when dropping RFCOMM channel to sap server, the
component's channel cleanup process doesn't release assigned GIOChannel
resources since conn->io is set to NULL before calling sap_conn_remove
(which would normally do the g_io_channel_unref).
As these files are auto-generated they need to be marked as BUILT_SOURCES
so that we don't run into a build race later on. lib/bluetooth is removed
by clean-local so this doesn't need to be in CLEAN_FILES
Local initiated disconnection will be triggered when the last GAttrib
reference is dropped. For remote initiated disconnection it is necessary
to track the socket HUP registering disconnection GAttrib callback.
In the ATT callbacks registration function, the connection callback should
not be called in the same main loop iteraction to avoid accessing not
initialized data in the profiles during probing.
Connection should not be dropped if there is at least one ATT connection
callback registered. After discovering primary services over the LE link,
GAttrib ref needs to be held to allow notifying an active connection
while registering connection callbacks(inside plugins probing).
In the Generic Attribute API, when DiscoverCharacteristics is called
ATT connection should be requested if the link is not up. A query
list is required to control when the link can be disconnected since
the discover finishes after receiving all caracteristic declarations.
In the Generic Attribute API, the ATT connection should be requested
on demand. In the case of watchers, the connection doesn't need to be
stay up if there isn't watcher registered.
Generic attribute API should not actively manage L2CAP connections.
GAttrib instance is notified through registered callbacks. SetProperty
or DiscoverCharacteristic now returns NotConnected error if the link
is down.
Get rid of local structure to store all GATT primary services of a
given device. "primary" struct has been renamed to "gatt_service"
to avoid misinterpretation or confusion with "att_primary".