summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 5.555.55Marcel Holtmann2020-09-062-1/+24
|
* build: Update library versionMarcel Holtmann2020-09-061-1/+1
|
* lib: Update company identifiersMarcel Holtmann2020-09-051-0/+292
|
* avrcp: Implement Press/Hold/Release method for MediaPlayer1Archie Pusaka2020-09-046-53/+189
| | | | | | | | | | | | | | | | | | | 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.
* doc/media-api: Add Press/Hold/Release methods for MediaPlayer1Archie Pusaka2020-09-041-0/+29
| | | | | | | 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>
* mesh: Align option names with functionalityInga Stotland2020-09-031-7/+8
| | | | | | | | | 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
* mesh: Remove unused timing variable tx_startInga Stotland2020-09-031-6/+0
| | | | | In model.c, tx_Start is a static variable, dynamically set, but never used. Is removed now.
* client: Fix typo in bluetoothctlBarry Byford2020-08-311-2/+2
|
* monitor: Add support for Suspend and Resume eventsAbhishek Pandit-Subedi2020-08-311-0/+55
| | | | | | | | | | | | | 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)
* mgmt: Add controller suspend and resume eventsAbhishek Pandit-Subedi2020-08-311-0/+14
| | | | Add the controller suspend and resume events.
* mesh: Move RPL check from model to net layerInga Stotland2020-08-284-106/+106
| | | | | | | | | 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.
* mesh: Initialize RPL when creating or loading a nodeInga Stotland2020-08-285-21/+37
| | | | | | | | 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.
* mesh: Store key indices as integers in node configInga Stotland2020-08-281-64/+38
| | | | | | Store NetKey and AppKey indices as integers instead of hex strings. This removes unnecessary string manipulations while not affecting the configuration file readability.
* profiles/network: Log connection event after setting device nameedef2020-08-271-1/+1
| | | | | | | Without reordering these two statements, the logs look like this: bnep%d connected bnep0 disconnected
* gatt: Accept empty array in parse_includes()Jie Jiang2020-08-271-5/+7
| | | | | | 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.
* adapter: Mark device temporary state pairing failureYu Liu2020-08-271-0/+8
| | | | | This caused the device hanging around as a discovered device forever even if it is turned off or not in present.
* test/test-mesh: Add "options" to Send/PublishInga Stotland2020-08-261-2/+9
| | | | | This adds a new dictionary paramenter (empty by default) when invoking Send() or Publish() methods.
* tools/mesh-cfglient: Add "options" to Send/DevKeySendInga Stotland2020-08-261-0/+8
| | | | | This adds a new dictionary paramenter (empty by default) when invoking Send() and DevKeySend() methods.
* mesh: Handle "options" dictionary in Send/Publish methodsInga Stotland2020-08-264-82/+75
| | | | | | | | | | | | | | | | | | | 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).
* doc/mesh-api: Add "options" dictionary to Send/PublishInga Stotland2020-08-261-25/+35
| | | | | | | | | | | | | | | | | | 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).
* mesh: Add random address to mesh HCI initDaan Pape2020-08-221-0/+9
| | | | This prevents error 0x12 when enabling/disabling LE scans
* mesh: Use valid net key index when handling Send callInga Stotland2020-08-222-6/+9
| | | | | | | 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.
* mesh: Use correct retransmit parameters for publicationsInga Stotland2020-08-227-78/+104
| | | | | | 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.
* device: Fix race condition between device connection and disconnectionSonny Sasaka2020-08-211-0/+13
| | | | | | | | | | | 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.
* adapter: Fix crash in discovery_disconnectSonny Sasaka2020-08-211-5/+15
| | | | | | 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.
* input/device: Unregister all UHID event listeners at UHID_DESTROYSonny Sasaka2020-08-213-0/+12
| | | | | | | | | | | | | | 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
* client: Add cancel-pairing commandMiao-chen Chou2020-08-211-0/+35
| | | | | This adds cancel-pairing command which can be used to cancel the ongoing pairing.
* mesh: Send correct NetKey index in DevKeyMessageReceivedInga Stotland2020-08-201-1/+2
| | | | | | 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.
* mesh: Check for enabled modes when dst is fixed addressInga Stotland2020-08-202-21/+9
| | | | | | 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.
* mesh: Always set net modes based on node feature settingsInga Stotland2020-08-201-13/+5
| | | | | | | 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
* main: add configurable refresh_discovery parameterArchie Pusaka2020-08-184-1/+14
| | | | | This is to configure the default behavior of issuing SDP query to update the services upon profile connection.
* device: Don't browse SDP if HIDSDPDisable is setArchie Pusaka2020-08-183-2/+13
| | | | | | | | | | | | | | | | 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.
* shared/ad: move MAX_ADV_DATA_LEN macro to the headerMiao-chen Chou2020-08-182-10/+10
| | | | | This moves MAX_ADV_DATA_LEN macro to src/shared/ad.h and rename it to BT_AD_MAX_DATA_LEN.
* advertising: Fix dbus response for over-advertisingDaniel Winkler2020-08-171-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* mesh: fix double-free of outbound tx dataBrian Gix2020-08-141-21/+31
| | | | | | | 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.
* mesh: Don't add config server when loading from storageInga Stotland2020-08-131-3/+0
| | | | | | | | 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()
* mesh: Make mesh config model binding API consistentInga Stotland2020-08-133-6/+6
| | | | | | 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
* mesh: Fix model ID prior to calling mesh config functionsInga Stotland2020-08-132-10/+9
| | | | | | | | 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.
* mesh: Fix encoding of Config Key Refresh Phase StatusMichał Lowas-Rzechonek2020-08-121-3/+3
| | | | | | 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.
* mesh: Fix logic error when saving model subscriptionsInga Stotland2020-08-111-1/+1
| | | | | This fixes opcode check condition when saving configuration for model subscriptions: use || instead of && for opcode checking
* mesh: Fix element index look up for config model subsInga Stotland2020-08-112-8/+10
| | | | | Use element address for looking up element index (subscription address was erroneously used to perform the lookup).
* mesh: Fix application key binding lookupMichał Lowas-Rzechonek2020-08-111-1/+7
| | | | | | | | 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
* mesh: Refactor heartbeat pub/subInga Stotland2020-08-103-300/+328
| | | | | | | | | | 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.
* mesh: Clean up handling of config KR phase messagesInga Stotland2020-08-104-63/+65
| | | | | | | | | 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.
* mesh: Clean up handling of config net transmit messagesInga Stotland2020-08-101-15/+23
| | | | | This modification allows using a single point for sending out the composed status messages by the Config Server.
* mesh: Clean up handling of config poll timeout messageInga Stotland2020-08-102-12/+24
| | | | | This modification allows using a single point for sending out the composed status messages by the Config Server.
* mesh: Clean up handling of config relay messagesInga Stotland2020-08-101-10/+22
| | | | | This modification allows using a single point for sending out the composed status messages by the Config Server.
* mesh: Clean up handling of config net and app key messagesInga Stotland2020-08-101-72/+83
| | | | | This modification allows using a single point for sending out the composed status messages by the Config Server.
* mesh: Clean up handling of config publication messagesInga Stotland2020-08-103-62/+46
| | | | | | | | 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
* mesh: Clean up handling of config node identity messageInga Stotland2020-08-101-11/+4
| | | | | This modification allows using a single point for sending out the composed status messages by the Config Server.