Home
last modified time | relevance | path

Searched full:lpn (Results 1 – 13 of 13) sorted by relevance

/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/src/
H A Dlpn.c27 #include "lpn.h"
47 #define REQ_RETRY_DURATION(lpn) (4 * (LPN_RECV_DELAY + (lpn)->adv_duration + \ argument
48 (lpn)->recv_win + POLL_RETRY_TIMEOUT))
51 #define POLL_TIMEOUT_MAX(lpn) ((MYNEWT_VAL(BLE_MESH_LPN_POLL_TIMEOUT) * 100) - \ argument
52 REQ_RETRY_DURATION(lpn))
53 #define REQ_ATTEMPTS(lpn) (POLL_TIMEOUT_MAX(lpn) < K_SECONDS(3) ? 2 : 4) argument
100 BT_DBG("%s -> %s", state2str(bt_mesh.lpn.state), state2str(state)); in lpn_set_state()
102 bt_mesh.lpn.state = state; in lpn_set_state()
110 for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { in group_zero()
123 for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { in group_set()
[all …]
H A Dfriend.c47 /* PDUs from Friend to the LPN should only be transmitted once with the
89 BT_WARN("Discarding buffer %p for LPN 0x%04x", buf, frnd->lpn); in discard_buffer()
136 if (frnd->lpn == lpn_addr) { in bt_mesh_friend_find()
162 BT_DBG("LPN 0x%04x", frnd->lpn); in friend_clear()
166 friend_cred_del(frnd->net_idx, frnd->lpn); in friend_clear()
258 BT_DBG("LPN addr 0x%04x counter 0x%04x", lpn_addr, lpn_counter); in bt_mesh_friend_clear()
262 BT_WARN("No matching LPN addr 0x%04x", lpn_addr); in bt_mesh_friend_clear()
273 BT_WARN("LPN Counter out of range (old %u new %u)", in bt_mesh_friend_clear()
337 if (friend_cred_get(sub, frnd->lpn, &nid, &enc, &priv)) { in create_friend_pdu()
386 BT_DBG("LPN 0x%04x", frnd->lpn); in encode_friend_ctl()
[all …]
H A Dnet.h96 u16_t lpn; member
142 BT_MESH_LPN_DISABLED, /* LPN feature is disabled */
145 BT_MESH_LPN_ENABLED, /* LPN enabled, but no Friend */
158 /* Address of our Friend when we're a LPN. Unassigned if we don't
172 disable:1, /* Disable LPN after clearing */
183 /* Previous Friend of this LPN */
189 /* Next LPN related action timer */
232 /* Friend state, unique for each LPN that we're Friends for */
237 struct bt_mesh_lpn lpn; /* Low Power Node state */ member
274 friend_match:1; /* Matched an LPN we're friends for */
H A Dlpn.h25 return bt_mesh.lpn.established; in bt_mesh_lpn_established()
35 return (addr == bt_mesh.lpn.frnd); in bt_mesh_lpn_match()
44 return (bt_mesh.lpn.state == BT_MESH_LPN_WAIT_UPDATE); in bt_mesh_lpn_waiting_update()
53 return (bt_mesh.lpn.state == BT_MESH_LPN_TIMER); in bt_mesh_lpn_timer()
H A Dtransport.c23 #include "lpn.h"
592 BT_DBG("Ignoring PDU for LPN 0x%04x of this Friend", in sdu_recv()
719 BT_DBG("Ack for LPN 0x%04x of this Friend", rx->ctx.recv_dst); in trans_ack()
842 if (rx->ctx.addr == bt_mesh.lpn.frnd) { in ctl_recv()
889 /* SDUs must match a local element or an LPN of this Friend. */ in trans_unseg()
981 BT_WARN("Not sending ack when LPN is enabled"); in send_ack()
1368 /* If LPN mode is enabled messages are only accepted when we've in bt_mesh_trans_recv()
1386 * LPN of this Friend. in bt_mesh_trans_recv()
1397 /* Notify LPN state machine so a Friend Poll will be sent. If the in bt_mesh_trans_recv()
1403 * Another situation where we want to notify the LPN state machine in bt_mesh_trans_recv()
H A Dshell.c30 #include "lpn.h"
570 printk("LPN already enabled\n"); in cmd_lpn()
576 printk("Enabling LPN failed (err %d)\n", err); in cmd_lpn()
582 printk("LPN already disabled\n"); in cmd_lpn()
588 printk("Enabling LPN failed (err %d)\n", err); in cmd_lpn()
612 printk("Friendship (as LPN) established to Friend 0x%04x\n", in lpn_cb()
615 printk("Friendship (as LPN) lost with Friend 0x%04x\n", in lpn_cb()
2408 { "lpn", cmd_lpn, &cmd_lpn_help },
2424 { "lpn-subscribe", cmd_lpn_subscribe, &cmd_lpn_subscribe_help },
2425 { "lpn-unsubscribe", cmd_lpn_unsubscribe, &cmd_lpn_unsubscribe_help },
H A Dmesh.c23 #include "lpn.h"
H A Dnet.c24 #include "lpn.h"
215 if (cred->addr == bt_mesh.lpn.frnd) { in friend_cred_set()
1332 * was neither a local element nor an LPN we're Friends for. in bt_mesh_net_recv()
H A Daccess.c21 #include "lpn.h"
H A Dcfg_srv.c22 #include "lpn.h"
80 if (bt_mesh.lpn.state != BT_MESH_LPN_DISABLED) { in hb_send()
2856 BT_ERR("Unable to send LPN PollTimeout Status"); in lpn_timeout_get()
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/
H A Dsyscfg.yml215 Automatically enable LPN functionality once provisioned and start
216 looking for Friend nodes. If this option is disabled LPN mode
289 Maximum number of groups that the LPN can subscribe to.
322 Number of incomplete segment lists that we track for each LPN
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/
H A DMakefile.mesh34 $(NIMBLE_ROOT)/nimble/host/mesh/src/lpn.c \
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/include/mesh/
H A Dmain.h337 * @param enable true to enable LPN functionality, false to disable it.