BLE Mesh Send & Receive

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

BLE Mesh Send & Receive

Postby FlorianR » Tue Mar 16, 2021 7:15 am

Hello you smart people out there!
I am new to BLE mesh and I must say that is quit a lot to get my head arround...
My project involes a self provisioning network with a couple nodes that send data to all other nodes whenever there is new data available. Or that is the plan at least.
I managed to alter the vendor client/server example to send the opcodes I want from the client to the server and let the server answer to the client message. In the example the Server only sends a msg back, if it got something from the client. What I want is that all of the nodes simple send data as soon they have new data to all other nodes.
So what I need is not a "master/slave" system but a "multi-master" or "all-are-equal" system.
I am sorry that I can not discribe it better, but that is do to the lack of understanding and confusion ^^
Can someone help me with a good hint?

Questions:
#1 How to send a message to all others whenever a node wants to.
#2 Using vendor models, are there really only 8 usable databytes left?

Best regards
Florian

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: BLE Mesh Send & Receive

Postby FlorianR » Wed Mar 17, 2021 9:07 am

Just to clarify. I know that I need a "Control Model" which is a combination out of Server and Client Model, but I really struggle to combine both of them together. Does maybe someone got a example code for me, where I can get inspiration? :?

abansal22
Posts: 105
Joined: Wed Apr 22, 2020 8:24 am

Re: BLE Mesh Send & Receive

Postby abansal22 » Thu Mar 18, 2021 9:16 am

FlorianR wrote:
Tue Mar 16, 2021 7:15 am
Hello you smart people out there!
I am new to BLE mesh and I must say that is quit a lot to get my head arround...
My project involes a self provisioning network with a couple nodes that send data to all other nodes whenever there is new data available. Or that is the plan at least.
I managed to alter the vendor client/server example to send the opcodes I want from the client to the server and let the server answer to the client message. In the example the Server only sends a msg back, if it got something from the client. What I want is that all of the nodes simple send data as soon they have new data to all other nodes.
So what I need is not a "master/slave" system but a "multi-master" or "all-are-equal" system.
I am sorry that I can not discribe it better, but that is do to the lack of understanding and confusion ^^
Can someone help me with a good hint?

Questions:
#1 How to send a message to all others whenever a node wants to.
#2 Using vendor models, are there really only 8 usable databytes left?

Best regards
Florian
Hello,

I think I can solve the problem. What I understand that you want to send the msg to all the nodes in the mesh network and to update themselves accordingly.
First method is to send the data to the group address 0xFFFF, as this group address represent all the nodes in the network. So whenever you want to send the data to all the nodes from a node then just publish the message on the group address 0xFFFF. All nodes will update themselves whenever the new messsage arrives. But I will not recommend this way, because in future if you need not to send all the nodes, then it will create the problem and you have to change whole code.

Second method is to create the specific group say of address 0xC000. Every node should subscribe to this address while provisioning.
Now whenever the data changes the node should publish the message to this group address. This will give the flexibility to change the code in the future easily.

One tip, do not try to understand the ble mesh network using the vendor model. It will confuse you. My recommendation is to master the on/off model first. It will give you the better understanding of the network.
May I know what type of data you want to send, I can suggest better model.

Thanks

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: BLE Mesh Send & Receive

Postby FlorianR » Mon Mar 22, 2021 11:01 am

Hi,
thank you for the advice.
I looked at the onoff example and I think I unserstand it more or less.
What I need is to send a LIN frame (1 ID Byte+8Data Bytes) to all other nodes in the mesh, if the frame was updated.
The LIN frames can come from different nodes.

The only way I see it right now, is to make a vendor op code for every of the 62 Frames, (which feels quite ugly), because I have only 8 data bytes in the vendor model left. Then publish the frame to all the others (I still don't get this to work)

Best regards
Florian

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: BLE Mesh Send & Receive

Postby FlorianR » Tue Mar 30, 2021 10:28 am

Can none Help me ? :(

abansal22
Posts: 105
Joined: Wed Apr 22, 2020 8:24 am

Re: BLE Mesh Send & Receive

Postby abansal22 » Tue Mar 30, 2021 3:52 pm

FlorianR wrote:
Mon Mar 22, 2021 11:01 am
Hi,
thank you for the advice.
I looked at the onoff example and I think I unserstand it more or less.
What I need is to send a LIN frame (1 ID Byte+8Data Bytes) to all other nodes in the mesh, if the frame was updated.
The LIN frames can come from different nodes.

The only way I see it right now, is to make a vendor op code for every of the 62 Frames, (which feels quite ugly), because I have only 8 data bytes in the vendor model left. Then publish the frame to all the others (I still don't get this to work)

Best regards
Florian
I think you can use the sensor server model to publish the LIN frame with the ID to the group address which is subscribe by the various nodes. When the any message data received by the node, it can decode it and extract the sensor data from the message and process it accordingly. I think this work best in your case.

abansal22
Posts: 105
Joined: Wed Apr 22, 2020 8:24 am

Re: BLE Mesh Send & Receive

Postby abansal22 » Sat Apr 03, 2021 5:41 am

does your problem solves?

FlorianR
Posts: 28
Joined: Fri Mar 12, 2021 2:00 pm

Re: BLE Mesh Send & Receive

Postby FlorianR » Wed May 12, 2021 9:24 am

abansal22 wrote:
Sat Apr 03, 2021 5:41 am
does your problem solves?
No, I gave up for now. Maybe I am to dumb for BLE MESH...

jajijujejo
Posts: 2
Joined: Mon Aug 30, 2021 3:55 am

Re: BLE Mesh Send & Receive

Postby jajijujejo » Mon Aug 30, 2021 4:01 am

hello i want to continue this problem, any one can help me?

abansal22
Posts: 105
Joined: Wed Apr 22, 2020 8:24 am

Re: BLE Mesh Send & Receive

Postby abansal22 » Mon Aug 30, 2021 11:33 am

jajijujejo wrote:
Mon Aug 30, 2021 4:01 am
hello i want to continue this problem, any one can help me?
Yes, please elaborate your problem!!

Who is online

Users browsing this forum: fb_iceg and 72 guests