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.

Doubts about BLE capacity.

Other Parts Discussed in Thread: CC2540, CC2564, CC2560

Hi,

 

I have one machine that has 8 sensors with 12 bits ADC and It samples the signal with 6Ksps . Each sensor will have your own wireless interface. I would like to question if is possible do it with Bluetooth low energy using a CC2540 chip? If not, what is the chip suggest for this application? Thanks!

 

Best Regards

Frederico

  • Hi Frederico,

    So, if I understand correctly, you want 8 sensors (each with a separate radio) to transmit to one master? If so, the CC2540 would work for the sensor side, it has an ADC that will do 7.5 ksamples/s on its 12-bit setting (have a look at the data sheet at http://focus.ti.com/lit/ds/symlink/cc2540.pdf to see if the ADC fits your accuracy requirements).

    On the collector side, you would need to have 8 connections open at the same time. CC2540 does not support this. I would suggest using a CC2564 (dual-mode device supporting both classic Bluetooth and BLE). Note that this will not be out for another few months, but it is similar to the CC2560 except that it also supports BLE.

    The aggrigate bitrate is on the high side (12*6 ksamples*8 = 576 kbps). The raw bitrate of BLE is 1 Mbps, but of course there is some overhead.The alternative would be to go for Bluetooth EDR at 3 Mbps. For that, you should look at CC2560.

    Karl

  • Hi,

    I´m thinking not open 8 connections at same time but open one connection per time and transmit the buffered data using CC2540 like example below:

    "I accept 100 ms delay, so I will divide this time for 8 sensors therefore each sensor has 12.5 ms of connection . The software will store 100ms*6 ksample*12 = 7200 bits. I need transfer this information at 12.5 ms, so, considering the bitrate of BLE is 1 Mbits, the sensor will send the data at 7.2ms (without overhead). After the master close connection and open another connection with next slave and so on. "

    => There is "connection time" and "overhead" that decreases the time transfer, how much are these times typically?

    Other question:

    Can I use CC2564 (when it is released on the market) working as master using a BLE protocol to communicate with the slaves designed with CC2540 connected at same time?

    Frederico

  • Hi Frederico,

    If you are going to open them one at a time, then you can use CC2540 on both ends of the link. The CC2540 can be slave or master, but right now it cannot have more than one connection open at once in the master role.

    The connection time depends on the duty cycle of scanning on the master and advertising on the slave. If you run both at 100%, they will find each other very quickly (a few ms), as there are only 3 channels used for connection setup in BLE.

    The CC2564 can communicate with several CC2540 slaves, keeping more than one connection open.

    Karl

  • Hi Karl,

    At one connection what is the maximum data packet size?

    Frederico 

  • Hi Frederico,

    The maximum payload size for a packet is 27 bytes.

    Karl

  • The maximum usable data is 19 byte in the case of the devkit samples (because of offset and other header data) - there are some constants which permits changing the maximum size but I hadn't succeded with it (you can check the Changing MTU size thread as well).

    If I tried to send more data than 19 byte I got error ATT/GATT and the call never reached my Profile_ReadAttrCB functions. 

    You can use the ATT Read Blob Request (0xFD0C) HCI command to ask longer data - this basically will cut your data in N requests (of 19 byte or more if you succeed changing the size). The request contains the offset in your data buffer. The offset is 2 byte, tough TI says the limit is 512 I managed to write even 2k - don't know if this is a feature or a bug :) Karl if you can answer this would be nice since I also need to send/receive longer data (for me speed is not a real issue but in special cases I have to download, upload 1-2k of data) and i don't want to build a solution on a possible bug ...

    B.


  • The GATT spec allows for a maximum attribute length of 512 bytes. It is possible that our BLE stack is not enforcing this maximum size of 512 bytes for an attribute; however this would violate the specification and may cause interoperability issues.

    Your best bet would just be to split your data up into multiple attributes and have you application handle fragmentation and re-fragmentation.

  • What is the maximum payload of each connection interval? 27bytes or more if the minimum connection interval is 20ms?

    Thanks in advance.

    Patrick 

  • From my experience the maximum usable payload is 19 bytes, however depending on the type of transmission mode i.e. Notify / Indicate / Read / Write more than one packet can be sent per connection interval. From other posts supposedly 4 Notifications can be sent per connect interval. In practice I found that anything more than 2 would cause problems in my application due to overhead, requirement for reliable comms etc.

    At present I get 2-4KB/s for a data streaming app. Other posts by TI engineers on this topic have indicated 8KB/s is the max. In reality I don't think the thread starter can even get close to the performance he is looking for unless the central device is some other device capable of 8 simultaneous connections at 8KB/s each.

  • Michael,

    Thanks for your information. It is very useful. I just get the information from TI, it should support 4 packets with 20bytes payload per second, and support 4 Read/Write type packets per connection. I wonder if it is true. 

    BR,

    Patrick 

  • Hi,

    The SIG has a table up showing a maximum BLE throughput of 200 kbps (25 kBytes/s), and this is the maximum theoretical throughput (with infinitely fast processing, zero switching times ie), so 8 kBytes/s from 8 sensors seems impossible to get with BLE by a good margin. Even for "classic" Bluetooth Basic Rate, this might be close to the edge of what is realizable (I think I've heard max 750 kbps throughput, but this was for point-to-point, and I'm pretty sure that it is less efficient with more devices). So, you might even have to go to EDR to get this kind of performance.

    Best regards,

    Karl

  • Hi Karl,

    The last information that you wrote is very useful. Thanks!

    Best Regards

    Frederico

  • Hi Karl,

    Can you provide a link where the SIG has the table containing the max BLE throughput?

    Karl T. said:
    The SIG has a table up showing a maximum BLE throughput of 200 kbps (25 kBytes/s)

    I could not find it in the 4.0 core specification.

    br, rider

  • How should the peripheral be programmed to handle Read Blob requests? When I use the GATT_ReadLongCharValue with the BTool, I get a return sataus of 0x1A (The Procedure is complete), but I get no data! And my read callback is never called.