summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* monitor: Decode LE Periodic Advertising Sync Transfer commandSzymon Czapracki2020-01-092-0/+27
| | | | | | | | | | < HCI Command: LE Periodic Advertising Sync Transfer (0x08|0x005a) plen 6 Connection handle: 1 Service data: 0x0001 Sync handle: 1 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Sync Transfer (0x08|0x005a) ncmd 1 Status: Unknown HCI Command (0x01)
* monitor: Decode LE Set Periodic Advertising Receive Enable commandSzymon Czapracki2020-01-092-0/+17
| | | | | | | | | < HCI Command: LE Periodic Advertising Receive Enable (0x08|0x0059) plen 3 Sync handle: 0 Reporting: Enabled (0x01) > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Receive Enable (0x08|0x0059) ncmd 1 Status: Unknown HCI Command (0x01)
* monitor: Decode LE Periodic Advertising Sync Transfer Received EventSzymon Czapracki2020-01-092-0/+35
|
* monitor: Update periodic sync commands.Szymon Czapracki2020-01-092-19/+83
| | | | | | | | | | | | | | | | | | | Change fields in periodic_adv_(create/term)_sync_cmd, according to their description with 5.1 specification. < HCI Command: LE Periodic Advertising Create Sync (0x08|0x0044) plen 14 Options: 0x0001 Use Periodic Advertiser List Reporting initially enabled SID: 0x00 Adv address type: Public (0x00) Adv address: 00:00:00:00:00:00 (OUI 00-00-00) Skip: 0x0000 Sync timeout: 0 msec (0x0000) Sync CTE type: 0x0000 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Create Sync (0x08|0x0044) ncmd 1 Status: Unknown HCI Command (0x01)
* mesh: Fix BeaconFlags property typeMichał Lowas-Rzechonek2020-01-081-1/+1
| | | | This property is an uint8, not a boolean.
* mesh: Remove local_iv_index and local_ivu aliasesRafał Gajda2020-01-081-12/+6
|
* mesh: Fix IV recoveryRafał Gajda2020-01-081-1/+1
| | | | | | | | | | | | 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.
* mesh: Remove misleading DEFAULT_CRPL from node.cMichał Lowas-Rzechonek2020-01-081-2/+0
|
* mesh: Fix node resetMichał Lowas-Rzechonek2020-01-081-2/+8
| | | | Instead of stopping the daemon, just remove the node.
* mesh: Style fixInga Stotland2020-01-061-29/+30
| | | | This fixes style issues: spaces -> tabs, alignment.
* meshctl: Fix meshctl crashAnurag Biradar2020-01-061-0/+1
| | | | | | | | | | | | 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
* meshctl: Fix infinite sock readAnurag Biradar2020-01-061-1/+6
| | | | | When a stream socket peer has performed an orderly shutdown, then return value will be 0.
* agent: Detect when ongoing request is already in progressLuiz Augusto von Dentz2019-12-274-50/+97
| | | | | | 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.
* mesh: Start link establishment timer of 60 secPrathyusha N2019-12-271-0/+2
| | | | | | | | | | 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().
* mesh: Base config json code on newer version of json-cInga Stotland2019-12-243-138/+34
| | | | | | | | | 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
* mesh: Recognize SNBs in SecondsSinceLastHeardBrian Gix2019-12-243-3/+29
| | | | | Timestamp is taken on each OTA beacon reception, and considered in the SecondsSinceLastHeard property.
* mesh: Deliver newly composed SNBs to local nodesBrian Gix2019-12-243-0/+17
|
* TODO: Update mesh sectionInga Stotland2019-12-201-16/+1
|
* mesh: Fix getting managed objects from ObjectManagerMichał Lowas-Rzechonek2019-12-183-37/+45
| | | | | | | | | | | | | | | | | | | 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.
* mesh: Add mesh-main.conf file with general mesh configurationInga Stotland2019-12-166-15/+162
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* tools/mesh-cfgclient: add friend get/set commandsAurelien Jarno2019-12-161-0/+40
| | | | | Add friend-get and friend-set commands as per Mesh Profile 4.3.2.55, 4.3.2.56 and 4.3.2.57.
* tools/mesh-cfgclient: add network transmit get/set commandsAurelien Jarno2019-12-161-0/+40
| | | | | 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.
* shared/mainloop: Use connect() instead of bind() for sd_notifyGuillem Jover2019-12-161-1/+1
| | | | | | | | 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.
* mesh: Cleanup unused LPN codeBrian Gix2019-12-162-50/+8
| | | | The daemon does not support the LPN role, and this is unreferenced code.
* mesh: Refactor Secure Network BeaconingBrian Gix2019-12-165-242/+326
| | | | | | | | | | | 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.
* mesh: Add more checks for element propertiesInga Stotland2019-12-151-20/+32
| | | | | | | | 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
* mesh: Remove redundant code in mesh IO mgmtInga Stotland2019-12-151-20/+2
| | | | This removes unnecessary housekeeping for hci controllers
* mesh: Initialize net modes based on node configurationInga Stotland2019-12-103-31/+31
| | | | | | | 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.
* mesh: Clean up node.cInga Stotland2019-12-103-181/+171
| | | | | | 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.
* mesh: Delete unused functionInga Stotland2019-12-102-132/+0
| | | | | This removes node_parse_composition() implementation as it is not used anywhere in the rest of the code base.
* tools/mesh-cfgclient: Fix appkey/netkey commandsInga Stotland2019-12-102-13/+29
| | | | This fixes the checks for the presence of AppKeys and Netkeys.
* tools/mesh-cfgclient: Disallow sending a non-existing keyInga Stotland2019-12-103-1/+22
| | | | | Prior to sending either NetKeyAdd or AppKeyAdd message to a remote node, check if the key exists locally.
* client: Fix memory leakSyam Sidhardhan2019-12-081-2/+2
|
* build: Include dependencies for ell/settings.[ch]Brian Gix2019-12-041-1/+17
| | | | | | | | | | Including settings.[ch] in a build requires the following chained dependencies: PEM CERT KEY PKSC5 BASE64
* mesh: Fix memory leak in Join() API callBrian Gix2019-12-041-2/+5
|
* mesh: Rearrange PB-ACK for possible session closeBrian Gix2019-12-042-5/+4
| | | | | | | | | | 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.
* mesh: Fix to send close indication on timeoutPrathyusha N2019-12-042-2/+1
| | | | | | 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.
* Revert "input: Set uniq attribute"Luiz Augusto von Dentz2019-12-042-5/+1
| | | | UNIQ is changes to the kernel has not been accepted yet.
* mesh: Fix string of public-oob and static-oobPrathyusha N2019-12-031-2/+2
| | | | Fix string typo as per mesh-api.txt
* mesh: Fix invalid transaction number in PROV_INVITEPrathyusha N2019-12-031-0/+1
| | | | | | | 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.
* mesh: Fix invalid netkey index in appkey add/deleteNagaraj D R2019-12-031-1/+1
| | | | 8 LSbs of netkey index should be packed into the first octet
* input: Set uniq attributeAbhishek Pandit-Subedi2019-12-032-1/+5
| | | | | | | | | | | | | | | | | | 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"
* input: Change uinput name and add AVRCP suffixAbhishek Pandit-Subedi2019-12-031-14/+30
| | | | | | | | | | | | | | | | | | | 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}==""
* input: Update virtual input devices with correct infoAbhishek Pandit-Subedi2019-12-033-9/+26
| | | | | | 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.
* lib: Add ba2strlc to match kernel printk formatAbhishek Pandit-Subedi2019-12-032-0/+8
| | | | | | | 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)
* mesh: fix (re)transmit count & interval stepsAurelien Jarno2019-12-023-14/+14
| | | | | | | | | | | | | | 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.
* mesh: Friendship clean-up and rewriteBrian Gix2019-11-286-696/+263
| | | | | | | 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).
* mesh: clean-up Recieved Message debug outputBrian Gix2019-11-281-15/+8
| | | | | For each received packet, this change limits outputing the encrypted version once, and the decrypted version once per applicable local node.
* AUTHORS: Mention Silvair's contributionsMichał Lowas-Rzechonek2019-11-271-0/+4
|
* AUTHORS: Fix typo in Inga's surnameMichał Lowas-Rzechonek2019-11-271-1/+1
|