51822 bluetooth

Hi.

Using 51822 with BLE stack, I was faced with the problem of low transfer rates (5kb) on my android device (phone). It is very slow.

Can work 51822 with standart Bluetooth (not BLE)?

Parents
  • FormerMember
    0 FormerMember

    Hello,

    Unfortunately, the nRF51822 does only work with BLE. Your data transfer rate is a little low, which Android version do you have?

    By theory, with BLE, you can have maximum 6 packets per connection interval and minimum 7.5ms connection interval. This results the maximum throughput of (1000/7.5) * 6 * max_payload_size. Currently the nRF51822 supports max_payload_size = 20 bytes. (MTU = 23 byte, 1 byte opcode, 2 byte handle).

    So the maximum data throughput that the nRF51822 can achieve is in best case = (1000/7.5) * 6 * 20 = 16 kB/s.

    However, usually you will not be able to achieve this speed due to limitations on the host. On iOS and Android usually you will have maximum 4 packet per connection interval. On Android devices you can get as low as 7.5ms connection interval. On iOS device, you can get something around 20 ms connection interval.

    On the test here with a Samsung S4 running Android 4.2.2, we transferred 20kB in ~1850ms (~10.8 kB/s) from the nRF51822 to the phone.

    Throughput on the other direction should be very similar.

    How quick the host can support depends much on the available resources on the host stack, if it have to handle several slaves which also require high bandwidth, the throughput for each will be reduced (less packets per connection interval).

    Same apply for PC, not all PC BLE stack and driver support 6 packets per connection interval and 7.5ms connection interval.

    Also note that with Android 4.3 on S4, the minimum connection interval is 30 ms, leading to lower data rate.

    Regards, Kristin

  • Hi Kristin,

    We are working on Android and iOS apps. Currently using S3 with Android 4.3 and Note to communicate with nRF51822. Baud rate of 19200bps for our serial communication.

    Q1. How can we synchronize the transmission of 4 packets per connection interval? Based on sample code nRFUART, do we send out consecutively packet of 20 bytes after previous packet was sent out using writeRXCharacteristic ? Or should it pause for 10ms before sending out the next packet?

    Q2. We have encountered abnormal behavior on S3 and Note after using writeRXCharacteristic at time interval of 20ms or lower. Is there a way to read transmission status in Android app before using writeRXCharacteristic to send out 20 bytes?

    Q3. In our project, data size transmitted can be more than 100kbytes. Is there any further recommendation on Android and iOS app that we need to take note in order to increase data rate and avoid abnormality behavior on devices?

    Thank you.

    Regards, Paul

Reply
  • Hi Kristin,

    We are working on Android and iOS apps. Currently using S3 with Android 4.3 and Note to communicate with nRF51822. Baud rate of 19200bps for our serial communication.

    Q1. How can we synchronize the transmission of 4 packets per connection interval? Based on sample code nRFUART, do we send out consecutively packet of 20 bytes after previous packet was sent out using writeRXCharacteristic ? Or should it pause for 10ms before sending out the next packet?

    Q2. We have encountered abnormal behavior on S3 and Note after using writeRXCharacteristic at time interval of 20ms or lower. Is there a way to read transmission status in Android app before using writeRXCharacteristic to send out 20 bytes?

    Q3. In our project, data size transmitted can be more than 100kbytes. Is there any further recommendation on Android and iOS app that we need to take note in order to increase data rate and avoid abnormality behavior on devices?

    Thank you.

    Regards, Paul

Children
No Data
Related