| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Validate that the value of Device UUID supplied in
CreateNetwork/Join/Import methods is compliant with RFC 4122.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
We require the successful return of JoinComplete() method before
handling subsequent Attach() or Leave() method calls. To simplify the
construction of Applications, we will accept one of these calls up to 1
second prior to receiving the final return status of JoinComplete,
which tells us that the Application is ready to use the node.
If the node is still not ready after the deferral, Attach and/or Leave
will fail.
|
|
|
|
| |
Name change for consistency with "IvIndex" property.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces the following behavior change for those methods
on Network interface that specify node token as an input parameter
Leave() method:
If Leave method is called for a node that is being processed as a result
of a Create, Import, Join or Attach method calls in progress, node removal
is not allowed and org.bluez.mesh.Error.Busy error is returned.
Attach() method:
If Attach method is called for a node that is being processed as a result
of a Create, Import or Join method calls in progress, node attachment
is not allowed and org.bluez.mesh.Error.Busy error is returned.
|
|
|
|
|
|
| |
This adds a destroy callback as a function parameter to
dbus_send_with_timeout() to allow automatic release of user data
on either reply or timeout.
|
|
|
|
|
|
| |
This consolidates various places where a pending response
to Join() is created and makes sure that l_dus_message_unref()
is called correctly.
|
|
|
|
|
|
| |
This ensures that every time l_dbus_message_ref() is used to preserve
a message for a pending method reply, there is a matching call to
l_dbus_message_unref().
|
|
|
|
|
| |
This consolidates error return form one place: off a callback
with unsuccessful status.
|
|
|
|
|
| |
This removes unnecessary failing conditions in Import() call and
simplifies iterations through "flags" dictionary.
|
|
|
|
|
| |
This removes unnnecessary checking for queue existence every time
either Attach(), Create() or Import() methods are called.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a new node is created as a result of successful completion
of either Join() or Create() or Import() methods and has been
confirmed via successful token delivery to the application,
clean up node's D-Bus resources (application path, element paths, etc)
that have been gathered during the initial GetMAnagedObjects() call.
Also, remove the agent instance associaed with the new node.
These resources will be re-populated after the Attach() call
verifies the node's integrity.
|
|
|
|
| |
This removes unused "agent" member from join_data structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the crash that occurs when a controller used by bluetooth-meshd
is removed and then added back again.
Also, correctly restart scanning when the controller is re-enabled.
Backtrace:
0x00005618e754d040 in ?? ()
0x00005618e6e12d9a in io_ready_callback () at mesh/mesh.c:174
0x00005618e6e3d2c8 in l_queue_foreach () at ell/queue.c:441
0x00005618e6e37927 in request_complete () at src/shared/mgmt.c:261
|
|
|
|
|
| |
These warnings are caused by not completely freeing memory allocations
at shutdown, and are not serious, but they make valgrind output cleaner.
|
|
|
|
|
| |
These memory leaks are ones that will compound over time with node
creation and deletion.
|
|
|
|
|
|
|
| |
JoinComplete() dbus method calls are the only time that node tokens are
delivered to client Applications, so if the call fails for any reason
(including time-outs) the daemon has a way to clean-up the stale unused
node data.
|
|
|
|
|
|
|
|
| |
This patch changes Import and CreateNetwork API to deliver tokens via
the JoinComplete method call. When application doesn't raise any error
during handling JoinComplete then it is assumed that the token has been
saved, otherwise when application replies with an error message then the
node is removed.
|
|
|
|
|
|
| |
This patch fixes invalid app_path on 'Join' method call - the daemon
tried to use the value of app_root API argument, while it should use
path discovered by scanning result of GetManagedObjects() call.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds key file with default settings for the mesh daemon.
The following settings are included:
Beacon: Default setting for to indicate whether
secure network beaconing is enabled for a
node whose Beacon state hasn't been configured
by a configuration client, i.e., this setting
apllies to a newly provisioned, created or
imported node.
Relay: Default setting for supporting relay
Friendship: Default setting for supporting Friendship
CRPL: Default depth of replay protection list.
FriendQueueSize: Default size of friend queue: the number
of messages that each Friend node can store
for the Low Power node.
ProvTimeout: Provisioning timeout in seconds.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following segfault:
node_init_cb (node=0x0, agent=0x0) at mesh/mesh.c:359
reply = dbus_error(join_pending->msg, MESH_ERROR_FAILED,
user_data=0x5555555be170) at mesh/node.c:1760
dbus=<optimized out>) at ell/dbus.c:216
user_data=0x5555555a6e00) at ell/dbus.c:279
user_data=0x5555555a7ef0) at ell/io.c:126
at ell/main.c:642
at mesh/main.c:205
The fault was caused by the premature deletion of preserved state.
This moves setup of disconnect watch for the application calling the Join()
method into the node_init_cb(), after a temporary node has been
successfully created.
|
|
|
|
|
|
|
|
|
| |
This method allows local nodes to be imported from an external
provisioning database, enabling applications to create mesh nodes
without using provisioning procedure.
The procedure is similar to provisioning procedure, but all data
exchange happens over D-Bus.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This completely removes storage.c file. Instead, the handling
of mesh node configuration storage is done completely in
mesh-config layer by calling the following API functions:
bool mesh_config_load_nodes(const char *cfg_dir,
mesh_config_node_func_t cb,
void *user_data)
void mesh_config_release(struct mesh_config *cfg)
void mesh_config_destroy(struct mesh_config *cfg)
bool mesh_config_save(struct mesh_config *cfg, bool no_wait,
mesh_config_status_func_t cb, void *user_data)
struct mesh_config *mesh_config_create(const char *cfg_path,
const uint8_t uuid[16],
struct mesh_config_node *node)
|
|
|
|
|
|
| |
Provisioning packets are defined in the specification
as packed big endian structures. Instead of specifying
an octet array, we now use struct matching the spec.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This implements CreateNetwork() method on org.bluez.mesh.Network1
interface. Invoking this method generates a self-provisioned
local node associated with a brand new mesh network. This new
network is bare bones: only one network key is defined. The new node
assumes the role of mesh network manager and will be able to use
soon to be implemented methods of org.bluez.mesh.Management1 interface
to provision remote nodes into its network and to add/update/remove
network and application keys.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of keeping track of unique 16bit node identifiers, reuse their
UUIDs to create both storage directories and dbus objects.
Because of that:
- UUID is no longer stored in the JSON file, it's inferred from the
directory name instead
- Join(), CreateNetwork() and ImportLocalNode() APIs return an error if
given UUID already registered within the daemon
|
|
|
|
|
|
| |
This changes the prototype for the callback function of
Attach() method call: remove unused node_path argument and make the
callback more generalized and re-usable for other method calls.
|
|
|
|
|
| |
Fix issue with device key being used as a token. Token now seperate, and
with a portable representation in the node database.
|
|
|
|
|
|
| |
Use correct parameters when calling l_dbus_message_iter_get_fixed_array().
Also, check the return value and the length of the processed array and
return an error if the checks fail.
|
|
|
|
|
|
| |
This implements D-Bus Leave() method that results in complete removal
of node information from the system, including configuration files
from storage directory.
|
|
|
|
|
| |
Rename node_free() to node_remove() and consolidate clean up operations.
Change declarations for internally used functions to static.
|
| |
|
|
|
|
|
|
| |
If Daemon is started with an explicit controller specified, the
MGMT search for an unused shared controller is bypassed, and
the controller is opened directly.
|
|
|
|
|
|
| |
Do not call acceptor_cancel() if the provisioning has been completed,
either fail or success. Acceptor automatically takes care of cleanup
on completion, either successful or not.
|
|
|
|
|
|
|
|
| |
Consolidate multiple instances where the pending Join data is freed
into calling one function free_pending_join_call().
Also, add checks for NULL data in cleanup functions for storage, agent
and provisioning acceptor.
|
|
|
|
|
| |
Supply correct parameters to l_dbus_message_iter_get_fixed_array
to get the location from where to read UUID value.
|
|
|
|
|
|
|
|
|
| |
This implements the following methods of org.bluez.mesh.Network
interface: Join(), Attach(), Cancel(). The methods are described in
doc/mesh-api.txt document.
Also, add changes to reflect that the single daemon now handles multiple
local mesh nodes.
|
| |
|
|
|
|
|
|
| |
This allows co-existense of meshd and bluetoothd. meshd will
automatically take control of the first available LE-capable
controller that is powered down.
|
|
This adds initial implementation of BT Mesh access layer
functionality plus utilities.
|