| cee12183 |
mesh: Allow to set-up the CRPL with application
This adds an optional CRPL property to org.bluez.mesh.Application1
interface, allowing to indicate the depth of reply protection list. |
Jakub Witowski |
6 years ago |
2 files, +17, -5 |
| 341456b5 |
mesh: Register D-Bus management interface
When application Attach()es itself, start exposing both Node1 and
Management1 D-Bus interfaces. |
Michał Lowas-Rzechonek |
6 years ago |
1 file, +15, -2 |
| 97f68772 |
mesh: Clear nodes queue on get_managed_objects_cb() fails
Currently when the get_managed_objects_cb() fails it frees
the node resources but the node still remains on the "nodes" queue.
This implementation calls node_remove() instead of
free_node_resources()." |
Jakub Witowski |
6 years ago |
1 file, +1, -1 |
| 9acc66c6 |
test: test-mesh - Correctly stop periodic publication
This changes the order of checks for an updated publication period:
check for zero period first, and if this is the case, stop sending
the periodic model publications. |
Inga Stotland |
6 years ago |
1 file, +4, -4 |
| 5a37a85f |
mesh: Fix and clean up model publication code
This adds proper checks for model publication removal:
the publication is not virtual and the publication address is set to zero,
i.e., UNASSIGNED_ADDRESS.
Also removes double memory allocation for model publication and
miscellaneous redundancies. |
Inga Stotland |
6 years ago |
2 files, +27, -37 |
| bb5d00cd |
mesh: Fix virtual address processing
This tightens up the accounting for locally stored virtual addresses.
Alos, use meaningful variable names to identify components of a
mesh virtual address. |
Inga Stotland |
6 years ago |
2 files, +78, -101 |
| 3ce332e4 |
mesh: Clean up model.c and cfg-server.c
This removes a number of redundancies, fixes naming conventions and
style. |
Inga Stotland |
6 years ago |
3 files, +87, -133 |
| c957b8ea |
mesh: Fix D-Bus node path
According to doc/mesh-api.txt, node object should be located at
/org/bluez/mesh/node. |
Michał Lowas-Rzechonek |
6 years ago |
1 file, +2, -2 |
| 3c143c71 |
mesh: Fixed handling of IVI flag in app layer
Since IV Index is used in application nonces, we need to honor IVI flag
not only in network layer crypto, but also in application layer.
This means that if IVI field of incoming packet is different than in
current IV Index, try to decode *both* net and app layers using IV Index
decreased by one. |
Michał Lowas-Rzechonek |
6 years ago |
2 files, +8, -15 |
| a0ced291 |
mesh: Modify check of the node directory name upon removal
This removes check for "mesh" as the parent directory name and, instead,
verifies that the node configuration directory name is the hexadecimal
string representating the node's UUID. |
Inga Stotland |
6 years ago |
1 file, +14, -26 |
| e0b1d64e |
mesh: Fix to duplicated model Ids saved to storage
Mesh daemon internally implements the Config Server SIG model.
When generating node, if the Mesh Element in mesh application
returns modelId 0 among its supported models, it should be skipped,
otherwise it will be duplicated and saved in the storage file.
This patch fixes correctly skipping Config Server model during node
creation. |
Rafał Gajda |
6 years ago |
1 file, +3, -4 |
| b4ecf33d |
mesh: Remove unused error code from Leave()
This removes NotFound error from mesh-api.txt from Leave() function. |
Jakub Witowski |
6 years ago |
1 file, +1, -1 |
| 12b984d1 |
mesh: Move HCI handling to mesh-io-generic
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. |
Michał Lowas-Rzechonek |
6 years ago |
10 files, +294, -214 |
| ee70e5e0 |
sixaxis: Throw an error when cable setup fails
If btd_request_authorization_cable_configured() fails, throw an error
and free resources. |
Bastien Nocera |
6 years ago |
1 file, +6, -0 |
| 59b934ab |
sixaxis: Fix another problem with already setup devices
If the device went through any kind of pairing once, it might have been
set as trusted. Make sure to set the device as untrusted before starting
the cable pairing authorization so that we don't exit early from
process_auth_queue() (which considers trusted devices to be paired). |
Bastien Nocera |
6 years ago |
1 file, +1, -0 |
| 510224f4 |
mesh: Remove redundant checks when adding a net key
This patch cleans up redundant checks in add_key() and mesh_net_set_key():
no need to check the result of l_queue_push_tail() and no need to check
if subnet is valid after it was successfully created. |
Inga Stotland |
6 years ago |
1 file, +8, -11 |
| 022b6d9c |
build: Add missing mesh & btpclient dependencies
btpclient and bluetooth mesh fail to build on their own until
certain ELL and generated header files have been built, which
can cause a build to fail if derived objects are generated in
wrong order. |
Brian Gix |
6 years ago |
2 files, +4, -0 |
| 231c50a1 |
mesh: Fix segmentation fault after adding second netkey via NET_KEY_ADD opcode
Segmentation fault was caused by passing subnet pointer to the
start_network_beacon() which was NULL |
Jakub Witowski |
6 years ago |
1 file, +12, -13 |
| 9c64e352 |
mesh: Clean up style
This cleans up some stylistic issues. Plus, don't check the return
value of l_new(): if memory allocation fails, the execution stops. |
Inga Stotland |
6 years ago |
1 file, +13, -12 |
| 0f5cf359 |
mesh: Make "elements" mandatory in node configuration
This patch modifies the behavior of node configuration parsing:
if "elements" property is not present, th configuration file
for this node is regarded as malformed.
Also, clean up style. |
Inga Stotland |
6 years ago |
1 file, +9, -14 |
| 0f8cf75f |
mesh: Do not daemonize, run in foreground or as service
This removes call to daemon(). "--nodetach" option is retained
to set umask().
Also, adds description for dbus-debug option. |
Inga Stotland |
6 years ago |
1 file, +6, -11 |
| 5bcce2ce |
build: Add support for systemd bluetooth-mesh service
This adds support for installing systemd bluetooth-mesh service unit
and D-Bus service file that references this systemd unit. |
Inga Stotland |
6 years ago |
3 files, +35, -2 |
| d2a72dd6 |
install: Fix installations to pkglibexecdir
In 78bce4800 libexecdir was switched to pkglibexecdir. To use the
matching installation script, use pkglibexec_Programs instead of
libexec_Programs. |
Ludwig Nussel |
6 years ago |
4 files, +5, -5 |
| 8de73cd1 |
main.conf: Make ReverseServiceDiscovery work with LE
This makes ReverseServiceDiscovery work properly with LE connection by
disabling the GATT client functionality which makes one able to setup a
system to operate in peripheral role only mode. |
Luiz Augusto von Dentz |
6 years ago |
4 files, +15, -8 |
| 632e67f8 |
mesh: ELL encrypt dependancy README section added
Due to known AEAD encryption deficiencies in old versions of the
kernel, we have added a section on identifying and back-porting
mesh to otherwise non-supporting platforms. |
Brian Gix |
6 years ago |
1 file, +14, -0 |
| dfed4839 |
mesh: Convert crypto to use ELL wrappers
Use ELL implementations of aead-ccm(aes), ecb(aes) and cmac(aes). These
standard encryption and hashing routines are provided by ELL. |
Brian Gix |
6 years ago |
2 files, +58, -464 |
| 75cd5b38 |
mesh: Fix long MIC usage in segmented messages
Contrary to the comment, implementation used a 8-byte MIC even if this
generated an additional segment. |
Jakub Witowski |
6 years ago |
1 file, +4, -1 |
| 2565283c |
mesh: Implement remote dev key methods for keyring
Implements following org.bluez.mesh.Management1 methods:
ImportRemoteNode()
DeleteRemoteNode()
These methods are used to maintain Device Key keyring storage. |
Brian Gix |
6 years ago |
1 file, +35, -3 |
| 4d95426c |
mesh: Implement Key Refresh Phasing in keyring
Implements following org.bluez.mesh.Management1 methods:
CompleteAppKeyUpdate()
SetKeyPhase()
These methods are used to maintain Key Refresh settings
in the keyring storage. |
Brian Gix |
6 years ago |
1 file, +50, -3 |
| 77950fd4 |
mesh: Implement App Key keyring storage handling
Implements following org.bluez.mesh.Management1 methods:
CreateAppKey()
ImportAppKey()
UpdateAppKey()
DeleteAppKey()
These methods are used to maintain App Key keyring storage. |
Brian Gix |
6 years ago |
1 file, +71, -15 |
| 84610cd7 |
mesh: Implement Net Key keyring storage handling
Implements following org.bluez.mesh.Management1 methods:
CreateSubnet()
ImportSubnet()
UpdateSubnet()
DeleteSubnet()
These methods are used to maintain Net Key keyring storage. |
Brian Gix |
6 years ago |
1 file, +75, -12 |
| 638622af |
mesh: Centralize definition of PRIMARY_NET_IDX |
Brian Gix |
6 years ago |
2 files, +6, -7 |
| 04aca155 |
mesh: Add new method for Key Refresh procedure
This adds a new method CompleteAppKeyUpdate() on
org.bluez.mesh.Management1 interface to be used by the application
at the completion of a Key Refresh procedure. This method should
be called for each app key that is being updated during the
procedure, and must be performed prior to changing the phase of
the bound net key to phase 3. |
Brian Gix |
6 years ago |
1 file, +48, -18 |
| 88abc9a1 |
meshctl: Retry recvmsg if data is not ready
Commit d6eec1b67d6d ("meshctl: Switch from write to sendmsg for Acquire*")
causes a regression by returning an error if recvmsg has no data available.
Fix it by retrying until data is received. |
Steve Brown |
6 years ago |
1 file, +4, -1 |
| ad4fd0f4 |
monitor: Decode LE Periodic Advertising Sync Lost Event
> HCI Event: LE Meta Event (0x3e) plen 3
LE Periodic Advertising Sync Lost (0x10)
Sync handle: 0 |
Szymon Janc |
6 years ago |
2 files, +14, -1 |
| 5441a5b9 |
monitor: Decode LE Periodic Advertising Report Event
> HCI Event: LE Meta Event (0x3e) plen 18
LE Periodic Advertising Report (0x0f)
Sync handle: 0
TX power: -4 dbm (0xfc)
RSSI: -55 dBm (0xc9)
Unused: (0xff)
Data status: Complete
Data length: 0x0a
b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 |
Szymon Janc |
6 years ago |
2 files, +56, -1 |
| 9285a4e3 |
monitor: Decode LE Periodic Advertising Sync Established Event
> HCI Event: LE Meta Event (0x3e) plen 16
LE Periodic Advertising Sync Established (0x0e)
Status: Success (0x00)
Sync handle: 0
Advertising SID: 0x06
Advertiser address type: Random (0x01)
Advertiser address: FF:00:00:00:00:AA (Static)
Advertiser PHY: LE 1M (0x01)
Periodic advertising invteral: 50.00 msec (0x0028)
Advertiser clock accuracy: 0x04 |
Szymon Janc |
6 years ago |
2 files, +32, -1 |
| 6df5c5e3 |
mesh: Remove unnecessary includes from .c files |
Inga Stotland |
6 years ago |
20 files, +10, -121 |
| af3f7f1b |
mesh: Update copyright dates |
Inga Stotland |
6 years ago |
23 files, +23, -23 |
| 3242dd3d |
mesh: Save generated Net and Dev keys in KeyRing
When creating a network from scratch, we need to save all
keys that are created into the KeyRing for use by Config
Client application. |
Brian Gix |
6 years ago |
1 file, +16, -4 |
| 8b179cbd |
mesh: Fix file open error checking and permissions |
Brian Gix |
6 years ago |
2 files, +6, -4 |
| 895ba2cd |
mesh: Add "create" command to test app
Like "join" this command generates a UUID and calls CreateNetwork()
and displays the UUID and token. |
Brian Gix |
6 years ago |
1 file, +47, -2 |
| f66e29d5 |
mesh: Add skeleton for org.bluez.mesh.Management1 interface
This adds bare-bones imlementation of methods on org.bluez.mesh.Management1
interface. |
Inga Stotland |
6 years ago |
6 files, +297, -4 |
| 0af87c6c |
mesh: Add check for org.bluez.mesh.Provisioner1 interface
This adds check for the presence of org.bluez.mesh.Provisioner1
interface when collecting information about mesh application
that is received in callback of GetManagedObjects() method.
Set "provisioner" flag in the node structure to trueto indicate
that the node may act aa a provisioner. |
Inga Stotland |
6 years ago |
2 files, +6, -2 |
| e0856d53 |
shared/gatt-db: Fix crash when generating hash
The following crash can be observed when handles are not contiguous:
Invalid write of size 8
at 0x452697: gen_hash_m (gatt-db.c:314)
by 0x453FE8: gatt_db_service_foreach (gatt-db.c:1395)
by 0x45408C: service_gen_hash_m (gatt-db.c:322)
by 0x4548F1: foreach_service_in_range (gatt-db.c:1284)
by 0x4548F1: foreach_in_range (gatt-db.c:1307)
by 0x457470: queue_foreach (queue.c:220)
by 0x453B75: gatt_db_foreach_service_in_range (gatt-db.c:1349)
by 0x453BAC: gatt_db_foreach_service (gatt-db.c:1254)
by 0x453C46: db_hash_update (gatt-db.c:340)
by 0x4567B4: timeout_callback (timeout-glib.c:34) |
Luiz Augusto von Dentz |
6 years ago |
1 file, +18, -10 |
| 3545edb6 |
mesh: Add key storage
This implements internal key storage add/delete/fetch for the three
basic key types managed in Mesh: Network, Application and Device.
This key storage is separate from keys assigned to nodes within the
mesh, and are used to support Configuration Client functionality. |
Brian Gix |
6 years ago |
3 files, +348, -0 |
| ce3031a6 |
mesh: Reconfigure node storage tree
Add a tree structure to a nodes data storage, in order to safely handle
Replay Protection list, Refactor local Sequence Numbers, and add Key
storage for Config Client nodes. |
Brian Gix |
6 years ago |
4 files, +131, -67 |
| 1b571bc3 |
android/handsfree: Fix unaligned struct access
android/handsfree.c: In function ‘bt_sco_get_fd’:
android/handsfree.c:2913:47: error: taking address of packed member of ‘struct sco_rsp_get_fd’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
2913 | if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &rsp.mtu))
| ^~~~~~~~ |
Bastien Nocera |
6 years ago |
1 file, +3, -1 |
| 66cab3c8 |
android/hal-bluetooth: Fix unaligned struct access
android/hal-bluetooth.c: In function ‘set_adapter_property’:
android/hal-bluetooth.c:659:46: error: taking address of packed member of ‘struct hal_cmd_set_adapter_prop’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
659 | adapter_prop_from_hal(property, &cmd->type, &cmd->len, cmd->val);
| ^~~~~~~~~ |
Bastien Nocera |
6 years ago |
1 file, +3, -1 |
| 3775d077 |
android/avrcp-lib: Fix unaligned struct access
android/avrcp-lib.c: In function ‘get_element_attributes’:
android/avrcp-lib.c:967:24: error: taking address of packed member of ‘struct get_element_attributes_req’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
967 | if (!parse_attributes(* (&req->attrs), params_len - sizeof(*req),
| ^~~~~~~~~~~~~~~ |
Bastien Nocera |
6 years ago |
1 file, +5, -4 |