Lines Matching full:lpn
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()
194 /* Receive a segmented message from the LPN. LPN should poll for the ack in test_friend_msg()
206 /** As a friend, overflow the message queue for the LPN with own packets.
208 * Verify that the LPN doesn't terminate the friendship during the poll for
240 /* LPN verifies that no more messages are in Friend Queue. */ in test_friend_overflow()
258 /* LPN verifies that there are no more messages in the Friend Queue. */ in test_friend_overflow()
290 /** Establish a friendship, wait for communication between the LPN and a mesh
291 * device to finish, then send group and virtual addr messages to the LPN.
292 * Let the LPN add another group message, then send to that as well.
317 /* Send a group message to the LPN */ in test_friend_group()
319 "Failed to send to LPN"); in test_friend_group()
320 /* Send a virtual message to the LPN */ in test_friend_group()
322 "Failed to send to LPN"); in test_friend_group()
324 /* Wait for the LPN to poll for each message, then for adding the in test_friend_group()
329 /* Send a group message to an address the LPN added after the friendship in test_friend_group()
333 "Failed to send to LPN"); in test_friend_group()
359 /** Send messages to 2 virtual addresses with collision and check that LPN correctly polls them.
381 LOG_INF("Step 1: Sending msgs to LPN."); in test_friend_va_collision()
383 /* LPN shall receive the first 2 messages. */ in test_friend_va_collision()
385 /* Send a message to the first virtual address. LPN should receive it. */ in test_friend_va_collision()
387 "Failed to send to LPN"); in test_friend_va_collision()
392 LOG_INF("Let LPN unsubscribe from the first address."); in test_friend_va_collision()
394 /* Manual poll by LPN test case after removing the first Label UUID from subscription. */ in test_friend_va_collision()
397 LOG_INF("Step 2: Sending msgs to LPN."); in test_friend_va_collision()
399 /* Friend will send both messages as the virtual address is the same, but LPN shall in test_friend_va_collision()
404 "Failed to send to LPN"); in test_friend_va_collision()
409 LOG_INF("Let LPN unsubscribe from the second address."); in test_friend_va_collision()
411 /* Manual poll by LPN test case after removing the second Label UUID from subscription. in test_friend_va_collision()
416 LOG_INF("Step 3: Sending msgs to LPN."); in test_friend_va_collision()
418 /* Friend shall not send the messages to LPN because it is not subscribed to any virtual in test_friend_va_collision()
423 "Failed to send to LPN"); in test_friend_va_collision()
432 /* LPN test functions */
434 /** Enable the LPN role, and verify that the friendship is established.
443 /* This test is used to establish friendship with single lpn as well as in test_lpn_est()
444 * with many lpn devices. If legacy advertiser is used friendship with in test_lpn_est()
445 * many lpn devices is established normally due to bad precision of advertiser. in test_lpn_est()
446 * If extended advertiser is used simultaneous lpn running causes the situation in test_lpn_est()
456 "LPN not established"); in test_lpn_est()
465 /** As an LPN, exchange messages with the friend node.
477 K_SECONDS(5)), "LPN not established"); in test_lpn_msg_frnd()
478 /* LPN polls on establishment. Clear the poll state */ in test_lpn_msg_frnd()
512 * Should not be affected by the LPN mode at all. in test_lpn_msg_frnd()
528 /** As an LPN, exchange messages with a third party mesh node while in a
541 K_SECONDS(2)), "LPN not established"); in test_lpn_msg_mesh()
542 /* LPN polls on establishment. Clear the poll state */ in test_lpn_msg_mesh()
546 * Should not be affected by the LPN mode at all. in test_lpn_msg_mesh()
575 /** As an LPN, establish and terminate a friendship with the same friend
587 "LPN not established"); in test_lpn_re_est()
592 "LPN never terminated friendship"); in test_lpn_re_est()
600 /** Establish a friendship as an LPN, and verify that the friendship survives
610 K_SECONDS(5)), "LPN not established"); in test_lpn_poll()
615 "LPN failed to poll before the timeout"); in test_lpn_poll()
619 FAIL("LPN terminated."); in test_lpn_poll()
639 K_SECONDS(5)), "LPN not established"); in test_lpn_overflow()
737 /** As an LPN, receive packets on group and virtual addresses from mesh device
771 K_SECONDS(5)), "LPN not established"); in test_lpn_group()
842 /** As an LPN, send packets to own address to ensure that this is handled by
878 "LPN not established"); in test_lpn_loopback()
919 /** Without engaging in a friendship, communicate with an LPN through a friend
930 /* When this device and a friend device receive segments from LPN both start in test_other_msg()
931 * sending data. This device sends transport ack. Friend relays LPN's segment. in test_other_msg()
941 /* Receive an unsegmented message from the LPN. */ in test_other_msg()
943 "Failed to receive from LPN"); in test_other_msg()
945 /* Minor delay that allows LPN's adv to complete sending. */ in test_other_msg()
948 /* Send an unsegmented message to the LPN */ in test_other_msg()
950 "Failed to send to LPN"); in test_other_msg()
952 /* Receive a segmented message from the LPN. */ in test_other_msg()
954 "Failed to receive from LPN"); in test_other_msg()
956 /* Minor delay that allows LPN's adv to complete sending. */ in test_other_msg()
961 "Send to LPN failed"); in test_other_msg()
963 /* Receive an unsegmented message from the LPN, originally sent with in test_other_msg()
967 "Failed to receive from LPN"); in test_other_msg()
973 * the LPN.
984 /* Wait for LPN to send us a message after establishing the friendship */ in test_other_group()
987 /* Send a group message to the LPN */ in test_other_group()
989 "Failed to send to LPN"); in test_other_group()
990 /* Send a virtual message to the LPN */ in test_other_group()
992 "Failed to send to LPN"); in test_other_group()
997 /** LPN disable test.
1010 FAIL("LPN connection polled unexpectedly"); in test_lpn_disable()
1016 /** LPN terminate cb test.
1032 FAIL("LPN terminate CB triggered unexpectedly"); in test_lpn_term_cb_check()
1038 /** Test that LPN sends only one Subscription List Add and only one Subscription List Remove message
1039 * to Friend when LPN is subscribed to 2 virtual addresses with collision.
1052 /* Subscripbe LPN on both virtual address with collision. */ in test_lpn_va_collision()
1069 K_SECONDS(5)), "LPN not established"); in test_lpn_va_collision()
1077 /* LPN shall receive both messages. */ in test_lpn_va_collision()
1093 * call shall not generate Friend Subscription List Remove message because LPN is still in test_lpn_va_collision()
1107 /* LPN will still receive both messages as the virtual address is the same for both Label in test_lpn_va_collision()
1130 * address. LPN shall send Subscription List Remove message. in test_lpn_va_collision()
1176 TEST_CASE(lpn, est, "LPN: establish friendship"),
1177 TEST_CASE(lpn, msg_frnd, "LPN: message exchange with friend"),
1178 TEST_CASE(lpn, msg_mesh, "LPN: message exchange with mesh"),
1179 TEST_CASE(lpn, re_est, "LPN: re-establish friendship"),
1180 TEST_CASE(lpn, poll, "LPN: poll before timeout"),
1181 TEST_CASE(lpn, overflow, "LPN: message queue overflow"),
1182 TEST_CASE(lpn, group, "LPN: receive on group addrs"),
1183 TEST_CASE(lpn, loopback, "LPN: send to loopback addrs"),
1184 TEST_CASE(lpn, disable, "LPN: disable LPN"),
1185 TEST_CASE(lpn, term_cb_check, "LPN: no terminate cb trigger"),
1186 TEST_CASE(lpn, va_collision, "LPN: receive on virtual addrs with collision"),