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

nRF51822 BLE - Android and iOS app development

Hi Nordic,

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.

Reference to Kristin post dated Nov 20, 2013 on topic: 51822 BLUETOOTH

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 abnormal behavior on devices?

Thank you.

Regards, Paul

Parents
  • Hi Paul

    What kind of phone are you using? With Android, you should be able to send 4 packets per connection interval. Normally, the connection interval should be 7.5 ms for Android phones, but for Samsung phones, this could be different.

    Are you feeding the android stack with packets fast enough to test the connection?

    I attach an example UART code that tests the throughput from Android to nRF51822. Perhaps you can try it and see what you find out. I also add the nRF51 UART example which should be the same as in the SDK.

    Please be noted that this is a very simple and ugly speed test, just to prove that we can send and receive up to 4 packets per conn interval both way. Sometimes you have to click send on the phone app twice, I don't know why the call back never arrived. Also if you change the number of packet to 1000 instead of 300, strange thing also happens on the phone, that not all 1000 packet was transfered (the call back was lost after a while). The easiest way to verify is to use a sniffer to see what is transfered on air.

    ble_app_uart - TestThroughPut.zip

    nRFUART_TestThroughPut.zip

Reply
  • Hi Paul

    What kind of phone are you using? With Android, you should be able to send 4 packets per connection interval. Normally, the connection interval should be 7.5 ms for Android phones, but for Samsung phones, this could be different.

    Are you feeding the android stack with packets fast enough to test the connection?

    I attach an example UART code that tests the throughput from Android to nRF51822. Perhaps you can try it and see what you find out. I also add the nRF51 UART example which should be the same as in the SDK.

    Please be noted that this is a very simple and ugly speed test, just to prove that we can send and receive up to 4 packets per conn interval both way. Sometimes you have to click send on the phone app twice, I don't know why the call back never arrived. Also if you change the number of packet to 1000 instead of 300, strange thing also happens on the phone, that not all 1000 packet was transfered (the call back was lost after a while). The easiest way to verify is to use a sniffer to see what is transfered on air.

    ble_app_uart - TestThroughPut.zip

    nRFUART_TestThroughPut.zip

Children
No Data
Related