| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to send any passthrough command, complete with the
support to hold down the key. Using Press() will automatically
release the key, while using Hold() will keep the key held until
an explicit call to Release() is received.
This doesn't allow us to hold multiple keys simultaneously, since
according to the AV/C Panel Subunit Specification, part 9.4, when the
target receive a pressed command without receiving a release command
of the previous key, it will be treated as if the release command is
sent but not received.
Previously, the rewind and fast_forward keys are unique in terms that
they are treated as holdable keys, this patch preserves that behavior
of calling Rewind() and FastForward(). A rewind event which is
reported via the new Press() method will automatically be released
instead.
|
|
|
|
|
|
|
| |
This allows us to send any passthrough command. The button can also
be held for an extended amount of time.
Reviewed-by: Michael Sun <michaelfsun@chromium.org>
|
|
|
|
|
|
|
|
|
| |
Change option "config" ('c') to "storage" ('s) to specify
a custom storage directory for node configuration.
Change option 'f' (long name was missing) to "config" ('c')
to specify a custom mesh configuration file to override the
default mesh-main.conf
|
|
|
|
|
| |
In model.c, tx_Start is a static variable, dynamically set, but
never used. Is removed now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to pretty print Suspend and Resume mgmt events in btmon.
Example:
@ MGMT Event: Controller Suspended (0x002d) plen 1
Suspend state: Page scanning and/or passive scanning (2)
@ MGMT Event: Controller Resumed (0x002e) plen 8
Wake reason: Remote wake due to peer device connection (2)
LE Address: CD:F3:CD:13:C5:9A (OUI CD-F3-CD)
|
|
|
|
| |
Add the controller suspend and resume events.
|
|
|
|
|
|
|
|
|
| |
Check whether an incoming message has an RPL entry prior to
handing it over to model layer for processing. If present in RPL
or the RPL queue is full, ignore the incoming message.
If the incoming message is processed successfully, add the message
as a new RPL entry.
|
|
|
|
|
|
|
|
| |
When either a new node is created or an existing node is loaded from
storage, initialize RPL storage directory.
Additionally, when an existing node configguration is read from storage,
load saved RPL entries into the corresponding RPL lists.
|
|
|
|
|
|
| |
Store NetKey and AppKey indices as integers instead of hex strings.
This removes unnecessary string manipulations while not affecting
the configuration file readability.
|
|
|
|
|
|
|
| |
Without reordering these two statements, the logs look like this:
bnep%d connected
bnep0 disconnected
|
|
|
|
|
|
| |
Currently parse_includes() will return false if the "Includes" property
is an empty array. Empty array in the "Includes" property should be
treated as valid.
|
|
|
|
|
| |
This caused the device hanging around as a discovered device forever
even if it is turned off or not in present.
|
|
|
|
|
| |
This adds a new dictionary paramenter (empty by default) when
invoking Send() or Publish() methods.
|
|
|
|
|
| |
This adds a new dictionary paramenter (empty by default) when
invoking Send() and DevKeySend() methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds processing of "options" dictionary argument in Send,
DevKeySend & Publish methods on mesh.Node interface.
This new argument is a dictionary that currently has only one
new key word defined for Send() and DevKeySend():
"ForceSegmented" - to force small payloads to be sent as
one-segment messages
In case of Publish(), and additional keyword is defined
"Vendor" - 16-bit Company ID as defined by the Bluetooth SIG
Other key words may be defined in future to accommodate evolving
requirements of Mesh Profile specification.
Also, the addition of "options" dictionary to Publish allows to
eliminate VendorPublish() method (taken care by "Vendor" keyword).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This modifies Send, DevKeySend and Publish methods
on mesh.Node interface to include additional argument "options".
This new argument is a dictionary that currently has only one
new key word defined for Send() and DevKeySend():
"ForceSegmented" - to force small payloads to be sent as
one-segment messages
In case of Publish(), and additional keyword is defined
"Vendor" - 16-bit Company ID as defined by the Bluetooth SIG
Other key words may be defined in future to accommodate evolving
requirements of Mesh Profile specification.
Also, the addition of "options" dictionary to Publish allows to
eliminate VendorPublish() method (taken care by "Vendor" keyword).
|
|
|
|
| |
This prevents error 0x12 when enabling/disabling LE scans
|
|
|
|
|
|
|
| |
Retrieve value of bound Net Key index based on the value of
passed AppKey index. Check if the key is present and fail early
in case of error. Also, pass the correct NetKey index to model
layer in mesh_model_send(), instead of hard coded 0.
|
|
|
|
|
|
| |
This adds previously missing retransmit count and interval values
specific to model publications. The values are configured by Config CLient
and may be different to each model.
|
|
|
|
|
|
|
|
|
|
|
| |
When Connect() is called and waiting for return, dev_disconnected may be
called due to MGMT_EV_DEVICE_DISCONNECTED event from kernel. In that
case reply to client that the connection failed otherwise the dbus
method will timeout because bluetoothd never replies.
Tested with simulation of a lot of Connect() to bluetooth devices and
check that error is returned from bluetoothd rather than dbus timeout
when this race condition happens.
|
|
|
|
|
|
| |
discovery_disconnect crashed because the adapter pointer has been freed
before. This patch makes sure that discovery list is cleaned up before
adapter pointer is freed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When destroying UHID, we should also unregister all event listeners so
that they don't get double registered at reconnection. It fixes a bug
where battery report is not available to kernel after reconnection and
also prevents memory leak.
Tested with Logitech M535 mouse:
* Connect mouse to the device running BlueZ
* cat /sys/class/power_supply/hid-{addr}-battery/capacity # works
* Disconnect mouse
* Reconnect mouse
* cat /sys/class/power_supply/hid-{addr}-battery/capacity # still works
|
|
|
|
|
| |
This adds cancel-pairing command which can be used to cancel the ongoing
pairing.
|
|
|
|
|
|
| |
The value of net_index in DevKeyMessageReceived() method must be set
to the value of a subnet index on which a device key encoded message
has been received. Was hard coded to 0. Fixed.
|
|
|
|
|
|
| |
This moves the check for incoming messages addressed to fixed addresses,
e.g. RELAY, PROXY, FRIEND. If the corresponding feature is not enabled,
the message is not processed.
|
|
|
|
|
|
|
| |
The network settings such as relay, beacon, proxy and friend are
always set based on local node feature settings. This change makes
the net modes initialization unconditional, to include the "No Support"
setting on node level which should result in the disabled mode in net.c
|
|
|
|
|
| |
This is to configure the default behavior of issuing SDP query
to update the services upon profile connection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the HID1.1 spec, part 5.3.4.9:
The HIDSDPDisable attribute is a Boolean value, which indicates
whether connection to the SDP channel and Control or Interrupt
channels are mutually exclusive. This feature supports Bluetooth
HID devices that have minimal resources, and multiplex those
resources between servicing the initialization (SDP) and runtime
(Control and Interrupt) channels.
However, Bluez still tries to connect SDP upon HID connection,
regardless of the existence of the HIDSDPDisable attribute.
This patch prevents the connection of SDP after HID has been
established, if the device has HIDSDPDisable attribute.
|
|
|
|
|
| |
This moves MAX_ADV_DATA_LEN macro to src/shared/ad.h and rename it to
BT_AD_MAX_DATA_LEN.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
client_free would always send a dbus method_return to fix the case where
a request to Unregister occurred before the MGMT call returned. However,
in the code path where too many advertisements are registered, this
method_return prevents the failure from being sent properly. This patch
makes sure the reference to the register_advertisement DBusMessage is
not stored in the client structure until the end of
register_advertisement. This ensures that we only respond once, either
in register_advertisement or in client_free, not both.
It also changes the dbus response in the fast unregister_advertisement
case from a method_return to a btd_error_failed, since the registration
was never allowed to complete, and thus was not successful.
The patch was tested in the following ways:
To verify it did not break the segfault fix in
caff2b48ca54bbc57b5da3f63317767489aa5b48, I repro'd the failure by
quickly unregistering after registering, and verified that the segfault
is still fixed with this change.
Ran through our automated tests that register too many advertisements
and verify that the registration fails with the intended "Maximum
Advertisements Reached" error response.
|
|
|
|
|
|
|
| |
Due to the asyncronous multi-step process to send a packet on an HCI
socket, an outbound packet could be superseded before send procedure
is completed. This change ensures that at any stage in the process,
that the pointer to the packet has been fully disposed.
|
|
|
|
|
|
|
|
| |
Adding a sonfig server model when loading from storage is unnecessary,
since the daemon-generated stored configuration always contains
config server model.
This also fixes a memory leak caused by bad parameters passed to
mesh_model_add()
|
|
|
|
|
|
| |
This changes the order of function arguments in
mesh_config_model_binding_add() and mesh_config_model_binding_del()
to make them consistent with the rest of mesh_config_model... APIs
|
|
|
|
|
|
|
|
| |
Model IDs for SIG defined models need to be stripped off SIG_VENDOR
value used for internal housekeeping prior to calling functions
that save new model state in node configuration.
Also, remove duplicate statements for model lookup in node config.
|
|
|
|
|
|
| |
Config Key Refresh Phase Status is 4 octets long (see Mesh Profile
v1.0.1, section 4.3.2.60): 1 octet for status, 2 octets for net key
index, 1 octet for the phase.
|
|
|
|
|
| |
This fixes opcode check condition when saving configuration for model
subscriptions: use || instead of && for opcode checking
|
|
|
|
|
| |
Use element address for looking up element index (subscription
address was erroneously used to perform the lookup).
|
|
|
|
|
|
|
|
| |
Because l_queue_find can't distinguish between entry->data equal to zero
and missing entry, has_binding() fails when we bind app key with index
0, via L_UINT_TO_PTR.
Bug has been introduced in commit 1a2a6debd
|
|
|
|
|
|
|
|
|
|
| |
Move heartbeat publication/subscription timers and housekeeping
to net.c since this is where the trigger events and control messages
are handled. Configuration server (cfgmod-server.c) stays
responsible for parsing the set pub/sub message parameters and
assemblying the pub/sub status messages.
Also, make sure that the correct message status is reported.
|
|
|
|
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
Also, this checks for the correct relationship between KR transition
and KR phase values. Correct error codes are sent on unsuccessful
requests and malformed requests are ignored.
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
|
|
|
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
Also, return Feature Not Supported errror code when credential
flag is set, but the node does not support LPN feature
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
|