summaryrefslogtreecommitdiff
path: root/mesh/mesh-io.c
Commit message (Collapse)AuthorAgeFilesLines
* mesh: Update the behavior of --io optionInga Stotland2023-05-121-5/+12
| | | | | | | | | | | | | | | This aligns the behavior of command line option --io to add new "auto" value and modify the behavior of "generic" value: *auto* - Use first available controller: via MGMT interface if kernel supports it, otherwise, via raw HCI socket (i.e., default to *generic*). *generic:[hci]<index>* - Use generic HCI io on interface hci<index> The default value is now *auto*, whereas *generic* is used only if the specific HCI controller is explicitly specified.
* mesh: Tighten IO and fix out-of-bounds array accessInga Stotland2023-04-031-18/+27
| | | | | | | This fixes the out-of-bounds array access in mesh-io-mgmt.c caught by address sanitizer. Similar fixes were applied earlier to generic and unit IOs. With this patch, the common code is factored into a centralized location.
* mesh: Loopback unprovisioned beaconsBrian Gix2023-03-141-0/+52
| | | | | | | | | | Because the daemon explicitly supports multiple nodes, we need local Config Clients to be able to see local unprovisioned devices. This loops the unprovisioned beacon, so that local Provisioning servers can see it. Fixes Issue: https://github.com/bluez/bluez/issues/341
* mesh: Fix mesh to work with MESH_IO_TYPE_UNIT_TESTInga Stotland2022-10-051-1/+1
| | | | | | | This fixes mesh io flow for MESH_IO_TYPE_UNIT_TEST which got broken after: commit 9966cb8b6999a5f54fc13acbd7e1526512a84342 ("mesh: Add new kernel MGMT based IO transport")
* mesh: Add new kernel MGMT based IO transportBrian Gix2022-09-261-47/+142
| | | | | | | | | | | 1. Re-structures MGMT handling such that it is used to detect kernel support of the mesh MGMT opcodes and events before selecting between using MGMT or the legacy raw HCI socket method. 2. Re-structures main() to allow command line to prefer MGMT over HCI or visa versa, plus optionally pass an explicte controller. 3. Adds mesh-io-mgmt as a transport.
* mesh: Add unit test IOBrian Gix2021-04-101-5/+4
| | | | | | | | | | | | This adds a new type of mesh IO that is used for non-interactive testing. The new io option can be specified on command line as: --io unit:<socket_name> When the bluetooth-meshd daemon starts with the "unit" IO type, the daemon opens a socket (fd to open is provided after "unit:" in <socket_name>). The communication with the daemon is done either through the loop-back using mesh DBus-based APIs or the specified named socket.
* mesh: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 48 License: LGPL-2.1-or-later mesh/mesh-mgmt.h mesh/mesh-mgmt.c mesh/net-keys.c mesh/mesh-io-api.h mesh/mesh.h mesh/net-keys.h mesh/model.h mesh/util.h mesh/appkey.c mesh/cfgmod.h mesh/appkey.h mesh/prov.h mesh/prov-acceptor.c mesh/net.c mesh/dbus.h mesh/friend.h mesh/mesh-io-generic.c mesh/main.c mesh/util.c mesh/dbus.c mesh/error.h mesh/mesh-config-json.c mesh/agent.h mesh/pb-adv.c mesh/crypto.c mesh/crypto.h mesh/friend.c mesh/pb-adv.h mesh/provision.h mesh/mesh-config.h mesh/mesh-io-generic.h mesh/agent.c mesh/cfgmod-server.c mesh/mesh-io.h mesh/keyring.h mesh/net.h mesh/keyring.c mesh/mesh-defs.h mesh/mesh.c mesh/rpl.c mesh/manager.c mesh/model.c mesh/mesh-io.c mesh/node.c mesh/prov-initiator.c mesh/rpl.h mesh/node.h mesh/manager.h
* mesh: rework incoming advertisement filteringBrian Gix2020-02-261-29/+7
| | | | | | | Future versions of Mesh will introduce new advertising packets, which do not fit in the limited and rigid filtering currently used. This minor rewrite allows registering and receiving of *any* AD types, including the filtering on multiple octets of the incoming AD parts.
* mesh: Refactor Secure Network BeaconingBrian Gix2019-12-161-0/+3
| | | | | | | | | | | The daemon handles multiple nodes, that may or may not be on the same mesh network. While each node my be seperately configured to beacon or not beacon, there is nothing gained (except redundent traffic) for each node to beacon seperately. Beaconing is therefore centralized with the Network Key the SNB represents, with each *received* beacon delivered to each node. But for SNBs generated, we keep a count of how many nodes want beacons sent for a specific key. If 1 or more, we beacon, if 0 nodes want the beacon sent, then we do not beacon.
* mesh: Fix io inititalization sequenceInga Stotland2019-11-151-2/+3
| | | | | | | | | | | This introduces a chain of callbacks to indicate whether mesh io is initialized and mesh network is ready to use. This fixes the reported situation when the receive callbacks were setup before the HCI was fully initialized. In other words, BT_HCI_CMD_LE_SET_SCAN_PARAMETERS was called before BT_HCI_CMD_RESET and, as the result, the callback issueing BT_HCI_CMD_LE_SET_SCAN_ENABLE command was not called.
* mesh: Add special Beacon handler for ProvisioningBrian Gix2019-07-141-2/+4
| | | | | | | | Provisioning uses the same AD type for Provisioning that is also used by the Secure Network Beacon, but their usage is distinct from each other. This change allows us to enable/disable Unprovisioned Device Beacon capture without disrupting SNB handling.
* mesh: Move HCI handling to mesh-io-genericMichaƂ Lowas-Rzechonek2019-06-241-8/+7
| | | | | | | | | | | This patch separates 'mesh' module from 'mesh_io', particularly regarding configuration and initialization. Main code is no longer aware of MGMT and HCI usage - querying available HCI interfaces now happens in mesh-io-generic. MGMT code is now extracted into mesh-mgmt module, which mesh-io-generic uses to query interfaces.
* mesh: Remove unnecessary includes from .c filesInga Stotland2019-05-171-2/+0
|
* mesh: Restructure I/O for multiple controllersBrian Gix2019-01-081-1/+2
| | | | | | Restructured access to Bluetooth Controllers to allow the usage of multiple controllers, and potentially functionality tailored to Mesh specific features.
* mesh: Infrastructure for Mesh daemonBrian Gix2018-08-201-0/+188