| d3093475 |
mesh: Fix IV recovery
This patch fixes saving IV received in SNB to storage.
Previously after creating new node with IV 0 (or loading node with
IV > 0 but after long inactivity) first received SNB should update IV
(and reset sequence number to 0 if necessary).
The bug would prevent new IV being saved in storage which resulted in
sequence number being set to 0 on first SNB received after every daemon
reset but IV never being updated. |
Rafał Gajda |
6 years ago |
1 file, +1, -1 |
| 1169eb44 |
mesh: Remove misleading DEFAULT_CRPL from node.c |
Michał Lowas-Rzechonek |
6 years ago |
1 file, +0, -2 |
| 7ff2bb9e |
mesh: Fix node reset
Instead of stopping the daemon, just remove the node. |
Michał Lowas-Rzechonek |
6 years ago |
1 file, +8, -2 |
| 59d5f21e |
mesh: Style fix
This fixes style issues: spaces -> tabs, alignment. |
Inga Stotland |
6 years ago |
1 file, +30, -29 |
| 9e79b139 |
meshctl: Fix meshctl crash
list entry was not updated properly during flushing of packets
<call stack>
flush_pkt_list (list=0x638b40 <net+64>) at tools/mesh-gatt/net.c:1199
net_session_close (data_in=<optimized out>) at tools/mesh-gatt/net.c:1979
disconnect_device (cb=cb@entry=0x0, user_data=user_data@entry=0x0)
at tools/meshctl.c:791
cmd_start_prov (argc=<optimized out>, argv=0x6a9fb0)
at tools/meshctl.c:1789 |
Anurag Biradar |
6 years ago |
1 file, +1, -0 |
| fe8b3bda |
meshctl: Fix infinite sock read
When a stream socket peer has performed an orderly shutdown,
then return value will be 0. |
Anurag Biradar |
6 years ago |
1 file, +6, -1 |
| 9f9d1bc9 |
agent: Detect when ongoing request is already in progress
This detects when a agent request is already pending for the same device
which could happen when there are 2 or more adapters in the system and
they are trying to pair with each other. |
Luiz Augusto von Dentz |
6 years ago |
4 files, +97, -50 |
| 99fa1447 |
mesh: Start link establishment timer of 60 sec
5.3.2 of Mesh Profile Bluetooth specification:
To open a link, the provisioner shall start the link establishment
timer, set to 60 seconds, and then shall start sending Link Open
messages.
On timeout, close indication will be sent. Provisioner cancels the
Link Establishment timer, when the link is open i.e. in pb_adv_tx(). |
Prathyusha N |
6 years ago |
1 file, +2, -0 |
| 11d7fe85 |
mesh: Base config json code on newer version of json-c
This removes a roundabout logic that was required to delete
a json entry from a json array using libjsonc utilities.
A new API function, json_object_array_del_idx(), implemented in
json-c version 0.13 simplifies array entry removal to one call.
Also, add requirement to configure.ac for json-c version >= 0.13 |
Inga Stotland |
6 years ago |
3 files, +34, -138 |
| ffdd4f58 |
mesh: Recognize SNBs in SecondsSinceLastHeard
Timestamp is taken on each OTA beacon reception, and considered in the
SecondsSinceLastHeard property. |
Brian Gix |
6 years ago |
3 files, +29, -3 |
| bdfae8a5 |
mesh: Deliver newly composed SNBs to local nodes |
Brian Gix |
6 years ago |
3 files, +17, -0 |
| 2903ffb2 |
TODO: Update mesh section |
Inga Stotland |
6 years ago |
1 file, +1, -16 |
| b9a4d941 |
mesh: Fix getting managed objects from ObjectManager
D-Bus spec mandates that GetManagedObjects method of
org.freedesktop.DBus.ObjectManager interface returns *children* only:
https://dbus.freedesktop.org/doc/dbus-specification.html
> All returned object paths are children of the object path implementing
> this interface, i.e. their object paths start with the ObjectManager's
> object path plus '/'
Both test scripts and ELL abuse this by returning application interfaces
via ObjectManager attached to the same path, but other D-Bus
implementations do not, making Attach() fail because mandatory
interfaces cannot be found.
This patch fixes the issue by scanning hierarchy returned by
GetManagedObjects for object implementing org.bluez.mesh.Application1
interface and keeping that as node's app_path. |
Michał Lowas-Rzechonek |
6 years ago |
3 files, +45, -37 |
| 4a1bea28 |
mesh: Add mesh-main.conf file with general mesh configuration
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. |
Inga Stotland |
6 years ago |
6 files, +162, -15 |
| cf0a3947 |
tools/mesh-cfgclient: add friend get/set commands
Add friend-get and friend-set commands as per Mesh Profile 4.3.2.55,
4.3.2.56 and 4.3.2.57. |
Aurelien Jarno |
6 years ago |
1 file, +40, -0 |
| d49839d0 |
tools/mesh-cfgclient: add network transmit get/set commands
Add network-transmit-get and network-transmit-set commands as per
Mesh Profile 4.3.2.69, 4.3.2.70 and 4.3.2.71. |
Aurelien Jarno |
6 years ago |
1 file, +40, -0 |
| 56f7a456 |
shared/mainloop: Use connect() instead of bind() for sd_notify
We are the client, so we should be using connect(2) instead of bind(2),
otherwise when using non-abstract Unix sockets we will get an error that
the address is already in use.
This breaks the notify support in dpkg's start-stop-daemon. |
Guillem Jover |
6 years ago |
1 file, +1, -1 |
| 6a83d146 |
mesh: Cleanup unused LPN code
The daemon does not support the LPN role, and this is unreferenced code. |
Brian Gix |
6 years ago |
2 files, +8, -50 |
| 9955657f |
mesh: Refactor Secure Network Beaconing
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. |
Brian Gix |
6 years ago |
5 files, +326, -242 |
| 3ed6e9f9 |
mesh: Add more checks for element properties
This adds consistency checks for mandatory properties on
org.bluez.mesh.Element1 interface:
- disallow duplicate models on the same element
- disallow elements with duplicate indices
- disallow configuration server model on any element but primary |
Inga Stotland |
6 years ago |
1 file, +32, -20 |
| 3228ce14 |
mesh: Remove redundant code in mesh IO mgmt
This removes unnecessary housekeeping for hci controllers |
Inga Stotland |
6 years ago |
1 file, +2, -20 |
| ce2f88bd |
mesh: Initialize net modes based on node configuration
This correctly initializes net settings related to node features
based on node configuration: either defaults in the case of
a newly node created/provisioned/imported node or the configured
values read from stored existing node. |
Inga Stotland |
6 years ago |
3 files, +31, -31 |
| e289b30b |
mesh: Clean up node.c
This change makes the node initialization a bit easier to follow.
Replace if-else with switch when processing request type, descriptive
function names, more predictable code flow. |
Inga Stotland |
6 years ago |
3 files, +171, -181 |
| 3ee0672f |
mesh: Delete unused function
This removes node_parse_composition() implementation as it is not used
anywhere in the rest of the code base. |
Inga Stotland |
6 years ago |
2 files, +0, -132 |
| 9f108507 |
tools/mesh-cfgclient: Fix appkey/netkey commands
This fixes the checks for the presence of AppKeys and Netkeys. |
Inga Stotland |
6 years ago |
2 files, +29, -13 |
| 70a324d8 |
tools/mesh-cfgclient: Disallow sending a non-existing key
Prior to sending either NetKeyAdd or AppKeyAdd message to a
remote node, check if the key exists locally. |
Inga Stotland |
6 years ago |
3 files, +22, -1 |
| a64d3709 |
client: Fix memory leak |
Syam Sidhardhan |
6 years ago |
1 file, +2, -2 |
| 467a4930 |
build: Include dependencies for ell/settings.[ch]
Including settings.[ch] in a build requires the following chained
dependencies:
PEM
CERT
KEY
PKSC5
BASE64 |
Brian Gix |
6 years ago |
1 file, +17, -1 |
| 63b72764 |
mesh: Fix memory leak in Join() API call |
Brian Gix |
6 years ago |
1 file, +5, -2 |
| 681b623c |
mesh: Rearrange PB-ACK for possible session close
In certain circumstances, reception of PB-ADV messages may trigger
session close. This rearrange ACKs new verified messages before
performing call-back to avoid situations where the session no longer
exists after the message has been handled.
This caused static analysis errors during provisioning, which are now
addressed. |
Brian Gix |
6 years ago |
2 files, +4, -5 |
| 467d2825 |
mesh: Fix to send close indication on timeout
If pb_session is freed in timeout, close indication will not be sent.
pb_session is freed in pb_adv_unreg() and hence removed from tx_timeout.
Added acceptor_free() in acp_prov_close() to ensure pb_session is freed. |
Prathyusha N |
6 years ago |
2 files, +1, -2 |
| f710439e |
Revert "input: Set uniq attribute"
UNIQ is changes to the kernel has not been accepted yet. |
Luiz Augusto von Dentz |
6 years ago |
2 files, +1, -5 |
| b317a409 |
mesh: Fix string of public-oob and static-oob
Fix string typo as per mesh-api.txt |
Prathyusha N |
6 years ago |
1 file, +2, -2 |
| 980525a7 |
mesh: Fix invalid transaction number in PROV_INVITE
For initiator, transaction number starts from 0x00 where as for acceptor
transaction number starts from 0x80. Since transaction number is
pre-incremented and sent in every packet, initialize it with 0xFF for
initiator and 0x7F for acceptor. |
Prathyusha N |
6 years ago |
1 file, +1, -0 |
| e21806ea |
mesh: Fix invalid netkey index in appkey add/delete
8 LSbs of netkey index should be packed into the first octet |
Nagaraj D R |
6 years ago |
1 file, +1, -1 |
| 66f4c241 |
input: Set uniq attribute
Set the uniq attribute of /dev/uinput with the peer device address.
The resulting uinput device will look like this:
$ udevadm info -a -p /sys/devices/virtual/input/input17
...
looking at device '/devices/virtual/input/input17':
KERNEL=="input17"
SUBSYSTEM=="input"
DRIVER==""
ATTR{inhibited}=="0"
ATTR{name}=="BeatsStudio Wireless (AVRCP)"
ATTR{phys}=="00:00:00:6e:d0:74"
ATTR{properties}=="0"
ATTR{uniq}=="00:00:00:1a:33:21" |
Abhishek Pandit-Subedi |
6 years ago |
2 files, +5, -1 |
| 29016d83 |
input: Change uinput name and add AVRCP suffix
When creating the uinput device, change the name to the peer device
name and add a "(AVRCP)" suffix.
The resulting uinput device will look like this:
$ udevadm info -a -p /sys/devices/virtual/input/input17
...
looking at device '/devices/virtual/input/input17':
KERNEL=="input17"
SUBSYSTEM=="input"
DRIVER==""
ATTR{inhibited}=="0"
ATTR{name}=="BeatsStudio Wireless (AVRCP)"
ATTR{phys}=="00:00:00:6e:d0:74"
ATTR{properties}=="0"
ATTR{uniq}=="" |
Abhishek Pandit-Subedi |
6 years ago |
1 file, +30, -14 |
| eae22f39 |
input: Update virtual input devices with correct info
Update uhid and uinput devices with lowercase addresses (to match how
kernel prints it via %pMR). Also update uinput to include the phys
attribute and correctly set the vendor/product/version during init. |
Abhishek Pandit-Subedi |
6 years ago |
3 files, +26, -9 |
| cf48a587 |
lib: Add ba2strlc to match kernel printk format
When the kernel prints the bluetooth address (via %pMR), it prints the
address in lower case. ba2strlc should be used in cases where we should
match the kernel casing (i.e. addresses assigned to /dev/uhid and
/dev/uinput) |
Abhishek Pandit-Subedi |
6 years ago |
2 files, +8, -0 |
| 73401290 |
mesh: fix (re)transmit count & interval steps
The Foundation Model Layer uses little endian ordering. As a
consequence the (re)transmit count and interval steps in the Config
Relay, Config Model Publication and Config Network Transmit messages
use the lower 3 bits for the (re)transmission count and the higher 5
bits for the interval steps.
The figure 4.5 in section 4.3.2.16 of the Mesh Profile Bluetooth
Specification provides a good clarification.
This patch therefore fixes those messages for both the daemon and
configuration client parts. |
Aurelien Jarno |
6 years ago |
3 files, +14, -14 |
| f246d31a |
mesh: Friendship clean-up and rewrite
Friendship support re-written such that it can now support multiple
nodes (on multiple mesh networks) as friends to remote Low Power Nodes
(LPNs). Validated to properly respond to Friend Requests when enabled,
and a hard coded Friend Queue size of 32 (FRND_CACHE_MAX). |
Brian Gix |
6 years ago |
6 files, +263, -696 |
| 100dfc45 |
mesh: clean-up Recieved Message debug output
For each received packet, this change limits outputing the encrypted
version once, and the decrypted version once per applicable local node. |
Brian Gix |
6 years ago |
1 file, +8, -15 |
| 8707850d |
AUTHORS: Mention Silvair's contributions |
Michał Lowas-Rzechonek |
6 years ago |
1 file, +4, -0 |
| 1cba2950 |
AUTHORS: Fix typo in Inga's surname |
Michał Lowas-Rzechonek |
6 years ago |
1 file, +1, -1 |
| 0fa46b49 |
AUTHORS: Mention Alain's contributions |
Marcel Holtmann |
6 years ago |
1 file, +1, -0 |
| e65b55c1 |
doc: Add definition for Load Blocked Keys command |
Alain Michaud |
6 years ago |
1 file, +34, -0 |
| e5c38e08 |
doc: Fix wrongly documented mgmt command opcodes |
Alain Michaud |
6 years ago |
1 file, +3, -3 |
| 6d615f62 |
README: Adding information for dependency get command for Debian |
Alain Michaud |
6 years ago |
1 file, +4, -0 |
| 28dbca0e |
mesh: Inform application about model subscriptions |
Michał Lowas-Rzechonek |
6 years ago |
4 files, +133, -13 |
| 676c91d0 |
mesh: Provide destination address in MessageReceived API |
Michał Lowas-Rzechonek |
6 years ago |
4 files, +36, -17 |