Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host: Adding database hash calculation #1

Open
wants to merge 307 commits into
base: micropython_1_4_0
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jul 12, 2021

  1. NimBLE host: Modify ble_gap_wl_set to support clearing complete whi…

    …telist
    
    * Modify test case `*_wl_bad_args` to accept 0 whitelist entries.
    prasad-alatkar authored and sjanc committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    6df27f0 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2021

  1. nimble/ll: Fix TxAdd field for ADV_EXT_IND

    We never include AdvA on primary channel so TxAdd should be set to 0 as
    it's RFU in such case.
    andrzej-kaczmarek committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    d0f0cad View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2021

  1. nimble/ll: Fix scanner assert on receiving AUX_ADV_IND

    If scanned chain was truncated due to low buffers for HCI event we may
    be already too late to remove next AUX from scheduler and thus can
    receive next packet. Just ignore PDU if truncated was already sent.
    sjanc committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    3900772 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2021

  1. apps: Add periodic advertising instance to ext_advertiser sample

    Add new instance that advertises 1650 bytes of periodic data.
    sjanc committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    28533d4 View commit details
    Browse the repository at this point in the history
  2. transport/nrf5340: Fix assignment in assert

    Fix typo in assert which make it never catch intended error.
    sjanc committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    498f3ad View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

  1. nimble/ll: Use callout for scan duration and period

    hal_timer executes from ISR which was preempting LL task
    and could result in HCI flow issues if unlucky.
    sjanc committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    14acdf1 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. Configuration menu
    Copy the full SHA
    a472cf5 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2021

  1. Merge pull request apache#1010 from vrahane/nimble_scanning_fix

    controller/ble_ll_scan: For callouts number of ticks should be used
    vrahane committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    e49a145 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. nimble/host: Fix txom leaks in ble_sm_tx and ble_l2cap_sig_tx

    Those functions are expected to always consume txom.
    sjanc committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    7c581b0 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2021

  1. Configuration menu
    Copy the full SHA
    8b9a2ae View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2021

  1. nimble/host: Sync sending Host Number of Completed Packets command

    Host Number of Completed Packets command is special as it doesn't
    generate status event and thus is not send with ble_hs_hci_cmd_tx.
    
    We should stil sync sending it with ble_hs_hci_cmd_tx() though to
    avoid requesting more than one command buffer from HCI transport
    (which may not be able to provide more).
    sjanc committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    87f1d1d View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2021

  1. Configuration menu
    Copy the full SHA
    9d3383b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d3f3cc View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2021

  1. Configuration menu
    Copy the full SHA
    ddf8043 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. npl/riot: simplify ble_npl_hw_is_in_critical()

    Recently the RIOT IRQ API was extended to support irq_is_enabled(),
    so time to switch away from the hacked implementation of
    ble_npl_hw_is_in_critical().
    haukepetersen committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    891a0c9 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

  1. transport/usb: Fix potential buffer overrun

    When HCI command was received from USB transport cmd_len was not checked
    and was used for memcpy.
    It could lead to memory corruption if USB stack called this function with
    size exceeding maximum command size. This is currently possible scenario
    with TinyUSB stack (it will be fixed there as well).
    kasjer committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    11f4348 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2021

  1. host/l2cap: send command reject in L2CAP disc req for invalid CID

    If ble_hs_conn_chan_find_by_scid fails to find channel, it means
    that destination CID in L2CAP Disconnection Request is invalid.
    Send L2CAP_COMMAND_REJECT_RSP with BLE_L2CAP_SIG_ERR_INVALID_CID
    reason.
    
    This is affecting L2CAP/LE/CFC/BV-23-C
    KKopyscinski committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    fcb617a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0b15da View commit details
    Browse the repository at this point in the history
  3. host/l2cap: disconnect channel if received more than expected

    If receive data lenght exceeds what was defined in first packet
    disconnect with peer.
    
    This is affecting L2CAP/LE/CFC/BV-28-C
    KKopyscinski committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    5b93f69 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2021

  1. Return the current tick as when the RF will be fully enabled (when MY…

    …NEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME is not defined).
    
    When `MYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME` is not defined, the existing code always returns 0 as the "tick at which RF will be fully enabled".  However, this causes problems.  For example, in `ble_ll_adv_sm_start()` (ble_ll_adv.c:2743) the calculation of `delta` overflows when the system timer is between 0x80000000 and 0xFFFFFFFF -- causing an incorrect, huge adjustment to be made to the scheduled time, ultimately stopping the advertisements from being sent.
    danielgjackson authored and andrzej-kaczmarek committed Sep 26, 2021
    Configuration menu
    Copy the full SHA
    ba36c80 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2021

  1. apps/ext_advertiser: Fix instance and sid values

    Let's use instance number as sid also, this makes it easier to find
    those instances in the air.
    
    Also fix instance numbers in comments.
    andrzej-kaczmarek committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    e4f5b44 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. Configuration menu
    Copy the full SHA
    2bc5aed View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Simplify scansm parameters

    'own_addr_type' and 'scan_filt_policy' are the same for both PHYs so no
    need to keep them separately for each scanp. Also we already had
    own_addr_type so usage of this parameter was somewhat inconsistent.
    andrzej-kaczmarek committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    e084ef7 View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Decouple aux scanner from main scansm

    This change moves handling of scanning aux PDUs to separate unit and
    thus simplifies code in ble_ll_scan. Basically, once ADV_EXT_IND is
    scanned by main scansm, scanning aux PDUs is running as a separate
    LL state and is handled by separate code.
    
    Handling on aux PDUs was also refactored a bit, more importantly we
    no longer need ref/unref for aux_data which caused lots of issues in
    the past - aux_data is always only allocated in ISR context when
    ADV_EXT_IND with AuxPtr is received and then can be freed only in
    LL context if no subsequent scan is scheduled.
    
    In addition, some changes were done to filtering routines so that now
    filtering and address resolution is done only once for each scanned
    ext advertising event, i.e. either on ADV_EXT_IND or AUX_ADV_IND.
    
    There is still some legacy code for aux scanner left since it's used
    by initiator role. This will be eventually removed once initiator is
    refactored to use the same code as generic scanner.
    andrzej-kaczmarek committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    eed4389 View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Fix TX time restrictions during phy transition

    We do not need to restrict TX time after sending LL_PHY_REQ as a master,
    this only applies to slave.
    
    This makes LL/CON/CEN/BV-53-C pass instead of being inconclusive due to
    data fragmentation done by IUT between LL_PHY_REQ and LL_PHU_UPDATE_IND.
    
    Ref: Core 5.x, Vol. 6, Part B, section 5.1.10.1
    andrzej-kaczmarek committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    08e6972 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2021

  1. Configuration menu
    Copy the full SHA
    17f985f View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2021

  1. travis.yml: Bump Go to 1.16

    This is required for updated install script to work properly.
    andrzej-kaczmarek committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    93368f5 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Fix handling of removing adv item from scheduler

    If adv item is removed from scheduler we should drop event instead
    of just sending done event.
    
    Sending done event instead can cause issues on extended advertising
    instances if we remove aux items since it does not clear aux_active
    flag. As a result, when done even is handled and we reached max_events,
    HCI event will not be sent since it waits for done event for secondary
    channel but that one won't cone since aux items are already removed.
    andrzej-kaczmarek committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    aa14cf8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    74e1217 View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Remove unused code

    Not used anymore.
    andrzej-kaczmarek committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    94039bc View commit details
    Browse the repository at this point in the history
  5. nimble/ll: Add clarification comment

    Just clarify why we should return here instead of 'break'.
    andrzej-kaczmarek committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    c0ef83b View commit details
    Browse the repository at this point in the history
  6. nimble/ll: Fix phy configuration for initiator

    Not sure how this even works, but configuration flags for phys were
    never set...
    andrzej-kaczmarek committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    cddb7c4 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. nimble/ll: Fix scanning with LL Privacy disabled

    This is regression after eed4389.
    Without this fix only SCAN_RSP are reported back to host...
    andrzej-kaczmarek authored and haukepetersen committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    6c9f709 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Optimize AUX_CONNECT_REQ tx

    Currently we initialize a lot of connsm settings prior to scheduling
    1st connection event and this takes some time. However, we only need
    connection interval, latency and supervision timeout to be initialized
    in order to schedule event properly and send AUX_CONNECT_REQ, other
    stuff can be done after tx has already started.
    
    This is especially important on slower MCU like CMAC as with old code
    it was barely possible to make tx within Tifs even on speed build.
    
    New code saves ~15us on CMAC prior to tx so we have quite a good margin
    to complete on time.
    andrzej-kaczmarek committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    6c9f95a View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Allow 2M params as fallback for ext conn create

    We ignore 2M values only for scanning since we do not scan on 2M when
    ext conn create is pending, but there's nothing wrong in using those
    parameters as fallback in case we established connection on phy that
    was not in phy mask.
    andrzej-kaczmarek committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    a892c8f View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2021

  1. mesh: Fix linux port

    It looks like create_free_list() in glue.c requires word aligned
    blocks which on 64-bit is 8 bytes.
    sjanc committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    4ed4f9e View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Fix encrypted data PDU payload length calculation

    Encrypted data PDU payload includes MIC, so we need to take this into
    account when calculating actual payload size available for data.
    andrzej-kaczmarek committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    c185dd6 View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Refactor item scheduling

    This refactors all scheduling APIs (i.e. insertions to scheduler) to
    use common code instead of reimplementing the same or similar flow
    over and over again. The single 'ble_ll_sched_insert' call covers all
    currently possible scenarios with minimal overhead so all existing
    insertion APIs use it and add some more extra processing if needed.
    Also it adds some flexibility via preemption callback so it's possible
    to better define priorities for each item.
    andrzej-kaczmarek committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    fbd0a8c View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2021

  1. nimble/transport: Use max ACL data size for RAM transport

    Since in RAM transport ACL data are passed simply as an mbuf pointer
    between host and controller we can use max ACL data size to avoid data
    fragmentation over HCI. This actually saves some RAM since we do not
    need extra buffers for fragmented HCI ACL data.
    andrzej-kaczmarek committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    815d890 View commit details
    Browse the repository at this point in the history
  2. nimble/hci: Fix mbuf allocation for HCI ACL fragmentation

    We need to use proper user pkt header length when allocating new mbuf
    for HCI ACL data fragment, otherwise leading space won't be set properly
    and data may be overwritten.
    
    See 20c4817 for reference.
    
    Note: technically this does not make much sense since we use max HCI ACL
    data size for combined build so fragmentation won't happen, but let's
    fix it anyway just in case someone uses other value for whatever reason.
    andrzej-kaczmarek committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    eaa1e67 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2021

  1. Configuration menu
    Copy the full SHA
    43308a6 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2021

  1. nimble/phy/nrf: Fix checking for resolved addr

    We should check if NRF_AAR was enabled prior to checking its result
    to avoid reading some uninitialied values if resolver was not enabled.
    andrzej-kaczmarek committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    0682fa3 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Add LLCP tracing via HCI events

    This adds option to trace LLCP PDUs via HCI events. Each LLCP PDU is
    sent in a vendor-specific HCI event which can be decoded e.g. by btmon.
    Identifier and format of HCI event os the same as used by controllers
    from Intel so it may be necessary to fake NimBLE's manufacturer id by
    setting 'BLE_LL_MFRG_ID: 2' so btmon can decode events properly.
    andrzej-kaczmarek committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    aab952c View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2021

  1. nimble/ll: Optimize sync sm scheduler handling

    Scheduler item in sync sm can be initialize only once, no need to do
    this on each event. Callbacks for ADV_SYNC_IND and ADV_CHAIN_IND are
    pretty much the same except for wfr calculations so we'll just have
    flag to indicate what is being scanned.
    andrzej-kaczmarek committed Oct 20, 2021
    Configuration menu
    Copy the full SHA
    99de134 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2021

  1. Configuration menu
    Copy the full SHA
    70021b6 View commit details
    Browse the repository at this point in the history
  2. npl/riot: map nrf52_clock_hfxo_request/release()

    Compiling the hal_timer abstractions requires
    nrf52_clock_hfxo_request() and _release() functions to be available.
    This commit maps the appropriate RIOT functions in the NPL layer.
    haukepetersen committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    4fd03df View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2021

  1. controller: fix assert bug in ble_ll_sched_insert()

    When trying to schedule connection events for a connection while
    there are already advertising events as well as connections events
    for other connections in the queue, ble_ll_sched_insert() triggers
    an assertion failure. This happens, because `preemt_first` is not
    reset for the case that the new event can not be scheduled. This
    commit fixes this issue.
    haukepetersen committed Oct 28, 2021
    Configuration menu
    Copy the full SHA
    8d66e40 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2021

  1. host/mesh: fix send_pub_key

    We should copy from om_data, not om_databuf.
    KKopyscinski committed Oct 29, 2021
    Configuration menu
    Copy the full SHA
    21fa48c View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2021

  1. nimble/phy/cmac: Fix rx-tx-rx transition setup

    In rare cases, tx-rx transition after rx may not be set properly and
    this can result in a connection that is not established properly.
    
    Transition type is set from ble_phy_tx which is called from sw_mac isr
    and it should be set before bs_start is fired since it will setup that
    transition. This is not a problem on 1st tx, but in case this happens
    after rx, it may happen that bs_start is called before ble_phy_tx sets
    transition type, so there will be no transition set. However, following
    events will have proper transition set so they will act accordingly.
    This probably can be recovered in most cases, but in case of extended
    connection we will not receive AUX_CONNECT_RSP and will keep "waiting"
    for it, so the connection will not be set properly before 1st conn
    event and that results in an assert.
    
    The fix is to block bs_ctrl interrupts on tx-rx transition to make sure
    bs_start will not happen until ble_phy_tx sets transition correctly.
    Similar flow is already used for 1st tx, i.e. bs_ctrl interrupts are
    disabled by ble_phy_set_start_time and enabled again in ble_phy_tx.
    Obviously, we also have to enable interrupts in ble_phy_disable in case
    flow is interrupted somewhere in the middle.
    andrzej-kaczmarek committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    5c80f17 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Fix marking AdvA as resolved when restoring addrd

    AdvA was resolved only if corresponding flag is set. It's possible to
    have rpa_index>0 and not resolved AdvA in case AdvA was an identity
    address but it was added to rl.
    andrzej-kaczmarek committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    f75ccfc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4d95b1c View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Use generic scanner for initiator

    This moves initiator state handling to generic scanner and removes
    existing spearate ll_initiating state from LL and associated code.
    By using generic code we no longer need to worry about maintaining two
    separate instances of similar code since e.g. privacy and filtering
    is done via the same code path. Also we no longer need old aux scanner
    code so all remaining parts of that code can be removed.
    
    This saves ~3K of flash (optimized build with all features enabled)
    and also some RAM (mostly depending on pool size used by old aux
    scanner).
    andrzej-kaczmarek committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    2443892 View commit details
    Browse the repository at this point in the history
  5. nimble/ll: Refactor conn init param handling

    This fixes handling of parameters used for conn init.
    
    Firstly, we only need conn init params when intiating new connection so
    we can have single, global instance of that params - no need to store
    them in conns. This saves 72 bytes of RAM per connsm.
    
    Secondly, we do not need to store all parameters from HCI command since
    some of them are only used to initialize scanner and those can be used
    immediately. We only need to store connection parameters for ext conn
    create.
    
    This also allows to share more code between legacy and ext conn create
    code paths.
    andrzej-kaczmarek committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    df6ac21 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9f8fab7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    12cd822 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    dc47bc5 View commit details
    Browse the repository at this point in the history
  9. nimble/ll: Remove max_tx_octets_phy_mode from connsm

    This is never accessed so looks like we do not need it (anymore)...
    andrzej-kaczmarek committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    868881b View commit details
    Browse the repository at this point in the history
  10. nimble/ll: Use common helper for conn params check

    Turns out we already have one, so let's use it in new code.
    andrzej-kaczmarek committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    da46f18 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9716331 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2021

  1. complaint -> compliant

    reynir authored and sjanc committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    7f31820 View commit details
    Browse the repository at this point in the history
  2. apps/bttester: implement NRPA rotation

    As per CORE v5.3, Vol 3, Part C 10.7.1 NRPA should also rotate, same
    as RPA is doing right now. For time beeing let's implement this in
    tester application, before it's implemented in host.
    
    This affects GAP/BROB/BCST/BV-04-C
    KKopyscinski committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    8135e51 View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Fix scan window/interval limits for ext scan

    Max scan window and interval is different for ext scan, we should allow
    proper value to be used.
    
    Also change func name to have proper prefix and define values to hex
    values, as defined Core spec.
    andrzej-kaczmarek committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    4f70d00 View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Cleanup function names

    Use common prefix ble_ll_scan_hci for all HCI commands handlers in
    ble_ll_scan.
    andrzej-kaczmarek committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    7875bc2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9559689 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2021

  1. nimble/ll: Fix return values from scheduler callbacks

    Make sure we use 'running' and 'done' properly. This did not matter so
    far since return value from sched_cb is not used anywhere, but this is
    going to change.
    andrzej-kaczmarek committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    b67d108 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Optimize sched restart

    When sched_q head changed we only should stop sched timer to make sure
    it does not fire after we leave critical section and we can restart it
    then without need for additional locking.
    
    We do not need to change rfmgmt because in case new sched_q head is
    later then previous one, rfmgmt will fire too early and we'll either
    disable it immediately on restart or keep it enabled for upcoming item,
    depending on timing.
    andrzej-kaczmarek committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    7f63bd0 View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Add fast path for aux chain scheduling

    For short aux offsets we can to usecs to ticks conversion using only
    32-bit arithmetics without integer division. This is much faster than
    generic routine, especially on M0 (e.g. CMAC) which does not have hw
    support for integer division. The faster calculation is even more
    accurate than generic one since it's never off by 1 tick.
    
    This is a temporary solution until we have more generic timer routines
    that do the same kind of optimizations.
    andrzej-kaczmarek committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    ed45637 View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Add debugging for sched active item

    This replaces sched_item_cb debug GPIO with sched_item that is set to
    high state for the entire duration of sched item active time, i.e. from
    sched run to LL standby. Note that sched_item_cb debugging is not that
    useful since it's almost the same as sched_run, so we better replace
    it instead of keeping both to avoid syscfg clutter.
    andrzej-kaczmarek committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    5271e1f View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. nimble/ll: Use get_le24 to read AuxPtr

    No need to read more bytes and discard bits, we have helper that reads
    exactly 24 bits :)
    andrzej-kaczmarek committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    5cb95b3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47cabcd View commit details
    Browse the repository at this point in the history
  3. apps/blestress: Fix tx_stress_13

    We should not free mbuf in BLE_GAP_EVENT_NOTIFY_RX since it's freed by
    host after returning from event callback.
    andrzej-kaczmarek committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    5e6bb6f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0b36c1a View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. nimble/ll: Ignore aux PDUs while not ext scanning

    We do not really want to process aux PDUs when using legacy scanning.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    33aa9b4 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Fix aux handling in initiator

    If AUX_ADV_IND is ignored due to address mismatch in initiator it
    should be marked as ignored, otherwise LL will assert since it assumes
    that while initiating any valid PDU is either AUX_CONNECT_RSP or it
    was an AUX_ADV_IND with AUX_CONNECT_REQ sent. In our case it will be
    an AUX_ADV_IND without AUX_CONNECT_REQ sent...
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    e750765 View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Fix LE Coded scan parameters handling

    Make sure we only try to setup LE Coded in scanner if both ext adv
    (i.e. also ext scan) and LE Coded PHY are enabled.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    3153e20 View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Fix rx abort on aux scan

    If rx on aux scan is aborted, we need to set LL back to standby.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    9994249 View commit details
    Browse the repository at this point in the history
  5. nimble/ll: Fix starting ctrl proc timer

    We cannot just initialize callout prior to restarting since this will
    wipe it out and thus break callouts queue if it was already added there.
    Instead, initialize once on module init.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    17a7240 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    513ea27 View commit details
    Browse the repository at this point in the history
  7. nimble/ll: Fix encrypted payload length

    ble_ll_pdu_max_tx_octets_get() returns number of bytes that can be
    added between LL header and CRC so the complete PDU is no longer than
    maxTxTime allowed. However, if link is encrypted there will be also
    MIC added after the payload so effectively we need to stript that extra
    4 bytes from allowed payload length.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    4a89a4c View commit details
    Browse the repository at this point in the history
  8. nimble/ll: Add more convenient way to set pub dev addr

    This adds BLE_LL_PUBLIC_DEV_ADDR which allows to conveniently set
    public device address as 48-bit number. It has priority over existing
    BLE_PUBLIC_DEV_ADDR which allows to do the same but in a very nasty
    way via code injection so is not very intuitive to use.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    91c5d9a View commit details
    Browse the repository at this point in the history
  9. apps/blestress: Fix rx_stress_13

    ble_gattc_notify_custom() will trigger a GAP event so we cannot use it
    inside GAP event handler as this will create infinite loop.
    andrzej-kaczmarek committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    911a257 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b67d3c1 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2021

  1. host/mesh: Fixes Friend Queue store message

    If the SRC field of the received message is a unicast
    address of an element of the Low Power node, then the
    message shall not be stored in the Friend Queue.
    
    Otherwise, lpn will discard this message, eventually
    it breaks friendship.
    
    this is port of 5b11c053efcb6eec351bb275020fdac9ed6592d9
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ec0819f View commit details
    Browse the repository at this point in the history
  2. host/mesh: Break up mesh settings

    The mesh settings.c module is a giant piece of code responsible for
    storing the mesh stack configuration. Such approach makes it difficult
    to control the data to be stored, breaks the stack modules'
    encapsulation by forcing them to reveal the internal kitchen, which
    leads to unpleasant issues such as #19799.
    
    This commit moves the responsibility of storing the configuration
    to corresponding modules while keeping control of the moment of storing
    the configuration and of starting the stack after the settingss loading
    is completed.
    
    This doesn't introduce any abstraction between the mesh settings.c and
    other modules as it will add more complexity and overhead than necessary
    for the actual task.
    
    This is a port of 561a8e4f0e9ff43d878f382de4d1052e025febec
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    41ee1e2 View commit details
    Browse the repository at this point in the history
  3. host/mesh: Fix mod app key get vnd

    pass cid instead of CID_NVAL in parameters of mod_member_list_get
    
    This is port of 3ff1eb618fd50ecb4328d0f832471caaec7be3ee
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    0fa50c3 View commit details
    Browse the repository at this point in the history
  4. host/mesh: Fix fix mod_sub_get_vnd

    pass cid instead of CID_NVAL in parameters of mod_member_list_get
    
    This is port of 942979b252a46602213656107d6b5b6a5e98615c
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    0c6d730 View commit details
    Browse the repository at this point in the history
  5. host/mesh: Store network at the end of provisioning

    After #31176, the network would get stored immediately in
    bt_mesh_net_create, causing the address and devicekey to get stored as
    their zero-initialized version, as they're only being set in the
    bt_mesh_comp_provision call, which fires after.
    
    This is port of a281d10cff8d0e626fcc31897649f4312c794a4e
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    94b3c4a View commit details
    Browse the repository at this point in the history
  6. host/mesh: Update seqnum when re-encrypting for friend

    Sets the sequence number when re-encrypting messages from the friend to
    the lpn.
    
    This is port of 512444d863f0e4de69ea600dda37b11f032e9707
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ea75a5e View commit details
    Browse the repository at this point in the history
  7. host/mesh: Only do label lookup when there are labels

    Include virtual label's pending_store function in the LABEL_COUNT > 0
    compile guard to avoid including dead iteration code in the compilation.
    
    This is port of 7039675df13c74e74fb76d4f41cfc7e949c209ad
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    9a7d9f4 View commit details
    Browse the repository at this point in the history
  8. Resolve dead code in store_seg

    If CONFIG_BT_MESH_SEQ_STORE_RATE is 1, the check in store_seq can be
    reduced to a simple if (false), and the modulo code does not need to be
    included in the build.
    
    This is port of aef354c6bc3264de9f2a38b8c56ff5253b35912a
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    135dd1b View commit details
    Browse the repository at this point in the history
  9. host/mesh: update k_work API

    Updated k_work API to new behaviour reflected in `glue`.
    
    This is port of:
    81b9ba3a9b2dd4d5bd3f0966eac9f8f6dad983e6
    17831b045f5869b0e57e26caa0441f263d1a5ae6
    6a097caa22c769855aba552b50371bafe05ee6b4
    5506727bde18bb9afcf4f1b969cd2cc09d7e65f8
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    097aa7f View commit details
    Browse the repository at this point in the history
  10. host/mesh: Perform replay check on SeqAuth

    To prevent the transport layer from accepting duplicate or out of order
    segmented messages, add an RPL-like check for the SeqAuth of the
    segmented messages when their context is allocated. This prevents
    duplicate receives of the same segmented messages in the case where a
    single source address sends two segmented messages in parallel (to two
    different addresses):
    
    Previously, when receiving two segmented messages, the first message
    would go through to the access layer, then the second. Then, if the
    transport layer received any repeated segments for the first message, it
    would fail to identify the SeqAuth as old, as all its segments were of
    new sequence numbers, and the "already complete SDU" check would only
    look at the second message. Thus, the segmented message got processed
    again and passed to the access layer, even though it was a duplicate.
    
    To solve this, we need a mechanism like RPL, but only for the segmented
    messages' SeqAuth. We cannot re-use the actual RPL mechanism, as it
    can't support the scenario provoked by the "blocking tx" mechanism in
    transport. This mechanism allocates the SeqAuth when the message is
    first passed to the transport layer. The ongoing message that caused the
    block would keep sending segments with higher sequence numbers than
    the blocked message got, which will cause the blocked message to fail
    the RPL check.
    
    This patch adds a parallel SeqAuth mechanism to the RPL module, which
    only deals with the SeqAuth of the segmented messages. This list gets
    checked when the segmented message is first allocated, in the same
    manner as the general RPL mechanism. The storage gets hooked into the
    RPL mechanism, by adding a separate seg field to each RPL entry.
    
    This is port of 4fbd0cb0ca6bead0354f54808da3224302d98c28
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    840e922 View commit details
    Browse the repository at this point in the history
  11. host/mesh: Fix restoring fast period divisor from settings

    The Health Fast Period Divisor is stored within
    the model publish parameters on the access layer.
    The opposite part for divisor restoring has been missed.
    
    This is port of 73e1c6a77d71f8b51746946f78f0b3525101e1c0
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ffbd358 View commit details
    Browse the repository at this point in the history
  12. host/mesh: Send Link Close message when closing link

    Instead of silently closing the link we should send a Link Close message
    three times before resetting provisioning state.
    
    From Mesh Profile Specification v1.0.1.:
    ```
    5.3.1.4.3 Link Close message
    
    The Link Close message is used to close a link.
    ```
    
    ```
    5.3.2 Link Establishment procedure
    
    The device shall start the link timer, set to 60 seconds, when the link
    is open. When the link timer expires, then the device shall close the
    link.
    ```
    
    ```
    5.3.3 Generic Provisioning behavior
    
    If the sender does not receive a Transaction Acknowledgment message
    within 30 seconds after sending the first message in a transaction,
    the sender shall cancel the transaction, cancel the provisioning
    process and close the link.
    ```
    
    From Mesh Profile Test Specification p6:
    ```
    MESH/PVNR/PBADV/BV-01-C
    
    Test Procedure:
    [...]
    6. The IUT is induced to send a Link Close message with the Reason field
    set to 0x02 to terminate the link. The message is sent at least three
    times to ensure the message is received by the Lower Tester.
    ```
    
    This is port of 497d9df96acde1d28f7cd83c786e496e8ea0db67
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    21f1b07 View commit details
    Browse the repository at this point in the history
  13. host/mesh: Rename bt_mesh_cfg_comp_data_get's status param to rsp

    The first byte of the composition data status message is the returned
    page index, not the status of the request. This is now reflected in the
    API.
    
    This is port of 9259b199bba0ae982632c36069a472b197627521
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    b5e2a3a View commit details
    Browse the repository at this point in the history
  14. host/mesh: Composition data page 0 traversal

    Adds a parsing mechanism for Composition data page 0 in the Config
    Client API, and uses it in the shell module to parse the incoming
    composition data.
    
    This is port of b84fee5190cd72e9d31fa820aaa5d8684ad4a11c
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    5b4fd30 View commit details
    Browse the repository at this point in the history
  15. host/mesh: Introduce acknowledged message API

    The implementation of blocking calls is common for all the client
    models.
    
    This change reduces the code duplication by introducing new API that
    helps to manage acknowledged messages.
    
    This is port of a94c7e3a23fc1225aec9f13c1e37cc2853f70c82 and
    c5e4011e29b878fc1771876fc30db0ddcc084829
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    8fa05b8 View commit details
    Browse the repository at this point in the history
  16. host/mesh: Rework publication timer

    Periodic publication would previously build and send the first
    publication inside the bt_mesh_model_pub() function, before cancelling
    and rescheduling the next publication. The timer handler would only
    handle retransmissions, and would abandon the rest of the publication
    event if one of the packets failed to send.
    
    This design has three issues:
    - If the initial timer cancel fails, the publication would interfer with
      the periodic publication management, which might skip an event or
      send too many packets.
    - If any of the messages fail to publish, the full publication event
      would be abandoned. This is not predictable or expected from the API.
    - bt_mesh_model_pub() required 384 bytes of stack to build the message,
      which has to be factored into all calling threads.
    
    This patch moves all transmission into the publication timer by
    replacing k_work_cancel with a single k_work_reschedule(K_NO_WAIT). It
    also changes the error recovery behavior to attempt to finish the full
    publication event even if some of the transmissions fail.
    
    This is port of 820cfc52adc728a727a33a182a2d360af86ecdd9
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    f173ca2 View commit details
    Browse the repository at this point in the history
  17. host/mesh: Transport length checks should account for MIC

    The Transport layer would previously rely on the access layer to check
    whether there's room for the full message and a MIC in the available
    buffer space, and its own checks would ignore the MIC. This should be
    handled by the Transport layer checks, so the access layer doesn't have
    to.
    
    This is port of 5c6df442ff1dcbeaf4115f866a10a91a7f97225f
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    a247839 View commit details
    Browse the repository at this point in the history
  18. host/mesh: Report configured LPNTimeout in cfg_srv

    Changes lpn_timeout_get behavior in the config server to report the
    configured LPN timeout, instead of the currently remaining timeout time.
    According to the Bluetooth Mesh Profile specification, section 4.2.21,
    the PollTimeout list is a list of the PollTimeout timer values, and
    according to table 4.32 in this section, values 1-9 are prohibited.
    Although this is not explicitly stated, this indicates that the
    PollTimeout value is the configured poll timeout time - not the time
    remaining until the timeout value expires. This patch changes the
    implementation to reflect this.
    
    This is port of bf942bdf9abb0d7bed83f6297ccb79d443e85d69
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    92b86e8 View commit details
    Browse the repository at this point in the history
  19. host/mesh: Convert beacon timer to delayable work

    Moves the beacon_enabled check in the beacon work handler to check the
    beacon flag before sending anything, in case a cancel call fails.
    
    This is port of 286d9c22cd96121c2bbef437fee6212e84aacb99
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    a1faca3 View commit details
    Browse the repository at this point in the history
  20. host/mesh: move lpn logic for msg_received inside lpn.c

    The Transport layer implements some checks surrounding the
    lpn_msg_received call, with an accompanying comment that explains the
    logic. Move this inside the msg_received call instead.
    
    This is port of 777718ea6e3e0f59c61f404285bb75960bf3af96
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    f715ad6 View commit details
    Browse the repository at this point in the history
  21. hoat/mesh: Provisioning output count number should be at least 1

    When selecting a random count for blink, beep or vibrate, the Bluetooth
    Mesh Profile Specification v1.0.1, section 5.4.2.4 states: "the device
    shall select a random integer between 0 and 10 to the power of the
    Authentication Size exclusive".
    
    This means that if size is 1, the integer should be in the range 1-9,
    while the implementation chose an integer in the range 0-9. Reduce the
    range and add 1 to the num to correct this for these actions.
    
    This is port of 3656f7f60972dc03aa00071d21028f7b582e7765
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ceefdcb View commit details
    Browse the repository at this point in the history
  22. host/mesh: Add friend_is_allocated utility

    Friend structure allocaction logic is implemented over and over
    throughout the friend module. Move it into a static utility function for
    readability.
    
    This is port of 0f5b5f74acbfefaee23b5172da2c1aa0807553d0
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    6f1e5f2 View commit details
    Browse the repository at this point in the history
  23. host/mesh: Core delayable work updates

    Switch to the new API in friend, net and main.
    
    This is port of 38609d34e09dccd4998f55e97dbfa5bb90dfa635
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    dec5e2c View commit details
    Browse the repository at this point in the history
  24. host/mesh: Mesh: pb_adv: update delayable work

    Switch to the new API. Consolidates reliable sending logic for the first
    transmission and the retransmit into one. Adds check for link active in
    protocol timeout.
    
    This is port of 45e5914ce90bdb424aa16c5e87cbe1a0f16c5b82
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    a5d34c8 View commit details
    Browse the repository at this point in the history
  25. host/mesh: pb_gatt: update delayable work

    Switch to the new API. Adds a link check to the protocol timeout to
    ensure the link is still active.
    
    This is port of 3cba9613a43a7026104ba338666c6b61c41037e7
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ee0dc5e View commit details
    Browse the repository at this point in the history
  26. host/mesh: proxy: update delayable work

    Switch to the new API. Adds check for a pending buffer in the SAR
    timeout handler.
    
    This is port of 1577fec8511d18778e39e0edb952cf468ff0735c
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    3918bd9 View commit details
    Browse the repository at this point in the history
  27. host/mesh: transport: update delayable work

    Switch to the new API. Adds early exits for the ack and retransmit
    timers, and replaces a remaining_time() + submit() call with schedule().
    
    This is port of 4e6cb116f87bb2ff0ece7d8f968adac4dd2c9b3d
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    5af4b9d View commit details
    Browse the repository at this point in the history
  28. host/mesh: Allow to be NODE when PROVISIONER is enabled

    When PROVISIONER and CDB is enabled then IUT couldn't be a NODE.
    This patch fixes this by not returning an error when CDB is not
    configured. This is useful especially in testing environment, when all
    the features are compiled in and we can choose role in runtime.
    
    This is port of b9c8d270ab642ae18c83aad66ab5e1d962de74d3
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7d0aa8d View commit details
    Browse the repository at this point in the history
  29. host/mesh: Add option to include bt name in scan rsp

    Sometimes it may be needed to know device name when proxy feature is
    enabled.
    
    This commit adds an option to include device name in scan response.
    
    This is port of a335c755a70fd279a221a24fa944ea21d231bad4
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    517f819 View commit details
    Browse the repository at this point in the history
  30. host/mesh: Fix incorrect flag check in mesh settings

    This bug was introduced in PR #31176, where setting's flags were
    moved out from bt_mesh.flags to pending_flags.
    
    This is port of 3ae0f96acb67aafe1e13a545e7a1b86159103733
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    cf8f352 View commit details
    Browse the repository at this point in the history
  31. host/mesh: Add VA flag to generic pending flags

    This adds BT_MESH_SETTINGS_VA_PENDING to GENERIC_PENDING_BITS
    as it should be stored by CONFIG_BT_MESH_STORE_TIMEOUT.
    
    This is port of 22fabefdf2c112d4d5bfe214ddf512bb41ada6e9
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    373a6fb View commit details
    Browse the repository at this point in the history
  32. host/mesh: Change friend_cred decision point to friend selection

    The network layer previously decided to use the friend credentials if
    there was an established friendship. During the friendship setup phase,
    the friendship is not considered established until the LPN receives the
    first friend poll. Before this happens, the LPN should send a friend
    poll message, encrypted with the friendship credentials. This wrongly
    gets encrypted with the master credentials.
    
    Change the decision point to whether the LPN has selected a friend,
    which happens after the friend offer, and before the friend poll. This
    will remain set for the duration of the friendship.
    
    This is port of 878043aff19c1c7468a55fa332fa695fbb6bf154
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    452d1a5 View commit details
    Browse the repository at this point in the history
  33. host/mesh: Pass correct pointer to publish_sent

    This commit fixes a bug where incorrect pointer passed to publish_sent
    in access.c caused bus fault.
    
    This is port of 8717a0f6787421c0adb566a6b20495a34f76f1d5
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    03076b3 View commit details
    Browse the repository at this point in the history
  34. host/mesh: Remove outated RPL entry from persistent storage

    This commit fixes a bug where outdated RPL entries might not be removed
    properly from the persistent storage making those entries dead.
    
    This is port of 1b129c50c2fdb4d7e8a270356dd5fba623deb1cc
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    275ea53 View commit details
    Browse the repository at this point in the history
  35. host/mesh: Don't reset PB ADV reliable timer on retransmit

    The send_reliable function was reused in multiple places as part of the
    k_delayed_work changes for Bluetooth Mesh in #33782. This function
    contains a line that resets the start timer, causing prov_retransmit to
    continously move the goal post for when to give up sending.
    
    Extract this line out of the send_reliable function, and put it along
    with the other link.tx initialization in bearer_ctl_send and
    prov_send_adv.
    
    This is port of 85ad497c39ecf6d12bea31241d774cf300d620c2
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    e9567a6 View commit details
    Browse the repository at this point in the history
  36. host/mesh: Reject identical public keys

    This commit address Erratum E10395 and Errata Correction E16350
    to ensure that public keys exchanged between Provisioner and
    a device aren't identical.
    
    This is port of 33fafe1e2f41e5b61b1dc71f9ad0d8cb0930607f
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    026cbf9 View commit details
    Browse the repository at this point in the history
  37. host/mesh: Add OOB Public Key support for provisionee role

    This commit allows an unprovisioned device to exchange its public key
    using out-of-band techology (see MeshPRFv1.0.1, table 5.19 and section
    5.4.2.3).
    
    For in-band public key exchange, the mesh stack uses HCI commands to
    generate public and private keys, and DH key. This, however, doesn't
    work for OOB public key exchange since there is no command to generate
    DH key with a private key provided by an application. Therefore, this
    commit adds direct usage of TinyCrypto into the mesh stack for DH key
    generation for OOB public key support.
    
    This is port of 0335d5fb0147b70f31a5f05c0d776adfff04ccc4
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    9e4cd9a View commit details
    Browse the repository at this point in the history
  38. host/mesh: Fix setting remote public key in provisioner

    This aligns provisioner and provisionee APIs in terms of endianess
    of public key provided by an application.
    
    This is port of f5ba999257e977688e7eae6a36a554ceed51d95f
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d9413d2 View commit details
    Browse the repository at this point in the history
  39. host/mesh: Add API to manually store pending RPL entries

    The current approach with storing RPL by timeout doesn't solve all
    issues as the node may loss power before the timer is fired.
    In addition to that this may wear out flash quickly if short timeout is
    used.
    
    This change adds an API to store the pending RPL entry upon user
    request. Additional Kconfig option allows to completely disable timer
    so that the whole storing relies on the user.
    
    The mesh stack still stays responsible for outdating RPL entries in case
    of IV Index update as this happens implicitly for the user.
    
    This is port of 65f798a00abb6bbb7c51091e754b926d15405d14
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    23217d8 View commit details
    Browse the repository at this point in the history
  40. host/mesh: Add proxy send callback

    Zephyr Bluetooth Mesh did not check whether the proxy message
    was actually sent out, so that the response message could
    not be received during reset.
    
    This is port of 7531d2e3c8ffa73c9e1d1fcf33d2b26991ea5f8c
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    9dc019d View commit details
    Browse the repository at this point in the history
  41. host/mesh: Increase default CDB node count

    The old default of 1 makes provisioner devices useless, as they can only
    provision themselves before they run out of space.
    
    This is port of f2579cb3f26bde3050306401de9cd2837c94024f
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    e8a42b4 View commit details
    Browse the repository at this point in the history
  42. host/mesh: sequence number limit config

    Set sequence number limit by Kconfig
    
    This is port of f6d7f8f36fffdf2b311252eee54f765d854a51b7
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    e0f018c View commit details
    Browse the repository at this point in the history
  43. host/mesh: Fix missing proxy send status

    Add an error judgment during `proxy_send` to avoid
    missing `net_buf_unref`.
    
    This is port of c45ec6fc0da1d5c183d9b2628ef2fdab60b0c978
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    53d610b View commit details
    Browse the repository at this point in the history
  44. host/mesh: comp pointer check

    comp data pointer check before using
    
    This is port of d466a807ee20670e90169eb2ad36996210277893
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    c3a4b94 View commit details
    Browse the repository at this point in the history
  45. host/mesh: Update SNB beacon before sending it

    Authentication value must be recalculated before sending it.
    
    This is port of 5513b86864e3ccd3de710724308e46abbcaa44af
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    4b0e349 View commit details
    Browse the repository at this point in the history
  46. host/mesh: Fix regression in PB-ADV

    After #35702, the provisioner is unable to mark a link as closed, as
    it depends on the send_end callback to be called, so it can start its
    timer. PB-Adv keeps a reference to the buffers of reliable messages,
    which prevents this callback to be invoked, as the buffer destructor is
    never called.
    
    Move scheduling of the retransmit timer to the initial transmission, and
    replace the timer based LINK_CLOSE message tx duration with a message
    counting solution.
    
    This is port of 534177b2ca02f52ad04d8da08167a3e847242de7
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7baecc0 View commit details
    Browse the repository at this point in the history
  47. host/mesh: Check the CID field before opcode compare

    Bluetooth Mesh Vendor model hava company id field.
    
    Accordin MeshPRFV1.0.1 3.7.3.1 Operation codes.
    
    The 3-octet opcodes are used for manufacturer-specific opcodes.
    The company identifiers are 16-bit values defined by the
    Bluetooth SIG and are coded into the second and third octets of
    the 3-octet opcodes.
    
    Therefore, we can speed up the search process by checking whether
    CID fields match, rather than comparing opcodes one by one.
    
    This is port of cc0abee3db739413f2498d465386ab5a8bf7c1eb
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    2dad0b9 View commit details
    Browse the repository at this point in the history
  48. host/mesh: Restore default device configuration on reset

    This commit fixes an issue where bt_mesh_reset() call just erases all
    mesh flags set at the initialization instead of restoring them and
    thus disabling some features until the board reboot.
    
    This is port of 6c9411656c3a282155f9b9f780da95b2767649bb
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    de8d513 View commit details
    Browse the repository at this point in the history
  49. host/mesh: Modularizing the proxy

    The Bluetooth proxy feature includes proxy client
    and proxy server. In addition to the proxy pdu
    message used above, pb-gatt also uses the same
    proxy pdu message.
    
    Currently zephyr bluetooth mesh couples them in one file.
    
    A file at the separation is called gatt_services.c,
    which is used to contain Mesh Provisioning Service
    and Mesh Proxy Service.
    Another file in the separation is called proxy_msg.c,
    which is used to process Proxy pdu messages.
    
    Also according to Trond's suggestion:
    
    Rename `CONFIG_BT_MESH_PROXY` to `CONFIG_BT_MESH_GATT`.
    Create an additional promptless entry
    `CONFIG_BT_MESH_GATT_SERVER` that selects
    `CONFIG_BT_MESH_GATT` and is selected by
    `CONFIG_BT_MESH_GATT_PROXY` or `CONFIG_BT_MESH_PB_GATT`.
    
    Create additional `CONFIG_BT_MESH_PROXY` used to represent
    proxy feature (also include proxy client).
    
    This is port of 3a559e972a415449cb577a35aed3e0514bba77df,
    7b2e51881c8eab839b4a8f1e914a7accb6fe1598 and
    3d2ad8e653b533d83ebf31b672d52922bca2d481
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    115e911 View commit details
    Browse the repository at this point in the history
  50. host/mesh: Add return value for opcode callback

    ```
    3.7.3.4 Message error procedure
    When receiving a message that is not understood by an element, it shall
    ignore the message.
    Note: A message can be falsely identified as a valid message, passing
    the NetMIC and TransMIC authentication using a known network key and
    application key even though that message was sent using different keys.
    The decryption of that message using the wrong keys would result in a
    message that is not understood by the element. The probability of such a
    situation occurring is small but not insignificant.
    A message that is not understood includes messages that have one or more
    of the following conditions:
    • The application opcode is unknown by the receiving element.
    • The access message size for the application opcode is incorrect.
    • The application parameters contain values that are currently
    Prohibited.
    Note: An element that sends an acknowledged message that is not
    understood by a peer node will not receive any response message.
    ```
    
    This is port of b9422ea9f3f937e2d95b72ba993b9dbae901916d
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    610fbc4 View commit details
    Browse the repository at this point in the history
  51. host/mesh: Add msg length check for Cfg and Health models

    According to spec we should ignore messages with incorrect msg size.
    This patch adds a check to every opcode handler.
    
    This is port of ca53e86f67c5bf0e21ec5ed6701f1a1801d8766a
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d278a2d View commit details
    Browse the repository at this point in the history
  52. host/mesh: Provisioning PDU length defines

    Adds length defines for all provisioning PDUs and uses them to split
    prov_link.conf_inputs into separate fields.
    
    This is port of abcbfed6c3ef857626724674cd524ed58da9ef5b
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    1aedcf1 View commit details
    Browse the repository at this point in the history
  53. host/mesh: Update advertising duration calculation

    Zephyr Bluetooth Low Energy Controller for mesh stack
    uses pre-emptible continuous scanning, allowing advertising
    events to be transmitted without delay when advertising is
    enabled. No need to compensate with scan window duration.
    
    Zephyr Bluetooth Low Energy Controller built for nRF51x
    SoCs use CONFIG_BT_CTLR_LOW_LAT=y, and continuous scanning
    cannot be pre-empted, hence, scanning will block advertising
    events from being transmitted. Increase the advertising
    duration by the amount of scan window duration to compensate
    for the blocked advertising events.
    
    This is port of 52db419e7a35b18b054182efe0671c90fef5cad3
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    db0bd74 View commit details
    Browse the repository at this point in the history
  54. host/mesh: Provisioning Start Fix

    Resolves provisioning start process
    
    This is port of 6b67a568c9ee2d0cc6da7d7e518ebf2933c57077
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    1828e5c View commit details
    Browse the repository at this point in the history
  55. host/mesh: Added support for application access to mesh messages

    Added bt_mesh_msg_send() which can be used by the application to
    directly send model layer messages without local instantiation of
    related models. Also added bt_mesh_msg_cb_set() which allows the
    application to recieve mesh model layer messages without local
    instantiation of related models.
    
    Added bt_mesh_has_addr() which returns a bool. For unicast addresses,
    this returns whether or not bt_mesh_elem_find() was successfull. If the
    above mentioned bt_mesh_msg_cb_set() has been used by the application to
    set a message callback, this returns true so that the stack attempts to
    push every model message up to the application via the callback. If no
    callback has been set, group addresses are searched to see if the stack
    should pass the message up the stack to an instantiated model.
    
    These changes allow applications that do not or can not instantiate
    models to interface with models in a mesh network. This is applicable to
    applications which act as a Bluetooth mesh gateway, sniffer, debugger,
    network monitoring, non-mesh relay/extender, etc.
    
    In app_keys.c friend.c net.c bt_mesh_elem_find() is used only to
    determine the existance of an address. The full return value of
    bt_mesh_elem_find() is unecessary and so was replaced by the above
    mentioned bt_mesh_has_addr() function in these instances.
    
    Simplified bt_mesh_elem_find() by removing the search through group
    address. Since the above mentioned bt_mesh_has_addr() function handles
    instances where group addresses must be searched, it was no longer
    necessary to preform this search in this function.
    
    This is port of 7a2b248b9804cc59a62b3b7dcdf00f9475ef64e1
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7b0d313 View commit details
    Browse the repository at this point in the history
  56. host/mesh: Add missing Configuration Client API

    Add missing API:
    - Delete all group addresses in a SIG model's subscription list
    - Update a network key
    - Update an application key
    - Get/Set Node Identity parameters
    - Set virtual addtess for a SIG model
    - Get/Set Key Refresh Procedures
    
    This is port of 22aafd422cea80ba2426b8be7cb59806278ebdd9
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    94a7213 View commit details
    Browse the repository at this point in the history
  57. host/mesh: Fix Health Client Model

    Assigning a value to the msg_timeout parameter.
    
    This is port of a279ff3958aca2d2d665710d0b4f35a1cc8417b3
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    842153b View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    1939344 View commit details
    Browse the repository at this point in the history
  59. host/mesh: Add pointer conversion for prov->uri

    `prov_sd[0].data` and `prov->uri` have different point type.
    
    This is port of 9042f76b8b8abd349ada9daf7cfd3272491055db
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    623c14d View commit details
    Browse the repository at this point in the history
  60. host/mesh: Refactor Mesh Model Extensions

    The existing extension tree does not support all the features that are
    defined by the specification (e.g. multiple parents).
    
    This patch approaches this problem by defining a circular single-linked
    list of extension models. So for a given model, all models that are on
    the same list as that model are in some extension relationship with that
    model. All models on a list represent a single connected component of an
    extension graph but without defining specific relationships between each
    pair of models. This list is used to manage a shared subscription list
    as per the Mesh Profile Specification:
    
    ```4.2.4 Subscription List
    
    Within an element, each model has a separate instance of a Subscription
    List, unless the model extends another model on that element. Instances
    of models that extend other models (i.e., all models within an extension
    relation tree) shall share a single instance of a Subscription List per
    element.
    ```
    
    This is port of e167ca653907ff0979e38636009913bce8cd7374
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    df601cf View commit details
    Browse the repository at this point in the history
  61. host/mesh: Mark as internal function

    Marks funcs:`show_faults` as internal, avoiding conflict.
    
    This is port of 3911ce8d40be50649a77465b641de28119219b7e
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    c7ce0ff View commit details
    Browse the repository at this point in the history
  62. host/mesh: Add defines for ECC key lengths

    Adds defines for ECC public keys, private keys, DH keys and key
    coordinates. Replaces raw numbers throughout.
    
    This is port of 8ab219cde5a2d7a87e8d7704a92ffa838cd7473a
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    28a82ad View commit details
    Browse the repository at this point in the history
  63. host/mesh: Fixes Same appkey add to multi netkey

    The latest MESH.TS 1.0.1.2 4.15.10 Appkey List Procedures
    MESH/NODE/CFG/AKL/BI-04-C
    
    Verify that the IUT can respond to an Config AppKey Add
    message with NetKeyIndex and AppKeyIndex already stored.
    
    6. Repeat step 1 with the same AppKey, the same
    AppKeyIndex, but NetKeyIndex field set to 0x001.
    
    7. The Lower Tester expects the IUT to respond
    with an Config AppKey Status message with the
    Status field set to 0x04 (Invalid NetKey) and
    the NetKeyIndex and AppKeyIndex values equal to
    those sent in step 5.
    
    This is port of 6bf35fa7491f3240e7097dc735392cb12df4bf7c
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    00a5f55 View commit details
    Browse the repository at this point in the history
  64. host/mesh: Clarify name length in bt_mesh_model_data_store

    Name length can't be longer than 8 bytes. This needs to be clarified
    in the bt_mesh_model_data_store() documentation.
    
    This is port of 538f97f73711c73f8a6e6478d461978e3cf2c295
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    f4dfb41 View commit details
    Browse the repository at this point in the history
  65. host/mesh: Add API to discard subscription in vendor model

    This commit adds missing API that allows to discard the Subscription
    List of a vendor model.
    
    This is port of 0e9d66897062b0de41a0522b5a836e2ec5b008bc
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    a88ee92 View commit details
    Browse the repository at this point in the history
  66. host/mesh: Fix IVU duration counter update

    When device is first provisioned with IV Update
    flag is set to 0, it should wait for minimum of
    96 hours before going into IV Update In Progress
    state. Such limit does not apply, if device is
    provisioned with IV Update flag is set to 1.
    
    This is port of f868ca3497227c290a8bfea1c64130eb26dcb287
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    1942a4e View commit details
    Browse the repository at this point in the history
  67. host/mesh: Use separate net_bufs for bt_mesh_app_decrypt in friend

    unseg_app_sdu_decrypt decrypts messages in place using a single net_buf.
    While this is safe in terms of data access, the buffer state is
    manipulated with the assumption that they're two different buffers, and
    the output buffer's length field is increased at the end. When
    assertions are enabled and the pdu length is 11 or 12 bytes, this
    triggers the net_buf length assert, as the decrypt function attempts to
    add the pdu length to the out buffer, with the assumption that it was
    reset before decryption was started.
    
    Create a separate output buffer with len = 0 to avoid triggering the
    assert. Improve readability of the unseg_app_sdu functions to highlight
    the need for the additional buffer.
    
    This is port of 69fcaaa5927e475e5749bf4a1e035ad18de0f796
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    83e1654 View commit details
    Browse the repository at this point in the history
  68. host/mesh: Verify that all stored mesh entries removed

    This ensures that all mesh settings were removed from persistent storage
    after node reset.
    
    This is port of cd294c12c3ea604cc706c22414f798a7eafac859
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    344e1c2 View commit details
    Browse the repository at this point in the history
  69. host/mesh: Remove krp param check

    param can never be NULL, so this check is redundant. Coverity complains
    about this, as the param variable is accessed before the check, which
    would be wrong if param could be NULL.
    
    This is port of fd6f51c4104e02f16c23ca1eee3ab747ab7143ef
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    0904bcb View commit details
    Browse the repository at this point in the history
  70. host/mesh: Remove lpn timeout param check

    param can never be NULL here, so the check is redundant. Coverity is
    complaining because param is accessed before the NULL check.
    
    This is port of 4eb047d1afdbb159527b821552be6d79e84fb1e4
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7f54ce9 View commit details
    Browse the repository at this point in the history
  71. host/mesh: Initialize UUID in shell's mod_pub_set

    PR #35774 introduced a uuid field in the bt_mesh_cfg_mod_pub structure.
    The shell does not initialize this pointer before passing it to the
    access layer. Add a line to initialize this pointer.
    
    This is port of c5757ca4a104c8207cfa6244c4a128cef2bda9b5
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    fea8bf0 View commit details
    Browse the repository at this point in the history
  72. host/mesh: Fail provisioning when RFU values are used

    When Public Key field is set to RFU value then we should send
    Provisioning Fail with Invalid Format error.
    
    This is port of f51cf9ab869b194f040435fa171f0e9b4f33de98
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    6b22633 View commit details
    Browse the repository at this point in the history
  73. host/mesh: Fix friend buf send end not called.

    As frnd->last will keep reference, so that net buffer
    destructor function will not be call.
    
    This is port of ecc7ca1b698bd2d3b7f043c945980b909cc3e4a7
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    3d2eb26 View commit details
    Browse the repository at this point in the history
  74. host/mesh: Check if app key is bound in Model Publication Set

    Th Configuration Server should respond with and Invalid AppKey Index
    status code when the AppKey identified by AppKeyIndex is not known to
    the node or is not bound to the model identified by the ModelIdentifier.
    
    This is port of 343c0bd2d38e70bb627f5dff3db8a37360f112f9
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    c3ec612 View commit details
    Browse the repository at this point in the history
  75. host/mesh: Verify if Remote confirmation is not identical

    MESH/PVNR/PROV/BI-18-C verifies that the IUT rejects invalid
    Confirmation Value.
    
    This is port of 88b60f31c74aa2a35d4869bc4ec463c52fc1f451
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    0d6e6c4 View commit details
    Browse the repository at this point in the history
  76. host/mesh: Inclusive terminology

    Implements the Bluetooth appropriate language mapping for the Bluetooth
    mesh subsystem.
    
    Changes the following terms:
    
    - Master security credentials -> Flooding security credentials
    - Whitelist filter -> Accept filter
    - Blacklist filter -> Reject filter
    - Removes CDB's NODE_BLACKLISTED, which was not in use.
    
    This is port of 035d877967cbaa43d8d8d73344450a1a9ed5d1f8
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    c1b087a View commit details
    Browse the repository at this point in the history
  77. host/mesh: Return ETIMEDOUT if k_sem_take call times out

    EAGAIN is used in some other places in the code, e.g. if node is not
    provisioned when a model tries to send a message. This change helps to
    differentiated if the acknowledged message timed out from other failers.
    
    This is port of e40998a4e48bd792843043bbcfa7849c9ce78358
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    15c0ff0 View commit details
    Browse the repository at this point in the history
  78. host/mesh: Refactoring provisioning to make all OOB auth working

    The current implementation has hidden dependencies that break
    OOB authentication if provisioner does not have the configured
    input or output fields used for device capabilities.
    It didn't allow to pass several OOB authentication cases.
    After refactoring provisioner behavior is independent to
    provisionee settings.
    
    This is port of 6f2516d9a7bdb4537d044f7776e524b3e95101d0
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    58c2a94 View commit details
    Browse the repository at this point in the history
  79. host/mesh: Delete bt_mesh_proxy_prov_disable parameter.

    we will no longer need the additional `disconnect` parameter,
    such as we only process gatt database from disconnect handler.
    
    This is port of 412e7da951db24768a17c46c51661714bfc17d00
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    16450e8 View commit details
    Browse the repository at this point in the history
  80. host/mesh: Extended advertising support

    Adds support for extended advertiser commands in the mesh. This doubles
    throughput for common packet sending, and significantly improves timing
    accuracy for the Friend and Low Power features.
    
    The proxy module's advertisement control has been moved inside the adv
    module to abstract away the different advertiser modes.
    
    The extended advertiser mode does not need an advertising thread to
    operate, and ends up with a net reduction in RAM usage.
    
    This is port of 81bf99145ab712997d4b8db6ba37538f9de3bc46
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    2d7536e View commit details
    Browse the repository at this point in the history
  81. host/mesh: Reconstructing adv callback logic

    The adv callback logic is reconstructed to coexist
    with proxy send callback.
    
    This is port of a63f2d8d608a249967975628aeaba23684a5aed7
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    efafc21 View commit details
    Browse the repository at this point in the history
  82. host/mesh: Split gatt services to pb-gatt and proxy

    Split gatt services to pb-gatt-srv and proxy-srv.
    
    This is port of b2889903a3afb65bf88e82637452c14c59661a83 and
    c057a69a2c7bdbb9b2162d8f041411d13c238b37
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    2f5ce02 View commit details
    Browse the repository at this point in the history
  83. host/mesh: Remove unnecessary prov buf get function

    Remove `bt_mesh_pb_gatt_get_buf`.
    
    This is port of a88aac2a7f107d89bd5727b01d21febfb20cc13f
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    6c5fd1c View commit details
    Browse the repository at this point in the history
  84. host/mesh: Move command buffer to proxy_msg.c

    Move command buffer alloc to proxy_msg.c.
    
    This is port of d831d8a7d3637e330a0dc28c6787e242b75c4f0f
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    29d5a85 View commit details
    Browse the repository at this point in the history
  85. host/mesh: Move proxy complete message to seperate role

    Move proxy complete message to seperate role.
    
    This is port of bc1d6580dc00bb09a8460f55460cf6c0bddb519d
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    6048746 View commit details
    Browse the repository at this point in the history
  86. host/mesh: Move bt_mesh_proxy_role to proxy_msg.c

    Mesh bt_mesh_proxy_role structure to proxy_msg.c
    
    This is port of 22b234cf03f1139a431b0b1c9a820fe8c9d75e82
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    a162826 View commit details
    Browse the repository at this point in the history
  87. host/mesh: Reflect disconnect logic to separate roles

    remove section ordering to use code more readable.
    
    This is port of 3f68692069be9253796822a98dd328d76925a234
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    66e6dfd View commit details
    Browse the repository at this point in the history
  88. host/mesh: Add seperate config for pb-gatt dev name

    Add seperate config to control whether device name include in
    pb-gatt advertising scan response data.
    
    This is port of 355b18c43e8962190515e61efd770921ed3a7074
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ff2abc0 View commit details
    Browse the repository at this point in the history
  89. host/mesh: Use common buf size for all conn

    Use common buffer size for all bluetooth mesh connection.
    
    This is port of 4fcf5496071fad53e43cd756c65b812a1421840b
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    4dc1b67 View commit details
    Browse the repository at this point in the history
  90. host/mesh: Move proxy message size to kconfig

    Add `BT_MESH_PROXY_MSG_LEN` to config proxy message length
    
    This is port of 5ddbdcedd0046d4f3d541667579c029afd8d01a9
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    ed2e5ae View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    804a664 View commit details
    Browse the repository at this point in the history
  92. host/mesh: logging public key in big endian

    Local public key has been logged in little endian but
    remote public key in big endian. That has been changed.
    Both are logged in big endian to be able to compare in logs.
    
    This is port of 797c17436bd071e71fdc58584e6741d9d5ebb332
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    2745cf4 View commit details
    Browse the repository at this point in the history
  93. host/mesh: Missed IV update cannot be captured

    It seems that if the IV update is missed, a node cannot
    recover it until the IV index has increased to a value
    greater than Node's Last known IV + 1.
    
    This is port of c1e053c9b3789b613771b68ba521b1b2585517c6
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    267eed3 View commit details
    Browse the repository at this point in the history
  94. host/mesh: Fix crash on disconnect

    bt_mesh_proxy_role_setup() is called conditionally when peer is
    connected and gatt_disconnected() is always called. This leads
    to unbalance in role->conn reference count and crash.
    
    Instead of hot-fixing this in gatt_disconnected(), this commit adds
    proper bt_mesh_proxy_role_cleanup() API that is called by roles
    implementations if cleanup is needed.
    
    This is port of 088fac76ed65a6cb8c367a89fae53d0e4bea2763
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    f757df8 View commit details
    Browse the repository at this point in the history
  95. host/mesh: Model extensions walk stops before last model

    When reaching the last model in the circular extension linked list, the
    walker would abandon the walk before checking the last model. This makes
    us skip models when checking the subscription list, potentially causing
    incoming messages to be wrongfully ignored.
    
    This is port of cd89f4239368b106fbfab9555cf445fbc00203a2
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    6617c29 View commit details
    Browse the repository at this point in the history
  96. host/mesh: post-sync fixes

    This resolves some build errors introduced after sync with Zephyr.
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    82ccdbc View commit details
    Browse the repository at this point in the history
  97. apps/blemesh: fix build after introducing return codes in models

    This applies to both blemesh, blemesh_models_example_1 and
    blemesh_models_example_2
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    489bb3a View commit details
    Browse the repository at this point in the history
  98. host/mesh: add preprocessor directives for persistent storage

    After `settings` module was split among others it's necessary to
    compile methods depending on peristent storage only when it's
    enabled.
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    039e3ca View commit details
    Browse the repository at this point in the history
  99. host/mesh: define Low Latency mode for non-NimBLE controller

    This fixes build for porting
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    04d723e View commit details
    Browse the repository at this point in the history
  100. porting/blemesh: add missing defs

    Added defs included in Mesh sync
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7914dbd View commit details
    Browse the repository at this point in the history
  101. Configuration menu
    Copy the full SHA
    6f6fc99 View commit details
    Browse the repository at this point in the history
  102. host/mesh: fix mesh advertising thread

    Cleans up `bt_mesh_adv_queue` after sync
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    5b71db8 View commit details
    Browse the repository at this point in the history
  103. host/mesh: fix mesh_adv_thread

    Solved issues with adv_timeout.
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    649fad1 View commit details
    Browse the repository at this point in the history
  104. host/mesh: fix Extended Adv for mesh

    Fixes build and advertising.
    KKopyscinski committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d22137b View commit details
    Browse the repository at this point in the history
  105. Configuration menu
    Copy the full SHA
    1cc3b1d View commit details
    Browse the repository at this point in the history
  106. Configuration menu
    Copy the full SHA
    40dddfd View commit details
    Browse the repository at this point in the history
  107. Configuration menu
    Copy the full SHA
    5cc57de View commit details
    Browse the repository at this point in the history
  108. Configuration menu
    Copy the full SHA
    b9c20ad View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. targets: Rename pca10095 target

    Target nordic_pca10095-blehci was defined for nordic_pca10095_net bsp.
    Name suggested that nordic_pca10095 is being used.
    
    This just changes target name to avoid confusion.
    kasjer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    3ac5007 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. transport/usb: Drop events when not mounted

    If controller sends events before USB transport is ready
    event will be added to events queue but later interface
    initialization will clear queue without sending notification
    that event was sent to host.
    
    This change drops events generated by controller (most likely first NOP)
    if host is not connected yet.
    kasjer committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    57eb423 View commit details
    Browse the repository at this point in the history
  2. host/l2cap_sig: MPS on any channel cannot be decreased

    If reconfiguration request contains >1 CID and MPS value is reduced for
    only one of them this request should still fail.
    
    This is affecting L2CAP/ECFC/BI-04-C
    KKopyscinski committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    f44ab19 View commit details
    Browse the repository at this point in the history
  3. Revert "l2cap: implement echo request-response procedure"

    This reverts commit ddf8043.
    
    Unfortunatelly this procedure is not allowed on LE transport. This
    is affecting L2CAP/LE/REJ/BI-02-C [Command Reject – Reserved PDU Codes]
    qualification test case.
    sjanc committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    3fe2fd9 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    89ac670 View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Add support for vs hci commands registration

    This adds API to allow registration of custom HCI VS commands.
    andrzej-kaczmarek committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    b8ddf0f View commit details
    Browse the repository at this point in the history
  3. nimble/phy/nrf: Remove workrounds for ifs on LE Coded

    BLE_PHY_CODED_RX_IFS_EXTRA_MARGIN was added with initial implementation
    for LE Coded to workaround problems with some early releases of devices
    that could not keep ifs timing properly. We do not want it anymore, all
    devices should have ifs implemented properly in 2021 already.
    andrzej-kaczmarek committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    51c0f77 View commit details
    Browse the repository at this point in the history
  4. nimble/ll: Fix master SCA in LE Connection Complete Event

    MCA in LE (Enhanced) Connection Complete Event is valid only for
    peripheral role (5.3 V4 Part E 7.7.6.5.1).
    Kaka1234-ai authored and sjanc committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    0ef8d59 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2021

  1. Configuration menu
    Copy the full SHA
    10a7493 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f1d2cbd View commit details
    Browse the repository at this point in the history
  3. nimble/ll: Fix os_cputime comparisons in ll_adv

    Need to use macros, otherwise it won't work as expected...
    andrzej-kaczmarek committed Nov 30, 2021
    Configuration menu
    Copy the full SHA
    8d912e2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    afd677e View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2021

  1. host/mesh: fix bt_mesh_proxy_relay

    client->cli can be NULL - and this should be checked, not connection
    handle.
    KKopyscinski committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    a17ed2a View commit details
    Browse the repository at this point in the history
  2. host/mesh: fix loopback in net

    net_buf structure in Zephyr has field user_data, which was wrongly
    ported as os_mbuf->om_data. To stick with porting net_buf as os_mbuf
    we can base on old Zephyr's implementation, which was changed in commit
    dd09cbc1c455ab1e067b53f46bee7b6d50689bbc. Before it, user_data was part
    of data buffer of net_buf. We can implement this the same way, so
    data_buf is last N octets of os_mbuf->om_data.
    
    Accomodate mbuf allocation and freeing to NimBLE.
    KKopyscinski committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    bc14201 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2021

  1. porting: Allow to build with -Wcast-align

    It is expected that mbuf structures are properly aligned so we
    can just cast to void pointer here and silence warning.
    sjanc committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    6b40986 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. nimble/ll: Fix not validating no-param HCI commands sizes

    If command has no input parameters its size should be verified before
    passing it to handler function.
    sjanc committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    5e94b1b View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Fix typo in ble_ll_read_rf_path_compensation

    ;; are not needed here
    sjanc committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    64b7402 View commit details
    Browse the repository at this point in the history
  3. nimble/transport: Fix ble_ll_hw_error declaration in UART transport

    ble_ll_hw_error() is defined as taking no arguments.
    sjanc committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    96df59e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7a6c647 View commit details
    Browse the repository at this point in the history
  5. nimble/ll: Always send hci_cs for unknown command

    Core 5.3, Vol 4, Part E, 4.5 states that sending hci_cc vs. hci_cs is
    vendor specific so we always send hci_cs for all commands since we
    already do this for LE commands.
    andrzej-kaczmarek committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    3b029a7 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2021

  1. nimble/ll: Add missing scan resume

    Need to always resume scan on rx_pkt_in...
    andrzej-kaczmarek committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    a600943 View commit details
    Browse the repository at this point in the history
  2. nimble/phy/nrf: Move rx_end to disabled event

    This moves handling of PDU RX end from EVENT_END to EVENT_DISABLED.
    This will allow to run our phy on BabbleSim and also seems to simplify
    code a bit.
    
    EVENT_DISABLED happens almost immediately after EVENT_END, so on real
    it happens while ble_phy_isr is being executed and is simply ignored.
    However, on BabbleSim code is executed as if time was paused which
    means that no other event can occur when ble_phy_isr is being executed,
    i.e. it will be called after we return from isr and simulation code can
    trigger subsequent events. If rx_end configures transition to TX and
    thus enables interrupt on EVENT_DISABLED, we will handle that during an
    event that is triggered for RX - basically we handle tx_end before TX
    even started. Using EVENT_DISABLED for both TX and RX resolves this
    issue.
    
    We still use timer capture on EVENT_END for transition timing so this
    has no effect on that calculations, and since EVENT_DISABLED occurs
    just a fraction of microsecond after EVENT_END, execution timings are
    also not affected.
    andrzej-kaczmarek committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    67d30b6 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. host/ble_att_svr: Reset handles index on attributes reset.

    Marceau Fillon authored and sjanc committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    e744a88 View commit details
    Browse the repository at this point in the history
  2. host/l2cap: disconnect peer that sends L2CAP packets with hdr len > mtu

    Rest of the checks disconnects peer if SDU size exceeds MTU, but value
    in header is OK. We should also disconnect if PDU lenght in L2CAP packet
    header exceeds it, regardles of how much data it actually contains, not
    just return error.
    
    This is affecting L2CAP/LE/CFC/BV-26-C and L2CAP/ECFC/BV-33-C
    KKopyscinski committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    1969ca3 View commit details
    Browse the repository at this point in the history
  3. host/l2cap_sig: do not permit duplicated CID in connect response

    If peer sends L2CAP connect response with duplicated DCID connection
    should not be created on that channel and existing channel of this CID
    shall be disconnected.
    
    This is affecting L2CAP/ECFC/BV-29-C
    KKopyscinski committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    de56c3a View commit details
    Browse the repository at this point in the history
  4. apps/bttester: mark L2CAP channel as used in connect

    This will prevent returning same channel every time in
    `get_free_channel()`.
    KKopyscinski committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    d7c1804 View commit details
    Browse the repository at this point in the history
  5. app/bttester: do not send L2CAP disconnection event if error in connect

    There is a little need of sending such event: created connection is
    confirmed connection event; if no such event is received, the connection
    can be considered not established. Disconnected event shall be sent only
    for disconnection.
    
    By removing disconnected_cb call on connect error we avoid calling it
    for not established channel, for example when DCID in connection
    response was a duplicate of already connected one. This would trigger
    the assert `assert(channel != NULL);`.
    KKopyscinski committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    5b63523 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2021

  1. apps: Update transport selection method

    Transport package should not be included directly.
    Instead, nimble/transport should be included and
    BLE_HCI_TRANSPORT syscfg value should specify transport,
    and this will include correct package.
    
    This commit changes nimble/transport/ram to nimble/transport in
    all applications that still have deprecated way of transport
    selection.
    
    Default value of BLE_HCI_TRANSPORT is ram so syscfg.yml for
    targets does not need to be updated.
    kasjer committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    8c6f704 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2021

  1. nimble/ll: Compile out not enabled GAP roles

    This gives some FLASH and RAM savings for applications that use only
    subset of GAP roles. LL features are also tuned depending on selected
    GAP roles.
    
    Examples of FLASH and RAM usage:
    BLE_ROLE_CENTRAL: 1
    BLE_ROLE_PERIPHERAL: 1
    BLE_ROLE_BROADCASTER: 1
    BLE_ROLE_OBSERVER: 1
    56122   19661 @apache-mynewt-nimble_nimble_controller.a
    
    BLE_ROLE_CENTRAL: 0
    BLE_ROLE_PERIPHERAL: 1
    BLE_ROLE_BROADCASTER: 1
    BLE_ROLE_OBSERVER: 1
    51344   19589 @apache-mynewt-nimble_nimble_controller.a
    
    BLE_ROLE_CENTRAL: 0
    BLE_ROLE_PERIPHERAL: 1
    BLE_ROLE_BROADCASTER: 1
    BLE_ROLE_OBSERVER: 0
    35694   15232 @apache-mynewt-nimble_nimble_controller.a
    
    BLE_ROLE_CENTRAL: 1
    BLE_ROLE_PERIPHERAL: 0
    BLE_ROLE_BROADCASTER: 1
    BLE_ROLE_OBSERVER: 1
    53338   19593 @apache-mynewt-nimble_nimble_controller.a
    
    BLE_ROLE_CENTRAL: 1
    BLE_ROLE_PERIPHERAL: 0
    BLE_ROLE_BROADCASTER: 0
    BLE_ROLE_OBSERVER: 1
    42040   12925 @apache-mynewt-nimble_nimble_controller.a
    
    BLE_ROLE_CENTRAL: 0
    BLE_ROLE_PERIPHERAL: 0
    BLE_ROLE_BROADCASTER: 1
    BLE_ROLE_OBSERVER: 1
    34800   12525 @apache-mynewt-nimble_nimble_controller.a
    
    BLE_ROLE_CENTRAL: 0
    BLE_ROLE_PERIPHERAL: 0
    BLE_ROLE_BROADCASTER: 1
    BLE_ROLE_OBSERVER: 0
    19126    8168 @apache-mynewt-nimble_nimble_controller.a
    sjanc committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    d3a1acd View commit details
    Browse the repository at this point in the history
  2. nimble/ll: Set LE supported states based on enabled roles

    This also fix claiming support for concurrent scanning and initiating
    which is not supported by LL yet.
    sjanc committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    f4dd2f3 View commit details
    Browse the repository at this point in the history
  3. nimble: Allow to configure BLE version 5.3

    Core Specification 5.3 is available for some time already.
    sjanc committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    ee6ba61 View commit details
    Browse the repository at this point in the history
  4. ports: Build NimBLE with 32-bit environment

    Some code in NimBLE assumes that pointers are 4 bytes. Until this
    is properly fixed build with -m32 to make sure resulting binary
    is no misbehaving.
    sjanc committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    f771348 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2021

  1. nimble/ports: Use native BSP for test targets

    Dummy BSP could be getting out of sync with Mynewt BSP leading to
    compile errors.
    sjanc committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    605ade1 View commit details
    Browse the repository at this point in the history
  2. nimble/mesh: Fix bt_mesh_beacon_auth declaration

    net_id is 8 bytes long.
    sjanc committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    4a008c8 View commit details
    Browse the repository at this point in the history
  3. nimble/mesh: Fix bt_mesh_keys_resolve declaration

    app_key is expected to be a pointer to pointer and not
    artay of pointers.
    sjanc committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    c79a7ab View commit details
    Browse the repository at this point in the history
  4. nimble/mesh: Fix garbage in debug log

    meta was used uninitialed in this log.
    sjanc committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    a724f0b View commit details
    Browse the repository at this point in the history
  5. nimble/transport: Fix unused variable in socket transport

    btaddr is not used anywhere in ble_hci_sock_cmdevt_tx function.
    sjanc committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    984566d View commit details
    Browse the repository at this point in the history
  6. nimble/ports: Refresh syscfg

    sjanc committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    3a6ab21 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. nimble/ll: Fix rx in advertising state

    This typo caused advertising to break on 1st received req PDU...
    andrzej-kaczmarek committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    52d47ad View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2022

  1. host/gap: improve API for legacy adv for EXT_ADV:=1

    The possible combination of options when setting legacy_pdu:=1
    in `struct ble_gap_ext_adv_params` was not obvious to API users.
    This commit improves the API by i) adding accoring documentation
    and ii) adding a validity check into ble_gap_ext_adv_params_tx().
    haukepetersen committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    0741f19 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. nimble/include: fixed vendor command description

    Proper OGF for vendor specific cmd: 0x3F
    jrotkiewicz authored and sjanc committed Jan 14, 2022
    Configuration menu
    Copy the full SHA
    f83627a View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. nimble/phy/nrf: Add support for reading Ublox BMD-345 public address

    The BMD-345 modules are preprogrammed from the factory with a unique
    public Bluetooth device address stored in the CUSTOMER[0] and
    CUSTOMER[1] registers of the User Information Configuration Registers
    (UICR).
    sjanc committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    7e368a9 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. apps/btshell: fix build on 'native' bsp

    strl* methods are not always available, let's use snprintf()
    for string copy/concat actions in parse_dev_addr, as it allows
    us to keep buffer overflow control and NULL termination of string.
    KKopyscinski committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    5678556 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c33c87b View commit details
    Browse the repository at this point in the history
  3. apps: remove use of deprecated BLE_PUBLIC_DEV_ADDR

    ble_hs_id_copy_addr() is used whenever deprecated value was used
    for getting public address.
    kasjer committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    75c1ef3 View commit details
    Browse the repository at this point in the history
  4. apps: Remove controller direct dependency

    Direct dependency on controller is incorrect when
    controller runs on another core.
    kasjer committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    c13d0b4 View commit details
    Browse the repository at this point in the history
  5. nimble/ll: Add support for PA/LNA

    This adds some definitions for PA/LNA support. The actual support is
    implemented in phy and front-end driver.
    andrzej-kaczmarek committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    05538bc View commit details
    Browse the repository at this point in the history
  6. nimble/phy/nrf: Add support for PA/LNA on nRF52xxx

    This adds support for PA/LNA on nRF52 phy.
    
    PA/LNA is controlled using PPI CH6 (enable) and CH7 (disable). At the
    moment no separate timestamp is used to enable PA/LNA in advance, it's
    simply enabled just after ramp-up. This should be fine for front-end
    modules with short switch on time like SKY66112 (<800ns).
    andrzej-kaczmarek committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    9ef7145 View commit details
    Browse the repository at this point in the history
  7. nimble/plna: Add driver for SKY66112

    This adds support for SKY66112 front-end module (PA/LNA).
    
    CTX and CRX signals are controller by phy and shall be configured using
    LL syscfg settings for PA/LNA. Other signals can be configured via GPIO
    or simply driven externally to spare GPIO pins. It's possible to use PA
    or LNA only, in such case CPS signal has to be driven via GPIO.
    andrzej-kaczmarek committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    854f362 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    984e879 View commit details
    Browse the repository at this point in the history
  9. nimble/ll: Add VS command for setting transmit power

    This command allows to override TX power configured with
    BLE_LL_TX_PWR_DBM syscfg value. If 0xff is provided BLE_LL_TX_PWR_DBM
    TX power is restored.
    sjanc committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    ff51d48 View commit details
    Browse the repository at this point in the history
  10. nimble/ll: Adjust start time of the first anchor point of connection

    Set the start_time of the first anchor point of new connection to
    entry->end_time+1.
    
    For the 32768 Hz crystal in nrf chip, 1 tick is 30.517us.
    The connection state machine use anchor point to store the cpu
    ticks and anchor_point_usec to store the remainder. Therefore,
    to compensate the inaccuracy of the crystal, the ticks of
    anchor_point will be add with 1 once the value of
    anchor_point_usec exceed 31. If two connections have same
    connection interval, the time difference between the two start
    of schedule item will decreased 1, which lead to an overlap.
    To prevent this from happenning, we set the start_time of sch
    to 1 cpu tick after the end_time of entry.
    sada45 authored and sjanc committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    35a5603 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. host/mesh: make bt_le_adv_start match Zephyr API

    During sync `duration` argument was introduced, which is not intended
    to be in `bt_le_adv_start` - duration of advertising is managed by
    events in bt_mesh_adv_queue.
    KKopyscinski committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    63edf82 View commit details
    Browse the repository at this point in the history
  2. host/mesh: fix handling of bt_mesh_adv_queue in mesh_adv_thread

    `ble_npl_eventq_get` is waiting for events for duration in tick
    units, not ms. This means that we're waiting OS_TICKS_PER_SEC times
    to long and catch events that are meant to be missed.
    KKopyscinski committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    43a7439 View commit details
    Browse the repository at this point in the history
  3. host/ble_gattc: Cancel prepered writes if data doesn't match in response

    If data received in ble_gattc_write_long_rx_prep() doesn't match
    data sent in prepare write request we need not only return error in
    function, but also send ATT_Execute_Write_Response with flag set to
    BLE_ATT_EXEC_WRITE_F_CANCEL.
    
    This is affecting GATT/CL/GAW/BI-32-C
    KKopyscinski committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    30370ff View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2022

  1. transport: Add bridge transport

    blehci application is for controller only build with external
    interface. In case of dual-core MCUs (NRF5340, DA1469x) controller
    runs on second core that may not be able to operate on external
    interface. To be able to run blehci like application on dual-core
    systems, application side has to route traffic from external interface
    transport to internal transport.
    So far only one transport package was used, for bridge configuration
    application must include two transport packages.
    To facilitate this:
    - transport package has BLE_HCI_BRIDGE that is set to 1 for dual-core
      bridge configuration
    - common syscfg values defined for in all transports are moved
      to transport package (BLE_HCI_EVT_HI_BUF_COUNT..)
    - syscfg definitions present in all transport packages are converted to
      syscfg values
    - DA1469x and NRF5340 transports in bridge configuration will NOT create
      buffers for commands and events they relay on external transport provided
      buffers
    kasjer committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    403ae02 View commit details
    Browse the repository at this point in the history
  2. apps: Add blehcibridge application

    This application is equivalent of blehci for dual-core MCUs.
    It allows to forward traffic from external transport (USB/UART)
    to BLE core via internal transport.
    kasjer committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    11b8107 View commit details
    Browse the repository at this point in the history
  3. apps: Update transport selection method

    Transport package should not be included directly.
    Instead, nimble/transport should be included and
    BLE_HCI_TRANSPORT syscfv value should specify transport,
    and this will include correct package.
    
    This commit changes nimble/transport/ram to nimble/transport in
    all applications that still have deprecated way of transport
    selection.
    kasjer committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    4386bb4 View commit details
    Browse the repository at this point in the history
  4. transport: Bridge build workaround

    Function ble_ll_data_buffer_overflow() and ble_ll_hw_error() are executed
    from host code, but those are controller functions. They would only work
    when host and controller runs on same CPU.
    In bridge build when controller code can't be executed this way two transports
    (nrf5340/dialog_cmac) provide those functions so UART can be used in bridge
    configuration.
    This is just workaround till functions are implemented or other way of signaling
    those errors is established.
    kasjer committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    390744d View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2022

  1. nimble/host: Support database hash

    Supports database hash characteristic.
    Computes database hash and stores it on first pairing with device.
    Computes current hash and compares it with stored hash on reconnection.
    
    See BLE Core spec 5.2 section 7.2
    Marceau Fillon committed Jan 21, 2022
    Configuration menu
    Copy the full SHA
    c1d153d View commit details
    Browse the repository at this point in the history