-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
LPN not receiving any message from Friend node after LPN device reset #24311
Comments
well, it’s not bug, but it should to do change in the future, if you read log from friend node side Next: you should add cmd to subscribe 0xc000 use |
well, we should change currently implementation; Firstly: call zephyr/subsys/bluetooth/mesh/settings.c Lines 586 to 608 in 8b6930e
Secondly: call Lastly: Reinit lpn group when node reset . zephyr/subsys/bluetooth/mesh/lpn.c Lines 1032 to 1039 in 8b6930e
Can you submit pr to fix this issuer. |
When low power node reset, should add group address to friend subscription list. Fixes: #24311 Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
When low power node reset, should add group address to friend subscription list. Fixes: zephyrproject-rtos#24311 Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
Describe the bug
I've added a Generic On-Off model in mesh_shell code to publish a message from Friend node to LPN node. it's working fine after provision and configuration
Now if I reset the LPN node then friendship get's established again but it doesn't receive any message from friend.
To Reproduce
Steps to reproduce the behavior:
zephyr_library_sources_ifdef(CONFIG_BT_MESH_SHELL shell.c)
fromzephyr/subsys/bluetooth/mesh/CMakeLists.txt
- configure "generic on-off client" on Friend node with publish address 0xc000
- configure "generic on-ff server: LPN node with subscribe address 0xc000
and now it should print "HHHHEEELLLLOOOO" string on LPN terminal but it won't.
Expected behavior
After device reset also it should work.
Impact
showstopper
Screenshots or console output
Message sent by Friend node (working)
```
:~$ mesh hello
[00:28:08.686,004] bt_mesh_friend.bt_mesh_friend_match: LPN 0x0003 matched address 0xc000
[00:28:08.686,035] bt_mesh_friend.bt_mesh_friend_enqueue_tx: net_idx 0x0000 dst 0xc000 src 0x0002
[00:28:08.686,065] bt_mesh_friend.friend_lpn_enqueue_tx: LPN 0x0003
[00:28:08.686,096] bt_mesh_friend.enqueue_friend_pdu: type 0
[00:28:08.686,096] bt_mesh_friend.friend_lpn_enqueue_tx: Queued message for LPN 0x0003
[00:28:09.059,539] bt_mesh_friend.bt_mesh_friend_match: LPN 0x0003 matched address 0xc000
[00:28:09.059,539] bt_mesh_friend.bt_mesh_friend_enqueue_tx: net_idx 0x0000 dst 0xc000 src 0x0002
[00:28:09.059,570] bt_mesh_friend.friend_lpn_enqueue_tx: LPN 0x0003
[00:28:09.059,600] bt_mesh_friend.enqueue_friend_pdu: type 0
[00:28:09.059,600] bt_mesh_friend.friend_lpn_enqueue_tx: Queued message for LPN 0x0003
```
Message received by LPN node
```
uart:~$
HHHHEEELLLLOOOO
[00:28:08.183,135] bt_mesh_lpn.lpn_timeout: state: established
[00:28:08.183,166] bt_mesh_lpn.send_friend_poll: lpn->sent_req 0x00
[00:28:08.184,356] bt_mesh_lpn.req_sent: req 0x01 duration 90 err 0 state established
[00:28:08.184,387] bt_mesh_lpn.lpn_set_state: established -> recv delay
[00:28:08.274,475] bt_mesh_lpn.lpn_timeout: state: recv delay
[00:28:08.276,123] bt_mesh_lpn.lpn_set_state: recv delay -> wait update
[00:28:08.358,062] bt_mesh_lpn.friend_response_received: lpn->sent_req 0x01
[00:28:08.358,367] bt_mesh_lpn.lpn_set_state: wait update -> established
[00:28:08.358,367] bt_mesh_lpn.bt_mesh_lpn_msg_received: Requesting more messages from Friend
[00:28:08.358,367] bt_mesh_lpn.send_friend_poll: lpn->sent_req 0x00
[00:28:08.359,619] bt_mesh_lpn.req_sent: req 0x01 duration 90 err 0 state established
[00:28:08.359,619] bt_mesh_lpn.lpn_set_state: established -> recv delay
```
Friend side logs when reset LPN
```
36:27.304,718] bt_mesh_friend.friend_timeout: lpn 0x0003 send_last 0 last 0x20006584
[00:36:27.304,748] bt_mesh_friend: Friendship lost with 0x0003
[00:36:27.304,748] bt_mesh_friend.friend_clear: LPN 0x0003
```
Friend logs when sending message to LPN (after LPN reboots)
```
uart:~$ mesh hello
[00:38:11.604,278] bt_mesh_friend.bt_mesh_friend_match: No matching LPN for address 0xc000
[00:38:11.977,630] bt_mesh_friend.bt_mesh_friend_match: No matching LPN for address 0xc000
[00:38:22.377,380] bt_mesh_friend.bt_mesh_friend_match: No matching LPN for address 0x0002
[00:38:22.384,185] bt_mesh_friend.bt_mesh_friend_find: net_idx 0x0000 lpn_addr 0x0003
[00:38:22.384,216] bt_mesh_friend.bt_mesh_friend_poll: msg->fsn 0 frnd->fsn 1
[00:38:22.384,216] bt_mesh_friend.friend_recv_delay: Waiting RecvDelay of 151 ms
[00:38:22.384,246] bt_mesh_friend.encode_update: lpn 0x0003 md 0x00
[00:38:22.384,246] bt_mesh_friend.encode_friend_ctl: LPN 0x0003
[00:38:22.384,307] bt_mesh_friend.bt_mesh_friend_poll: Enqueued Friend Update to empty queue
[00:38:22.535,278] bt_mesh_friend.friend_timeout: lpn 0x0003 send_last 0 last 0x00000000
[00:38:22.535,308] bt_mesh_friend.update_overwrite: Update Previous Friend Update MD 0x00 -> 0x00
[00:38:22.535,430] bt_mesh_friend.friend_timeout: Sending buf 0x20006584 from Friend Queue of LPN 0x0003
[00:38:22.537,567] bt_mesh_friend.buf_send_start: err 0
[00:38:22.598,693] bt_mesh_friend.buf_send_end: err 0
```
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: