Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How increase throughput or high data sending rate in BLE mesh sdk using nRF52832 sdk1.0.1?

Hello,

We have developing solution for IIoT using Nordic BLE mesh technology for many node to other many node then send to own server. We have select one analog sensor and read this adc 3 channels using nRF52832 DK. Each channel of adc data is near about 8KB so total data size is 8*3= 24KB. Now we have successfully send this large amount of data sensor node to relay node.

Simply we are trying to like this:

Sensor Node1,2,3.....N------>Relay Node(use for re-transmit message and expand connectivity range)--------> Server Node(Receive data from relay node and send it to own server using WiFi).

In my server side i have merged  UART example from nRF5 SDK 14.1 into mesh sdk.  Not use mesh serial example in my application. UART example is used because i have interface external WIFI module for internet connectivity to own server.

But now my problem is When i send data Sensor node to relay node it sending very fast it take near about 3 second for sending all data into server.

But when i send this same data relay node to server node(with interface wifi module using UART)at this time it take more time near about 3-4 minutes.

Actually i have enable mesh instaburst feature in my code but not increase throughput.  On this i have few questions as per the following:

  1. Why it only through put low when i send sensor data to server node with merge example is UART?
  2. If i interface UART example into mesh light switch server example node due to this is it affect on throughput?
  3. If yes for increasing this is it have any new configuration for achieving high data rate.
  4. For sending all packets i have use access_model_publish method can you suggest other method for high data rate and also no packet losses between sending..

Thanks in Advanced.......!!!

Parents
  • Hi,

    Not sure why the throughput are low from relay node to server node. I don't think merging the UART example with the light switch server example would affect the throughput. I suspect that the Wifi module might cause this issue, can you try to turn off the wifi module and have only the UART running? Just to see if it is working with the UART example merged.

  • Hi,

    m_clients are a list of clients, and "0" and "GROUP_CLIENT_INDEX" are the index in this list. When combining examples you have to make sure that the different clients are placed, read and updated in the right place in the list. I'm still not sure why the throughput would be slower though...

    Does the relaying work when set m_clients[GROUP_CLIENT_INDEX]

  • Hi,

    The reason you get lower throughput when setting m_clients[GROUP_CLIENT_INDEX] is probably because that client is relaying the message to other nodes. Since it have to retransmit the packages it might miss some incoming packages which causes it to have a lower throughput. 

    When you set it to m_clients[0] the server will only receive the package and not retransmit hence you get a higher throughput.

  • Hi,

    I do not want to message to my all group but i want to send message sensor node to relay node to last server node as like. relay node may be increase if we will need to cover large area.

    For this how i can published unicast message to last server and also relaying message with high throughput.

    My sensor data is 24kb analog reading and i able to send this all data to server but throughput is very low with using instabrust feature. How i can increase and it is possible to send this all data to my last server within 2-5 seconds.

    Thanks...!!

  • You can send messages "directly" from sensor node to last server node through the Mesh, independently of what the topology of the network looks like. The relay node functionality is handled by the Mesh stack, and you do not have to do anything in the application for it to relay messages. 

    You can use the unicast address to send a message from sensor node to last server node. Messages will automatically propagate from sensor node through relay node to last server node, so you can address last server node directly from sensor node.

  • Hi,

    Thanks for answering. Can you please tell me how i can use unicast address in sensor node to publish all messages to my last server. If i have one sensor node and 2 relay node and 1 my last server node.

    Thanks.

  • If you provision & configure the last server node last (i.e. let the client provision the 2 relay nodes first & turn on the last server node at the very end), then you know the last server node will be m_clients[3] because this last server node was provisioned last). I am assuming the sensor node is your client (& provisioner since you are using mesh sdk v1.0.1). Then you can call your modified simple_on_off_client_set() function that sends your data, which then calls send_reliable_message(). This function will send the data via the unicast address to your last server node. Like Martin mentioned, by sending via unicast, you should achieve a higher throughput than sending via the group address.

Reply
  • If you provision & configure the last server node last (i.e. let the client provision the 2 relay nodes first & turn on the last server node at the very end), then you know the last server node will be m_clients[3] because this last server node was provisioned last). I am assuming the sensor node is your client (& provisioner since you are using mesh sdk v1.0.1). Then you can call your modified simple_on_off_client_set() function that sends your data, which then calls send_reliable_message(). This function will send the data via the unicast address to your last server node. Like Martin mentioned, by sending via unicast, you should achieve a higher throughput than sending via the group address.

Children
  • Thanks Bjorn for great answer,

    But If we create 3 server node and one client node all node working fine and cell it to customer. and after few days customer want one more client and server node so how i can add this two node in existing mesh network. Where should i need to change for this extra two node provisioning.

    Thnaks..!!

  • You can add the server node by just increasing the SERVER_COUNT by one. That way, the provisioner will keep on trying to provision if the m_configured_devices < SERVER_COUNT (see provisioner_config_successful_cb() in main.c of the light switch client). 

    Since the provisioner & client are in the same example for mesh sdk v1, I think it is quite difficult to use multiple clients. I would suggest moving to mesh sdk v2 & making a few small changes in the main.c file of the provisioner:

    In the check_network_state() function in the provisioner, change 

    else if (m_nw_state.provisioned_devices == 0) to else if (m_nw_state.provisioned_devices < CLIENT_NODE_COUNT)

    & change:

    else if (m_nw_state.provisioned_devices < SERVER_NODE_COUNT) to else if (m_nw_state.provisioned_devices < CLIENT_NODE_COUNT + SERVER_NODE_COUNT)

    Then, you should be able to provision multiple clients if you set CLIENT_NODE_COUNT > 1. Same as mesh sdk v1, just increase SERVER_NODE_COUNT (or leave it at 30 to keep on provisioning more servers later).

  • Thanks for your response,

    Actually for provisioning multiple client i have created new thread in devlop zone. Right now i am using mesh sdk v2.0.0 and as per your answer above i have changed in my program main file but only one client is provisioned i have set CLIENT_NODE_COUNT  2 but other client is not provisioning. All server is provisioned not problem.

    After changed in  provisioner_config_successful_cb  the logs as per the following:

    <t: 0>, main.c, 551, ----- BLE Mesh Light Switch Provisioner Demo -----
    <t: 0>, mesh_softdevice_init.c, 112, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 77, Enabling BLE...
    <t: 2>, mesh_softdevice_init.c, 88, Ram base: 0x200032C8
    <t: 627>, main.c, 489, Initializing and adding models
    <t: 638>, main.c, 532, Setup defaults: Adding keys, addresses, and bindings
    <t: 823>, provisioner_helper.c, 329, netkey_handle: 0
    <t: 836>, main.c, 579, <start>
    <t: 27408>, main.c, 118, Flash write complete
    <t: 27410>, main.c, 566, Starting application ...
    <t: 27413>, main.c, 568, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
    <t: 27417>, main.c, 569, Dev key : 30300BE2AB392FD8C0D3E1EDA260F2C0
    <t: 27419>, main.c, 570, Net key : 1614B29395D562E459B33F194AFC601E
    <t: 27423>, main.c, 571, App key : 1D0F81F728CA562339AC0820DE30BC0E
    <t: 27425>, main.c, 572, Press Button 1 to start provisioning and configuration process.
    <t: 216476>, main.c, 449, Button 1 pressed
    <t: 216478>, main.c, 362, Waiting for Client node to be provisioned ...
    <t: 221244>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 221249>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 221252>, provisioner_helper.c, 95, UUID filter matched
    <t: 221648>, provisioner_helper.c, 259, Provisioning link established
    <t: 301050>, provisioner_helper.c, 254, Static authentication data provided
    <t: 312309>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 3 remaining retries: 2
    <t: 312314>, provisioner_helper.c, 160, Provisioning failed. Retrying...
    <t: 314315>, provisioner_helper.c, 144, UUID seen: 0059FFFF000000001967BC1B8F0FA045
    <t: 319958>, provisioner_helper.c, 144, UUID seen: 0059FFFF00000000799C40D7D0823B74
    <t: 357737>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 357740>, provisioner_helper.c, 95, UUID filter matched
    <t: 358404>, provisioner_helper.c, 259, Provisioning link established
    <t: 436534>, provisioner_helper.c, 254, Static authentication data provided
    <t: 448962>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 3 remaining retries: 1
    <t: 448966>, provisioner_helper.c, 160, Provisioning failed. Retrying...
    <t: 451451>, provisioner_helper.c, 144, UUID seen: 0059FFFF00000000799C40D7D0823B74
    <t: 491519>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 491523>, provisioner_helper.c, 95, UUID filter matched
    <t: 491852>, provisioner_helper.c, 259, Provisioning link established
    <t: 504728>, provisioner_helper.c, 254, Static authentication data provided
    <t: 516812>, provisioner_helper.c, 192, Provisioning completed received
    <t: 516814>, provisioner_helper.c, 197, Adding device address, and device keys
    <t: 516820>, provisioner_helper.c, 214, Addr: 0x0100 addr_handle: 0 netkey_handle: 0 devkey_handle: 2
    <t: 520187>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 2 remaining retries: 0
    <t: 520192>, main.c, 283, Provisioning successful
    <t: 520194>, provisioner_helper.c, 181, Provisioning complete. Node addr: 0x0100 elements: 5
    <t: 520197>, node_setup.c, 672, Configuring Node: 0x0100
    <t: 520201>, node_setup.c, 586, Config client setup: devkey_handle:2 addr_handle:0
    <t: 520204>, node_setup.c, 361, Getting composition data
    <t: 520267>, main.c, 118, Flash write complete
    <t: 570607>, main.c, 333, Config client event
    <t: 570609>, node_setup.c, 371, Adding appkey
    <t: 571424>, main.c, 333, Config client event
    <t: 571426>, node_setup.c, 272, opcode status field: 0
    <t: 571429>, node_setup.c, 382, App key bind: Health server
    <t: 572075>, main.c, 333, Config client event
    <t: 572077>, node_setup.c, 272, opcode status field: 0
    <t: 572080>, node_setup.c, 450, Setting publication address for the health server to 0x0001
    <t: 572895>, main.c, 333, Config client event
    <t: 572897>, node_setup.c, 272, opcode status field: 0
    <t: 572899>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0101
    <t: 573693>, main.c, 333, Config client event
    <t: 573695>, node_setup.c, 272, opcode status field: 0
    <t: 573698>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0102
    <t: 574580>, main.c, 333, Config client event
    <t: 574582>, node_setup.c, 272, opcode status field: 0
    <t: 574584>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0103
    <t: 575379>, main.c, 333, Config client event
    <t: 575381>, node_setup.c, 272, opcode status field: 0
    <t: 575384>, node_setup.c, 416, App key bind: Simple On/Off client on element 0x0104
    <t: 576213>, main.c, 333, Config client event
    <t: 576215>, node_setup.c, 272, opcode status field: 0
    <t: 576218>, node_setup.c, 301, Set: on/off client: 0x0101 pub addr: 0x0105
    <t: 577119>, main.c, 333, Config client event
    <t: 577121>, node_setup.c, 272, opcode status field: 0
    <t: 577124>, node_setup.c, 301, Set: on/off client: 0x0102 pub addr: 0x0106
    <t: 578014>, main.c, 333, Config client event
    <t: 578016>, node_setup.c, 272, opcode status field: 0
    <t: 578019>, node_setup.c, 301, Set: on/off client: 0x0103 pub addr: 0xCAFE
    <t: 578946>, main.c, 333, Config client event
    <t: 578949>, node_setup.c, 272, opcode status field: 0
    <t: 578951>, node_setup.c, 301, Set: on/off client: 0x0104 pub addr: 0xCAFE
    <t: 580617>, main.c, 333, Config client event
    <t: 580619>, node_setup.c, 272, opcode status field: 0
    <t: 580622>, main.c, 249, Configuration of device 0 successful
    <t: 580625>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 580682>, main.c, 118, Flash write complete
    <t: 583057>, provisioner_helper.c, 144, UUID seen: 0059FFFF00000000799C40D7D0823B74
    <t: 583060>, provisioner_helper.c, 95, UUID filter matched
    <t: 583652>, provisioner_helper.c, 259, Provisioning link established
    <t: 596413>, provisioner_helper.c, 254, Static authentication data provided
    <t: 608094>, provisioner_helper.c, 192, Provisioning completed received
    <t: 608097>, provisioner_helper.c, 197, Adding device address, and device keys
    <t: 608102>, provisioner_helper.c, 214, Addr: 0x0105 addr_handle: 1 netkey_handle: 0 devkey_handle: 3
    <t: 611926>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 2 remaining retries: 2
    <t: 611930>, main.c, 283, Provisioning successful
    <t: 611932>, provisioner_helper.c, 181, Provisioning complete. Node addr: 0x0105 elements: 1
    <t: 611936>, node_setup.c, 672, Configuring Node: 0x0105
    <t: 611939>, node_setup.c, 586, Config client setup: devkey_handle:3 addr_handle:1
    <t: 611942>, node_setup.c, 361, Getting composition data
    <t: 612007>, main.c, 118, Flash write complete
    <t: 661973>, main.c, 333, Config client event
    <t: 661976>, node_setup.c, 371, Adding appkey
    <t: 662898>, main.c, 333, Config client event
    <t: 662900>, node_setup.c, 272, opcode status field: 0
    <t: 662903>, node_setup.c, 382, App key bind: Health server
    <t: 664244>, main.c, 333, Config client event
    <t: 664246>, node_setup.c, 272, opcode status field: 0
    <t: 664248>, node_setup.c, 397, App key bind: Simple On/Off server
    <t: 664910>, main.c, 333, Config client event
    <t: 664912>, node_setup.c, 272, opcode status field: 0
    <t: 664915>, node_setup.c, 450, Setting publication address for the health server to 0x0001
    <t: 665849>, main.c, 333, Config client event
    <t: 665852>, node_setup.c, 272, opcode status field: 0
    <t: 665854>, node_setup.c, 476, Set: on/off server pub addr: 0x0101
    <t: 666827>, main.c, 333, Config client event
    <t: 666830>, node_setup.c, 272, opcode status field: 0
    <t: 666832>, node_setup.c, 487, Adding subscription
    <t: 667623>, main.c, 333, Config client event
    <t: 667625>, node_setup.c, 272, opcode status field: 0
    <t: 667627>, main.c, 249, Configuration of device 1 successful
    <t: 667630>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 667687>, main.c, 118, Flash write complete
    <t: 708783>, provisioner_helper.c, 144, UUID seen: 0059FFFF000000001967BC1B8F0FA045
    <t: 708786>, provisioner_helper.c, 95, UUID filter matched
    <t: 709091>, provisioner_helper.c, 259, Provisioning link established
    <t: 722488>, provisioner_helper.c, 254, Static authentication data provided
    <t: 734332>, provisioner_helper.c, 192, Provisioning completed received
    <t: 734335>, provisioner_helper.c, 197, Adding device address, and device keys
    <t: 734340>, provisioner_helper.c, 214, Addr: 0x0106 addr_handle: 2 netkey_handle: 0 devkey_handle: 4
    <t: 738288>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 2 remaining retries: 2
    <t: 738293>, main.c, 283, Provisioning successful
    <t: 738295>, provisioner_helper.c, 181, Provisioning complete. Node addr: 0x0106 elements: 1
    <t: 738299>, node_setup.c, 672, Configuring Node: 0x0106
    <t: 738302>, node_setup.c, 586, Config client setup: devkey_handle:4 addr_handle:2
    <t: 738305>, node_setup.c, 361, Getting composition data
    <t: 738369>, main.c, 118, Flash write complete
    <t: 788787>, main.c, 333, Config client event
    <t: 788790>, node_setup.c, 371, Adding appkey
    <t: 789524>, main.c, 333, Config client event
    <t: 789526>, node_setup.c, 272, opcode status field: 0
    <t: 789529>, node_setup.c, 382, App key bind: Health server
    <t: 816563>, main.c, 333, Config client event
    <t: 816565>, node_setup.c, 272, opcode status field: 0
    <t: 816568>, node_setup.c, 397, App key bind: Simple On/Off server
    <t: 818112>, main.c, 333, Config client event
    <t: 818115>, node_setup.c, 272, opcode status field: 0
    <t: 818117>, node_setup.c, 450, Setting publication address for the health server to 0x0001
    <t: 818985>, main.c, 333, Config client event
    <t: 818988>, node_setup.c, 272, opcode status field: 0
    <t: 818990>, node_setup.c, 476, Set: on/off server pub addr: 0x0102
    <t: 847852>, main.c, 333, Config client event
    <t: 847854>, node_setup.c, 272, opcode status field: 0
    <t: 847857>, node_setup.c, 487, Adding subscription
    <t: 849226>, main.c, 333, Config client event
    <t: 849228>, node_setup.c, 272, opcode status field: 0
    <t: 849230>, main.c, 249, Configuration of device 2 successful
    <t: 849233>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 849290>, main.c, 118, Flash write complete
    <t: 854734>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 885310>, main.c, 333, Config client event
    <t: 900819>, main.c, 312, Node 0x0100 alive with 0 active fault(s), RSSI: -59
    <t: 920267>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 985847>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 993344>, main.c, 312, Node 0x0105 alive with 0 active fault(s), RSSI: -39
    <t: 1051573>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1117284>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1146584>, main.c, 312, Node 0x0106 alive with 0 active fault(s), RSSI: -52
    <t: 1183096>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1228689>, main.c, 312, Node 0x0100 alive with 0 active fault(s), RSSI: -52
    <t: 1248929>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1314728>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1320740>, main.c, 312, Node 0x0105 alive with 0 active fault(s), RSSI: -43
    <t: 1380526>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1446203>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 1474202>, main.c, 312, Node 0x0106 alive with 0 active fault(s), RSSI: -59

    We are stuck for provisioning multiple client by last 5 days until not get solution.

    For the same i have created new thread in dev. zone will you continue here

    Thanks.

Related