This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to speed up NRF52832 mesh data

Dear Nordic.

We are using NRF52832. According to Mesh spec, It can send up to 380 bytes, So I sent Mesh Data(PAYLOAD) up to 380 bytes. It was successful, but the data was too slow.
It took about 3 seconds.

I found that it doesn't take long if the amount of data is small, but it takes longer as the amount of data increases.

Is there a way to speed up the data?
I referred to light_switch source.

  • Hi

    In our Mesh throughput tests here we've managed to get ~3.4kbps (that's kbits per second) point to point. 380 bytes will result to 3040 bits, so the transmission should take ~1 second in optimal conditions, however, you haven't specified how many hops your transmission is doing, etc. so depending on that, I think it should be possible to decrease the transmission time, at least somewhat depending on the testing environment. 

    I will need more information on your application and Mesh network in order to come with any specific advice.

    Best regards,

    Simon

  • Dear Simonr.

    See below for our environment.

    1. Two NRF52832 -Development Kits(server,client)
    2. Measurements at a distance of 20Cm

    Source Reference
    genic_onoff_server.c

    static uint32_t status_send(generic_onoff_server_t * p_server,
    const access_message_rx_t * p_message,
    const generic_onoff_status_params_t * p_params)
    {

    generic_onoff_status_msg_pkt_t msg_pkt;
    uint8_t data[379];
    memset(data,'K',379);

    if (p_params->present_on_off > GENERIC_ONOFF_MAX ||
    p_params->target_on_off > GENERIC_ONOFF_MAX ||
    p_params->remaining_time_ms > TRANSITION_TIME_STEP_10M_MAX)
    {
    return NRF_ERROR_INVALID_PARAM;
    }

    msg_pkt.present_on_off = p_params->present_on_off;
    if (p_params->remaining_time_ms > 0)
    {
    msg_pkt.target_on_off = p_params->target_on_off;
    msg_pkt.remaining_time = model_transition_time_encode(p_params->remaining_time_ms);
    }

    access_message_tx_t reply =
    {
    .opcode = ACCESS_OPCODE_SIG(GENERIC_ONOFF_OPCODE_STATUS),
    //.p_buffer = (const uint8_t *) &msg_pkt,
    .p_buffer = (const uint8_t *) &data,
    //.length = p_params->remaining_time_ms > 0 ? GENERIC_ONOFF_STATUS_MAXLEN : GENERIC_ONOFF_STATUS_MINLEN,
    .length = strlen(data),
    .force_segmented = p_server->settings.force_segmented,
    .transmic_size = p_server->settings.transmic_size
    };

    if (p_message == NULL)
    {
    return access_model_publish(p_server->model_handle, &reply);
    }
    else
    {
    return access_model_reply(p_server->model_handle, p_message, &reply);
    }
    }

    Except for the above part, We didn't modify it.

    Please tell me how to speed up data rate.

  • Hi

    Sorry about the late reply, but I had to wait for a reply from one of our Mesh experts before getting back to you.

    First off, in order to send data as fast as possible, you can send the next message straight away after getting the nrf_mesh_evt_tx_complete event. Mesh is not very well designed for large amounts of data transfers at a time, so by decreasing the amount of data you send to 11  bytes at a time, you should be able to increase the throughput somewhat as well.

    Alternatively, you can check out our Nordic Advertiser Extension (Instaburst) which is a drop-in replacement for the standard BLE Advertiser bearer for the mesh network. When enabled, all communication will happen through Instaburst instead of regular advertisers, yielding higher throughput, but breaking compatibility with some other Bluetooth Mesh implementations.

    Best regards,

    Simon

Related