Commit Graph

17 Commits

Author SHA1 Message Date
Inga Stotland
2ada1c13f6 mesh: Fix array processing in Send, Publish, Join
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.
2019-03-07 12:58:09 -08:00
Inga Stotland
e5ab6013e6 mesh: Cleanup storage save and remove procedures
To remove a node config directory completely, the directory
needs to be empty. Both node.json and node,json.bak files must
are deleted.

Also, change storage_save_config() type to void to eliminate
meaningless checks.
2019-02-28 08:54:47 -08:00
Inga Stotland
ddb5ed7918 mesh: Re-arrange node cleanup functions
Rename node_free() to node_remove() and consolidate clean up operations.
Change declarations for internally used functions to static.
2019-02-28 08:54:47 -08:00
Inga Stotland
8d8066d88a mesh: Save newly added or updated net key to config file
This separates mesh_db_net_key_add() into distinct functions:
mesh_db_net_key_add() and mesh_db_net_key_update() which will be called
based on whether a network key was newly added or updated.
2019-02-12 15:30:53 -08:00
Inga Stotland
c1551f2027 mesh: Separate functions for net key add and update
This splits mesh_net_key_add() into two separate functions:
mesh_net_key_add() and mesh_net_key_update().
mesh_net_key_update() essentially replaces mesh_net_kr_phase_one()
since switching to Key Refresh phase one can only be triggered
by successful network key update.
2019-02-12 15:30:53 -08:00
Inga Stotland
39db4f7d29 mesh: Add org.bluez.mesh.Node D-Bus API support
Add support for maintaining multiple local nodes within a single daemon.
A mesh node is an adressable entity in Bluetooth mesh. A local mesh
capable device may have multiple distinct representations as a mesh
node on different mesh networks. Each such representation (aka "node
configuration") maintains runtime storage of encryption/decryption
keys, model subscriptions and publications, etc.

Also, implement D-Bus methods for org.bluez.mesh.Node interaface:
Send(), Publish(), VendorPublish()

Also, add support for generating temporary mesh node entity for Join()
method and verification of credentials for Attach() method
2019-01-08 08:26:22 -08:00
Inga Stotland
e594aefd3a mesh: Source files for mesh access layer and utilities
This adds initial implementation of BT Mesh access layer
functionality plus utilities.
2018-08-20 12:48:23 -07:00
Inga Stotland
ef05f4957d tools: Move meshctl sources under tools/mesh directory
This is a temporary location until the unified mesh solution is provided
2018-07-06 13:03:33 +02:00
Steve Brown
48a2c3db1c mesh: node: Correct minor errors
Correct length computation in node_parse_composition()
Correct return value in node_set_model()
  An existing node is not an error
2018-02-25 20:32:14 +02:00
Steve Brown
287cd9b515 mesh: meshctl: Add subscriptions to node structure and json database
sub-add 0101 c000 1000

              {
                "modelId":"1000",
                "bind":[
                  1
                ],
                "subscribe":[
                  "c000"
                ]
              },
2018-02-16 12:38:20 +02:00
Luiz Augusto von Dentz
7a03b61ee8 tools: Remove monitor/uuid.{c,h}
Use the shared/util.h helpers instead.
2017-12-21 10:08:22 -02:00
Luiz Augusto von Dentz
fc53175b8a mesh: Make meshctl use bt_shell helpers
This makes meshctl use bt_shell to manage the menus and command
handling.
2017-12-08 13:06:12 +02:00
Michal Hobot
5b4be5a091 mesh: Fix parsing composition data for custom models
Custom model ids consist of model id and vendor id. Instead, vendor id
was used twice to build model id.
2017-11-30 23:18:29 +02:00
Marcel Holtmann
8168ab64d5 mesh: Use PRIx64 for printing uint64_t variables 2017-09-18 01:32:17 -07:00
Inga Stotland
cce5161556 mesh: move GATT defines to the appropriate header file
Group mesh GATT definitions in mesh/gatt.h file.
Also remove unused members in mesh_node structure.
2017-08-28 13:56:55 +03:00
Marcel Holtmann
8e96790482 mesh: Fix includes to use root relative path names 2017-08-21 13:40:03 +02:00
Brian Gix
9b92507843 mesh: Baseline Mesh implementation 2017-08-21 12:40:35 +02:00