Toggle navigation
EN
EN
DE
ES
FR
IT
UK
Help
Log In
Help
Log In
EN
EN
DE
ES
FR
IT
UK
Home
Messages
Hashtags
Subgroups
×
×
×
Close
Likes
Users
posterid:900823
Messages
×
Close
Search
Single
Toggle Dropdown
Messages
Topics
Expanded
Polls
previous page
#322
next page
understanding of logic behind address used in Publish-Subscribe mechanism for Bluetooth Mesh
Vikrant More <vikrant8051@...>
#322
static void gen_onoff_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct net_buf_simple *buf)
{
static volatile unsigned char copy1=NULL;
unsigned char elem_idx = model->elem->addr - bt_mesh_primary_addr();
unsigned char boo = net_buf_simple_pull_u8(buf);
if( boo != copy1)
{
printk("Data(set)= %u \n\r",boo);
printk("Data(set) unicast_addr = %u \n\r",model->elem->addr);
printk("Data(set) pub_addr = %u \n\r",
model->pub->addr
);
printk("Data(set) sub_addr = %u \n\r",
model->groups[0]
);
switch(elem_idx)
{
case 0:
if(boo!=0)
NRF_P0->OUT &= ~(1<<13);
else
NRF_P0->OUTSET |= (1<<13);
break;
case 1:
if(boo!=0)
NRF_P0->OUT &= ~(1<<14);
else
NRF_P0->OUTSET |= (1<<14);
break;
}
copy1=boo;
}//end of if
}
I have edited
gen_onoff_set
function for
onoff
server as mentioned above.
I'm using Silicon Labs Bluetooth Mesh App to provision & configure my nrf52840_pca10056 Board.
After controlling LED using GUI from App, above function is executing normally.
And it prints ...
Data(set)=
0 or 1
Data(set) unicast_addr =
1
Data(set) pub_addr =
0xC000 <--------------------------What is significance of this address ??
Data(set) sub_addr =
0XC001
when I control Led individually , source address = 0x2001 & destination address = 0x0001
when I control Led using master control , source address = 0x2001 & destination address = 0xC001.
Then tell me what is roll or use of
0xC000
?
Or how it will help us ?
More
All Messages By This Member
previous page
View All 2 Messages In Topic
next page
previous page
#322
next page
Join
{users@lists.zephyrproject.org to automatically receive all group messages.
×
Close
Report Message
Reason
Report to Moderators
I think this message isn't appropriate for our group. The Group moderators are responsible for maintaining their community and can address these issues.
Report to Zephyr Project Support
I think this violates the Terms of Service. This includes: harm to minors, violence or threats, harassment or privacy invasion, impersonation or misrepresentation, fraud or phishing.
Note:
Your email address is included with the abuse report.
×
Close
Verify Delete
Are you sure you wish to delete this message from the message archives of users@lists.zephyrproject.org?
This cannot be undone.
×
Close
Verify Repost
Are you sure you wish to repost this message?
More Options
More
Home
Hashtags
Subgroups
Terms
Toggle navigation
Terms
©
2023
Groups.io