BLE Mesh message segmentation

p.kazlauskas
Posts: 3
Joined: Tue Mar 02, 2021 9:57 am

BLE Mesh message segmentation

Postby p.kazlauskas » Fri Mar 05, 2021 6:37 am

Hello,
I have a mesh system of 1 client node and 90 server model nodes.
I am using sensor_client model to send get request to sensor_server nodes. Code is used from master branch.
I add parameters to

Code: Select all

esp_ble_mesh_sensor_client_get_state_t get
like this:

Code: Select all

get.series_get.property_id = SENSOR_PROPERTY_ID_0;
get.series_get.op_en = true;
get.series_get.raw_value_x1 = msg1;
get.series_get.raw_value_x2 = msg2;
Both msg1 and msg2 hold 2 Bytes each. So if bool(op_en field) would take up 8 bits, whole message payload would be maximum of 7 Bytes.
But while sending messages sometimes I get error No multi-segment message contexts available
it seems that messages are being segmented, even if they fit into maximum unsegmented message size which is 9 Bytes if I understand correctly.
How can I configure sensor_client to send only unsegmented messages?
Last edited by p.kazlauskas on Fri Mar 05, 2021 11:18 am, edited 1 time in total.

p.kazlauskas
Posts: 3
Joined: Tue Mar 02, 2021 9:57 am

Re: BLE Mesh message segmentation

Postby p.kazlauskas » Fri Mar 05, 2021 10:26 am

When I first start all nodes, all information between them travels without any errors and mesh works really fast. But after a few hours or sometimes even sooner, one or more of the messages gets stuck. By stuck I mean I get no errors or timeout callback that message was not sent, also I do not receive any answer from server node. (Server node also does not receive any message).
The time it takes to get stuck, varies from value I set to CONFIG_BLE_MESH_TX_SEG_MSG_COUNT and CONFIG_BLE_MESH_RX_SEG_MSG_COUNT.
If I try to send message to the same node I get error Busy sending message to DST.
Client node works in a loop, it sends messages to all nodes, waits for 10s and sends messages again. When one message gets stuck, after a wile more stuck messages appear and then I get error No multi-segment message contexts available.

It seams to me that some segments of the message are not sent and get stuck at client side. If server node does not receive all segments it also does not get full message and drops it.
When client gets lots of stuck segments, it's advertising buffers get full and there is no place for new messages left.

Can you please take a look at this?

MortiMnv
Posts: 2
Joined: Sat Jan 30, 2021 8:43 am

Re: BLE Mesh message segmentation

Postby MortiMnv » Sat Nov 06, 2021 12:04 pm

Hello "p.kazlauskas",
I have exactly same issue as you and I do not know how can i fix it?
can you help me if you have fixed the issue?

thanks.

Who is online

Users browsing this forum: Google [Bot] and 71 guests