This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem sending 20 bytes of data

Other Parts Discussed in Thread: CC2540, CC2640

Hi,

I successfully modified the simpleBLEperipheral code to support two characteristic of 20 bytes. I changed char 5 to 20 bytes and made char 4 also 20 bytes. Then i tried (using periodic task) copying char 5 value to char 4 (which has notification enabled). All of these was default connection interval parameters. I was able to receive notification every 5 seconds. This notification would show all 20 bytes 

Next I tried reducing the connection interval. Basically i was trying my code to get close to "". 

With all the trial and error, i ended up sending 12 bytes by calling periodictask every7ms and connection interval of 10ms, just as mentioned in the above example. When I try going beyond 12 bytes, i dont see anything on lightblue app.

I also looked into forum and found  . By this post i understood that we have to keep buffer full so that when the next connection event takes place it sends all the bytes.

Untill now i went step by step and it worked for me. I also noticed that in the 10ms 20bytes example there is no simpleGATTprofile.c attached. Am I missing something.

Please help.

Thanks

  • Hello Spandan89,

    The aforementioned example uses the API directly, it's not tied to the SimpleGATTProfile.

    I'm not sure how you are getting a 10ms connection interval on iOS / LightBlue. I suggest using a BLE air sniffer or doing the example with another CC254x peer device.

    Best wishes
  • Hi JXS,

    I think my connection settings are not correct. Can you please throw some light on relationship of following.
    1. minimum connection interval that can be supported by either party (client or server)
    2. the rate of periodic event is called and
    3. number of bytes and packets we are sending per connection event

    Is there any document explaining these things. I've already read the user guide swru271 but didnt get much help. Can you confirm if the data throughput example works well with lightblue app? (it doesnt work for me.)

    Thanks.
  • No, that example is not made to work lightblue or any mobile device. I would recommend reading through the software developer's guide: http://www.ti.com/lit/swru271

    1. TI devices can support the minimum connection defined by the BT spec. Different mobile devices and operating systems impose their own restrictions.
    2. You can set this by configuring the the periodic timer interval. This is described in section 4.4.1 of the SDG. The real-time interval at which the application processes may not be equivalent to the interval you are setting since the stack processes at a higher priority than the application. This is described in section 3.2 of the SDG. In general, if you want the application to process as quickly as possible, you should set the timer interval to 1 ms.
    If you really need this type of processing, it would make sense to use the CC2640 which uses an RTOS.
    Regardless, this type of throughput won't be possible when connecting with a phone because of the additional restrictions the phone imposes.
    3. This again depends on the phone / OS. On the TI side, this number is "as many will fit in the connection interval." This assumes overlapped processing is enabled: processors.wiki.ti.com/.../OverlappedProcessing