/Zephyr-latest/subsys/bluetooth/mesh/ |
D | lpn.c | 23 #include "lpn.h" 41 #define RX_DELAY_CORRECTION(lpn) ((lpn)->adv_duration) argument 43 #define RX_DELAY_CORRECTION(lpn) 0 argument 64 #define REQ_RETRY_DURATION(lpn) (LPN_RECV_DELAY + (lpn)->adv_duration + \ argument 65 (lpn)->recv_win + POLL_RETRY_TIMEOUT) 72 #define REQ_ATTEMPTS(lpn) MIN(REQ_ATTEMPTS_MAX, \ argument 73 POLL_TIMEOUT / REQ_RETRY_DURATION(lpn)) 75 #define POLL_TIMEOUT_MAX(lpn) (POLL_TIMEOUT - \ argument 76 (REQ_ATTEMPTS(lpn) * REQ_RETRY_DURATION(lpn))) 118 static int32_t poll_timeout(struct bt_mesh_lpn *lpn) in poll_timeout() argument [all …]
|
D | lpn.h | 19 return bt_mesh.lpn.established; in bt_mesh_lpn_established() 29 return (addr == bt_mesh.lpn.frnd); in bt_mesh_lpn_match() 38 return (bt_mesh.lpn.state == BT_MESH_LPN_WAIT_UPDATE); in bt_mesh_lpn_waiting_update()
|
D | friend.c | 46 /* PDUs from Friend to the LPN should only be transmitted once with the 95 if (frnd->lpn == BT_MESH_ADDR_UNASSIGNED) { in is_lpn_unicast() 99 return (addr >= frnd->lpn && addr < (frnd->lpn + frnd->num_elem)); in is_lpn_unicast() 135 return bt_mesh_friend_cred_create(&frnd->cred[idx], frnd->lpn, in friend_cred_create() 168 LOG_DBG("LPN 0x%04x", frnd->lpn); in friend_clear() 196 cb->terminated(frnd->subnet->net_idx, frnd->lpn); in friend_clear() 270 LOG_DBG("LPN addr 0x%04x counter 0x%04x", lpn_addr, lpn_counter); in bt_mesh_friend_clear() 274 LOG_WRN("No matching LPN addr 0x%04x", lpn_addr); in bt_mesh_friend_clear() 285 LOG_WRN("LPN Counter out of range (old %u new %u)", frnd->lpn_counter, lpn_counter); in bt_mesh_friend_clear() 318 LOG_DBG("%04x added %04x to subscription list", frnd->lpn, addr); in friend_sub_add() [all …]
|
D | net.h | 59 uint16_t lpn; member 112 BT_MESH_LPN_DISABLED, /* LPN feature is disabled */ 115 BT_MESH_LPN_ENABLED, /* LPN enabled, but no Friend */ 128 /* Address of our Friend when we're a LPN. Unassigned if we don't 142 disable:1, /* Disable LPN after clearing */ 156 /* Previous Friend of this LPN */ 165 /* Next LPN related action timer */ 218 /* Friend state, unique for each LPN that we're Friends for */ 223 struct bt_mesh_lpn lpn; /* Low Power Node state */ member 271 friend_match:1; /* Matched an LPN we're friends for */
|
D | CMakeLists.txt | 32 zephyr_library_sources_ifdef(CONFIG_BT_MESH_LOW_POWER lpn.c)
|
D | testing.c | 17 #include "lpn.h"
|
D | subnet.h | 165 * @param lpn_addr Address of the LPN node in the friendship. 167 * @param lpn_counter The LPN's counter parameter.
|
D | subnet.c | 27 #include "lpn.h" 895 rx->sub = bt_mesh.lpn.sub; in bt_mesh_net_cred_find() 897 for (j = 0; j < ARRAY_SIZE(bt_mesh.lpn.cred); j++) { in bt_mesh_net_cred_find() 902 if (cb(rx, in, out, &bt_mesh.lpn.cred[j])) { in bt_mesh_net_cred_find() 910 /* LPN Should only receive on the friendship credentials when in in bt_mesh_net_cred_find()
|
D | Kconfig | 1607 Automatically enable LPN functionality once provisioned and start 1608 looking for Friend nodes. If this option is disabled LPN mode 1612 int "Time from last received message before going to LPN mode" 1700 int "Number of groups the LPN can subscribe to" 1704 Maximum number of groups that the LPN can subscribe to. 1753 int "Number of supported LPN nodes" 1761 int "Number of incomplete segment lists per LPN" 1765 Number of incomplete segment lists that we track for each LPN
|
D | transport.c | 26 #include "lpn.h" 798 /* if friend_match was set the frame is for LPN which we are friends. */ in sdu_recv() 866 LOG_DBG("Ack for LPN 0x%04x of this Friend", rx->ctx.recv_dst); in trans_ack() 999 if (rx->ctx.addr == bt_mesh.lpn.frnd) { in ctl_recv() 1124 LOG_WRN("Not sending ack when LPN is enabled"); in send_ack() 1455 * case this message is destined to an LPN of ours. in trans_seg() 1642 /* If LPN mode is enabled messages are only accepted when we've in bt_mesh_trans_recv() 1660 * LPN of this Friend. in bt_mesh_trans_recv() 1680 /* Notify LPN state machine so a Friend Poll will be sent. */ in bt_mesh_trans_recv()
|
D | net.c | 26 #include "lpn.h" 438 if (tx->friend_cred && bt_mesh.lpn.frnd) { in net_tx_cred_get() 439 return &bt_mesh.lpn.cred[SUBNET_KEY_TX_IDX(tx->sub)]; in net_tx_cred_get() 746 /* When the Friend node relays message for lpn, the message will be in bt_mesh_net_relay() 924 * was neither a local element nor an LPN we're Friends for. in bt_mesh_net_recv()
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/tests_scripts/friendship/ |
D | msg_va_collision.sh | 7 # Test that LPN sends only one Subscription List Add and only one Subscription List Remove message 8 # to Friend when LPN is subscribed to 2 virtual addresses with collision. 10 # 1. LPN subscribes a model to 2 virtual addresses with collision and sends single Friend 13 # 2.1. Friend sends a message to each virtual address, LPN receives both messages. 15 # 3.1. LPN unsubscribes from one of the virtual addresses. At this step no Friend Subscription 16 # Remove messages are sent from LPN to its friend. 17 # 3.2. Friend sends a message to each virtual address. LPN receives both, but successfully decrypts 20 # 4.1. LPN unsubscribes from the second virtual address and sends Friend Subscription Remove message 22 # 4.2. Friend sends a message to each virtual address, but non of them are received by LPN.
|
D | lpn_disable.sh | 7 # Check that disabling LPN gives correct behaviour. 9 # In this test the lpn node will enable the lpn feature, and then immediately 10 # disables it again. Then we check that the lpn node is actually in a 11 # disabled state. This test ensures that a lpn disable call is not overwritten 12 # by a subsequent lpn enable call, since the enable call is associated with 14 # of the LPN module
|
D | lpn_terminate_cb.sh | 7 # Check that the LPN terminate callback does not trigger when there is no established 10 # This covers a corner case scenario where the LPN has received a friend offer, but has 11 # not yet established a connection. In this case the LPN terminate callback should not 12 # be triggered if the LPN is disabled, which is monitored by this test.
|
D | msg_frnd.sh | 7 # Send messages from the friend to the LPN
|
D | lpn_loopback.sh | 7 # Test LPN sending packets to a group and virtual address it subscribes to
|
D | msg_group.sh | 7 # Test receives on group and virtual addresses in the LPN
|
D | msg_mesh.sh | 7 # Test communication between the LPN and a third mesh device
|
D | msg_mesh_low_lat.sh | 7 # Test communication between the LPN and a third mesh device
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/ |
D | test_friendship.c | 57 /* As there may be multiple LPN devices, we'll set the address and in test_lpn_init() 73 /* Let LPN poll to get the sent message */ in friend_wait_for_polls() 75 K_SECONDS(30)), "LPN never polled"); in friend_wait_for_polls() 78 /* Wait for LPN to poll until the "no more data" message. in friend_wait_for_polls() 83 "LPN missing %d polls", polls); in friend_wait_for_polls() 139 /** As a friend, send messages to the LPN. 152 /* LPN polls on establishment. Clear the poll state */ in test_friend_msg() 157 /* Send unsegmented message from friend to LPN: */ in test_friend_msg() 163 /* Wait for LPN to poll for message and the "no more messages" msg */ in test_friend_msg() 192 "Receive from LPN failed"); in test_friend_msg() [all …]
|
D | friendship_common.c | 83 LOG_INF("LPN: established with 0x%04x", friend_addr); in lpn_established() 89 LOG_INF("LPN: terminated with 0x%04x", friend_addr); in lpn_terminated() 95 LOG_INF("LPN: Polling 0x%04x (%s)", friend_addr, in lpn_polled() 100 BT_MESH_LPN_CB_DEFINE(lpn) = {
|
D | test_heartbeat.c | 10 #include "mesh/lpn.h"
|
/Zephyr-latest/doc/connectivity/bluetooth/api/mesh/ |
D | core.rst | 14 The Low Power Node (LPN) role allows battery powered devices to participate in 15 a mesh network as a leaf node. An LPN interacts with the mesh network through 17 LPN. The LPN saves power by keeping its radio turned off, and only wakes up to 21 the LPN API allows the application to trigger the polling at any time through 22 :c:func:`bt_mesh_lpn_poll`. The LPN operation parameters, including poll 26 When using the LPN feature with logging, it is strongly recommended to only use
|
/Zephyr-latest/tests/bluetooth/mesh/basic/ |
D | testcase.yaml | 57 bluetooth.mesh.lpn: 59 extra_args: CONF_FILE=lpn.conf
|
/Zephyr-latest/doc/connectivity/bluetooth/ |
D | features.rst | 77 * Relay, Friend Node, Low-Power Node (LPN) and GATT Proxy features
|