summaryrefslogtreecommitdiff
path: root/mesh/manager.c
Commit message (Collapse)AuthorAgeFilesLines
* mesh: Fix uninitialized memory usageBrian Gix2023-03-141-1/+1
| | | | | When attempting to cancel an unknown Scan request structure must be NULL initialized.
* mesh: Add Remote ProvisioningBrian Gix2023-01-301-115/+420
| | | | | | | | Add Remote Provisioning Server Add Remote Provisioning Client Remove local scanning/provisioning Add delete-all dev key function Add NPPI procedures
* mesh: Implement ExportKeys() methodInga Stotland2021-09-271-0/+35
| | | | | | | | Add implementation for new method ExportKeys() on org.bluez.mesh.Management1 interface. This method is used by the authorized application to export information about network keys, application keys and device keys present in the local key database.
* 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: Make "Busy" and "InProgress" to be distinct errorsInga Stotland2020-06-101-6/+5
| | | | | | | | | This separates "Busy" and "InProgress" error codes: MESH_ERROR_IN_PROGRESS maps to org.bluez.mesh.Error.InProgress MESH_ERROR_BUSY maps to org.bluez.mesh.Error.Busy Minor API change: UpdateAppKey() returns "InProgress" error instead of "Busy"
* mesh: Debug output clean upInga Stotland2020-06-011-3/+3
| | | | | This changes l_info() to l_debug() for recurring cases and removes some excessive debug output.
* mesh: Fix leaked message referenceBrian Gix2020-05-221-1/+2
|
* mesh: Refresh provisioner's capabilitiesMichał Lowas-Rzechonek2020-04-011-9/+24
| | | | | | As provisioner's capabilities might change during application lifetime (e.g. no network link to download OOB key), let's query the agent again after application calls AddNode().
* mesh: Remove unused 'server' argumentMichał Lowas-Rzechonek2020-04-011-1/+1
|
* mesh: Update UnprovisionedScan, AddNode & ScanResultInga Stotland2020-03-301-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following methods are modified to allow for future development: Interface org.bluez.mesh.Management1: Old: void UnprovisionedScan(uint16 seconds) New: void UnprovisionedScan(dict options) The options parameter is a dictionary with the following keys defined: uint16 Seconds Specifies number of seconds for scanning to be active. If set to 0 or if this key is not present, then the scanning will continue until UnprovisionedScanCancel() or AddNode() methods are called. other keys TBD Old: void AddNode(array{byte}[16] uuid) New: void AddNode(array{byte}[16] uuid, dict options) The options parameter is currently an empty dictionary Interface org.bluez.mesh.Provisioner1 Old: void ScanResult(int16 rssi, array{byte} data) New: void ScanResult(int16 rssi, array{byte} data, dict options) The options parameter is currently an empty dictionary
* mesh: rework incoming advertisement filteringBrian Gix2020-02-261-2/+3
| | | | | | | 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: Style fixInga Stotland2020-01-061-29/+30
| | | | This fixes style issues: spaces -> tabs, alignment.
* mesh: Fix dbus management interface input paramsRafał Gajda2019-11-201-31/+29
| | | | | | | | | | | | | | | | | Previously input parameters in "org.bluez.mesh.Management1" would not register properly, being shifted by one: <method name="ImportRemoteNode"> <arg name="" type="q" direction="in"/> <arg name="primary" type="y" direction="in"/> <arg name="count" type="ay" direction="in"/> </method> This fixes this issue: <method name="ImportRemoteNode"> <arg name="primary" type="q" direction="in"/> <arg name="count" type="y" direction="in"/> <arg name="dev_key" type="ay" direction="in"/> </method>
* mesh: Cancel unprovisioned scan on exit or app disconnectInga Stotland2019-11-141-0/+8
| | | | | | If a provisioner app quits or the daemon is stopped while there's an active scan for unprovisioned devices in progress, the scan needs to be explicitly canceled.
* mesh: Fix clean up after AddNode methodInga Stotland2019-11-121-3/+1
| | | | | | This fixes the cleanup routine that is called after AddNode method on org.bluez.mesh.Manager1 interface is complete: do not remove the agent associated with the Provisioner (owner of Manager interface).
* mesh: Add authorization checks for Manager iface methodsInga Stotland2019-11-041-3/+57
| | | | | | | This adds a check for org.bluez.mesh.Manager1 interface calls to validate that a message sender, i.e. thatt the sender is the original owner of the node object generated on Attach() method call. If the check fails, org.bluez.mesh.Error.NotAuthorized is returned.
* mesh: Fix Key Ring permissions for local nodesBrian Gix2019-10-011-5/+0
| | | | | | | | | | | | | | | | | | | | We do *not* automatically create populated key rings for imported or joined nodes, but we also do not *forbid* any node from adding a key in it's possesion to the local key ring. There are two (known) use cases for Import() 1. Node previously existed on a different physical piece of hardware, and is being migrated to this daemon. 2. Node was newly provisioned Out-Of-Band, and this is the net result of the provisioning. In *neither* case is it a given that the Node should be able to provision another node (the effect of adding the Net Key to the key ring). In neither case is it a given that the Node should be able to modify it's own Config Server states (the effect of adding it's Device Key to the key ring).
* mesh: Automate AppKey update on KR phase 2-->3-->0Brian Gix2019-09-101-33/+20
| | | | | | Designed so that if an unexpcted abort() occurs, the bound NetKey remains in state 2 or 3. If successful, the NetKey is set to Phase 0, and all bound AppKeys are in their correct state.
* mesh: Check address range passed to ImportRemoteNodeMichał Lowas-Rzechonek2019-07-191-0/+10
| | | | | +changed "not authorized" error to "invalid args" when managing device key for local address range
* mesh: Implement DBus Provisioning methodsBrian Gix2019-07-141-8/+296
| | | | | | | This implements the Interface and Methods for: UnprovisionedScan() UnprovisionedScanCancel() AddNode()
* mesh: Implement remote dev key methods for keyringBrian Gix2019-05-241-3/+35
| | | | | | | | Implements following org.bluez.mesh.Management1 methods: ImportRemoteNode() DeleteRemoteNode() These methods are used to maintain Device Key keyring storage.
* mesh: Implement Key Refresh Phasing in keyringBrian Gix2019-05-241-3/+50
| | | | | | | | | Implements following org.bluez.mesh.Management1 methods: CompleteAppKeyUpdate() SetKeyPhase() These methods are used to maintain Key Refresh settings in the keyring storage.
* mesh: Implement App Key keyring storage handlingBrian Gix2019-05-241-15/+71
| | | | | | | | | | Implements following org.bluez.mesh.Management1 methods: CreateAppKey() ImportAppKey() UpdateAppKey() DeleteAppKey() These methods are used to maintain App Key keyring storage.
* mesh: Implement Net Key keyring storage handlingBrian Gix2019-05-241-12/+75
| | | | | | | | | | Implements following org.bluez.mesh.Management1 methods: CreateSubnet() ImportSubnet() UpdateSubnet() DeleteSubnet() These methods are used to maintain Net Key keyring storage.
* mesh: Add skeleton for org.bluez.mesh.Management1 interfaceInga Stotland2019-05-151-0/+266
This adds bare-bones imlementation of methods on org.bluez.mesh.Management1 interface.