Commit Graph

12 Commits

Author SHA1 Message Date
Prathyusha N
424f88e7b8 mesh: Handle close for Acceptor
Provision complete callback is handled in provision failure case.
If link closed received abruptly with reason success, triggered
provision complete callback. Removed session timeout and session
free as they are handled in pb_adv_unreg.
2020-03-25 10:31:14 -07:00
Brian Gix
ad7db1fa1f mesh: Implement provisioning loop-back
This allows one App using the mesh daemon to provision another.
2020-01-13 09:15:15 -08:00
Prathyusha N
99fa144721 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().
2019-12-27 08:55:25 -08:00
Brian Gix
681b623c82 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.
2019-12-04 09:11:46 -08:00
Prathyusha N
467d282562 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.
2019-12-04 09:10:38 -08:00
Prathyusha N
980525a762 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.
2019-12-03 10:21:22 -08:00
Brian Gix
2e46771050 mesh: Convert provisioning pkts to packed structs
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.
2019-07-14 08:32:18 -07:00
Brian Gix
fea558460f mesh: Fix support for Provisioner Initiator 2019-07-14 08:32:18 -07:00
Inga Stotland
6df5c5e379 mesh: Remove unnecessary includes from .c files 2019-05-17 13:14:40 -07:00
Inga Stotland
af3f7f1b09 mesh: Update copyright dates 2019-05-17 13:14:40 -07:00
Brian Gix
9e6da22ed8 mesh: Fix for file naming convention 2019-02-21 16:21:30 -08:00
Brian Gix
98ef51901d mesh: Add direction agnostic PB-ADV implementation
Originally found in prov.c, this file implements the PB-ADV
provisioning transport.  It may be used by either the
Acceptor or the Initiator side of the Provisioning procedure,
but only one session may be active at a time.
2019-01-08 08:26:22 -08:00