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

Bluetooth: Mesh: Friend node not cache ALL_Node Address or different app_idx #24009

Closed
LingaoM opened this issue Apr 2, 2020 · 6 comments · Fixed by #24327
Closed

Bluetooth: Mesh: Friend node not cache ALL_Node Address or different app_idx #24009

LingaoM opened this issue Apr 2, 2020 · 6 comments · Fixed by #24327
Assignees
Labels
area: Bluetooth Mesh Enhancement Changes/Updates/Additions to existing features

Comments

@LingaoM
Copy link
Collaborator

LingaoM commented Apr 2, 2020

Set up there nodes, call publish node, friend node ,lpn node.

All node share single network key, but friend & lpn node with different application key,
the lpn node has same application key will publish node.

when publish node periodic send model message with the dst = 0xffff, lpn node not receive all of them.

@LingaoM LingaoM added the bug The issue is a bug, or the PR is fixing a bug label Apr 2, 2020
@LingaoM
Copy link
Collaborator Author

LingaoM commented Apr 2, 2020

bt_mesh_model_recv(rx, &sdu);
return 0;
}
BT_WARN("No matching AppKey");
return -EINVAL;
}
static int sdu_recv_seg(struct seg_rx *seg, u8_t hdr, u8_t aszmic,
and sdu_recv_seg

should be change as return 0 ?

@LingaoM
Copy link
Collaborator Author

LingaoM commented Apr 2, 2020

static bool friend_lpn_matches(struct bt_mesh_friend *frnd, u16_t net_idx,
u16_t addr)
{
int i;
if (!frnd->established) {
return false;
}
if (net_idx != frnd->net_idx) {
return false;
}
if (BT_MESH_ADDR_IS_UNICAST(addr)) {
return is_lpn_unicast(frnd, addr);
}
for (i = 0; i < ARRAY_SIZE(frnd->sub_list); i++) {
if (frnd->sub_list[i] == addr) {
return true;
}
}
return false;
}
should add judgement for ALL_NODE_ADDRESS ?

@jhedberg
Copy link
Member

jhedberg commented Apr 2, 2020

I remember seeing some discussion in the Mesh WG about this, with the conclusion that LPNs need to explicitly subscribe to these addresses, so based on that it's not a bug. @trond-snekvik can you confirm?

@jhedberg jhedberg added question area: Bluetooth Mesh and removed bug The issue is a bug, or the PR is fixing a bug labels Apr 2, 2020
@trond-snekvik
Copy link
Contributor

I remember this too, according to spec, the LPN has to explicitly subscribe to 0xffff. There's no public API for doing this in zephyr though, as it's controlled by the config server, which won't accept 0xffff. Perhaps it could be compile time option to automatically subscribe to 0xffff when the friendship is established?

@LingaoM
Copy link
Collaborator Author

LingaoM commented Apr 2, 2020

well, it's still another problem, friend node has different appkey with lpn node , but currently call sud_recv return -EINVAL when local node unable find appkey,
so, even the friend node known its dst is lpn node, and not store this to friend queue.

@jhedberg
Copy link
Member

jhedberg commented Apr 2, 2020

@LingaoMeng let's not mix multiple issues into a single GitHub issue. Open a new one since I already categorised this based on the 0xffff address concern.

@carlescufi carlescufi added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug and removed question labels Apr 9, 2020
@jhedberg jhedberg added Enhancement Changes/Updates/Additions to existing features and removed bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Apr 15, 2020
jhedberg pushed a commit that referenced this issue Apr 19, 2020
Add option for low power node automatically subscribe
all-nodes-address to friend sub list.

Fixes: #24009

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
hakehuang pushed a commit to hakehuang/zephyr that referenced this issue Jun 20, 2020
Add option for low power node automatically subscribe
all-nodes-address to friend sub list.

Fixes: zephyrproject-rtos#24009

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Mesh Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants