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

please help increase the through-put of my firmware

I am a newbie to Nordic chips and tools and new to bluetooth. My company is doing a BLE sensor. We have a prototype board ready and I am trying to do some firmware for it.

My boss gave me a copy of development environment, which a previous employee in my company used for nRF51822 but with different sensor. So basically it is almost same for the firmware development view. I have tried to modified the existing code to feed it with fake sensor data, compile the existing code. According to what my boss told me, I firstly burnt the S110 softDevice, then compile and download the firmware to 51822 in MDK-5.  It works !   I could receive the fake sensor data through BLE GATT characteristic notification values on Bluetooth Reader and other tools.   The only problem is that the data throughput is very low.  

I used a very simple loop to send Gatt notifications, got fewer than notifications per second, or  only less than 400 Bytes/second.

The general firmware loop is as following:

void sendOnePacketToBle(unsigned char *pData, int len)
{
    while(1)
    {
        if(ble_nus_string_send(&m_nus, pData, len) == NRF_SUCCESS)
        {
            break;
        }
        delay();
    }
}

main()

{

unsigned char[] sampleData={'0','1','2','3''4','5'};

    while(1){

        sendOnePacketToBle(sampleData, 6);

    }

}

I am curious why the throughput is so low.   Is it related to the SDK or SoftDevice?      Does the SoftDevice need any configuration to get a higher throughput?  If yes, could you tell me how to do it?

By the way, is there any way to know which SDK version I am using in this development platform?  I am curious whether it is possible to change to any other SoftDevice version, and how to change it.

Thanks,

Jun

Parents Reply Children
No Data
Related