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.

Compiler/CC2640R2F: IOS device gets frequently disconnected on CC2640 eval board with simple peripheral application.

Part Number: CC2640R2F


Tool/software: TI C/C++ Compiler

Hi Team,

We tested our setup with android and as well as IOS.

TESTING WITH ANDROID:  getting connected and working fine with android device.

TESTING WITH IOS: getting disconnected immediatly after connecting with IOS device .Could not debug the exact problem.Can you please help me out here.

  • Hi Manisha, 

    Which iOS version are you using? Have you made any modifications to the simple_peripheral application?

    Thanks, 
    Elin

  • Please check below text for the details of the project have been asked
    LAUNCHXL-CC2640R2F eval board 
    Application  :  simple peripheral
    SDK Version :  simplelink_cc2640r2_sdk_2_30_00_28
    BLE version  :  4.2
    IOS version  :  12&13
     
    Please refer the below attached image for the error we are getting while testing with ios device.

     

  • Can you please provide me suggestions regarding this issue!

  • Hi Manisha, 

    Have you made any modifications to the simple_peripheral project?

    Which iOS application are you using? 

    Thanks, 
    Elin

  • Project Name: Quin Sensor

    Annual Qty: 15k

    We have not done any changes from BLE side, added accelerometer sensor and gyrometer sensor.

  • Hi Team,

    Please find the attached images for recorded information about this specific issue(disconnecting in ios) using sniffer tool. But we are unable to find out why that behaviour is seen.Can you help in finding out the same.

    IOS_Capture.psd

  • Please check below text for the details of the project have been asked
    LAUNCHXL-CC2640R2F eval board 
    Application  :  simple peripheral
    SDK Version :  simplelink_cc2640r2_sdk_2_30_00_28
    BLE version  :  4.2
    IOS version  :  12&13

    Mobile Application: LightBlue
    In previous replies you can find the image and .psd file,that we captured while debugging with sniffer tool.
  • Hi Manisha,

    Thanks for the update.

    There is a newer version of the SDK available here: http://www.ti.com/tool/SIMPLELINK-CC2640R2-SDK
    Do you see the same issue when you are testing with the latest version of the SDK?

    Thanks, 
    Elin

  • Hi Elin,

    On this (simplelink_cc2640r2_sdk_2_30_00_28)  sdk version ,We have implemented our business logic and power management stuff. As we are planning for production for 15k units ,at this point of time migrating to newer version is not feasible.

    Looking forward for the solution with sdk_2_30_00_28 version. But, we can check with this newer version. 

  • Hi Manisha,

    Thanks for the clarification. 

    Have you tried using another BLE scanner app? Are you using the same app for both android and ios?

    When does the ios phone disconnects from the device? Does it happen at the same place every time?

    Thanks, 
    Elin

  • Hi Elin,

    We have tried with other BLE apps( BLE scanner and also BLE Hero) and we used same app for both android and ios.

    NEW UPDATE:

    Please find the attachment for the new sniffing log which have been recorded today .

    Nokia2.psd

    Device has been checked with android,ios

    observation in android: 

    • When the device is kept nearer, ACK status is OK and it is connected always .
    • When the device is kept little far, ACK status is RETRY for 2 or 3 times and then getting OK.The device is staying connected.
    • when the device is moving far, we observe the ACK status as RETRY and after continuous RETRY, it is getting disconnected. We are getting FCE error before disconnection.

    Can you please suggest me the reasons for this specific observation.Can you please prioritise this, as the device is for production. Thank you!

  • Hi Manisha, 

    At what distance do you measure the "far" and a "little far"? Are you testing in a busy area?

    I'm looking through the sniffer log you attached, and I'll try and reproduce the issue. 

    Thanks, 
    Elin

  • near => 1 or 2 feet

    little far => 10 feet

    far=> 20 feet

    we are testing in our office, not much busy area.Can we know what happens if testing is done in busy area?

  • Can you also provide a sniffer log where it works as expected?

    I tried to reproduce the issue using the pre-built simple_peripheral file using the LightBlue app on an iPhone, but I managed to stay in the connection even when walking approx 20 m from the Launchpad. Can you try and comment out the code you have added to the project and see if you still can reproduce the issue? If no, can you add the accelerometer and the gyroscope one by one to see which of them are causing the problem? 

    Thanks, 
    Elin

  • Hi Elin,

    Please find the below sniffer log, where device works as expected.If you observe this log, we are not getting any RETRY from master continuously, always the communication is perfect.This is tested within 2 feets. We are expecting the same scenario with long distance as well.

    expectedconnectivity.psd

  • Hi Manisha, 

    Thanks for the log. 

    Did you perform the tests I suggested in my previous post? What was the result, were you able to reproduce the issue using the simple_peripheral project without modifications?

    Thanks, 
    Elin

  • Hi Elin,

    We are debugging ,could not find out the reason for this disconnection.

    I just want to know is there any specifications regarding connection parameters?

    If yes, what are those!

  • Hi Manisha,

    Did you test with the default simple_peripheral application and see if you see the same issue as I mentioned in my previous posts?

    Like I mentioned before, I don't see this issue when testing with the pre-built simple_peripheral hex file, so it would be interesting to know if you see the same issue when using the simple_peripheral project without modifications. 

    Thanks,
    Elin

  • Hi Elin,

    Have tested with pre-built simple_peripheral hex file and didn't find this issue and we have been debugging by disabling extra features which were added , indeed could not find the reason behind .Part of debugging , want to know whether connection parameters effect this communication which leads to disconnection.

  • Hi Manisha, 

    I'm glad to hear that you were able to make it work using the prebuilt simple_peripheral project!

    Did you try adding one task at the time? First, doing everything related to the accelerometer and having everything with the gyroscope commented out, and then commenting out everything with the accelerometer and doing everything related to the gyroscope. What did you see? 

    Please refer to the User's Guide for more information about the connection parameters.

    Thanks, 
    Elin

  • Hi Elin,

    Have been debugging with all the possible ways.As you said i enabled each interrupt at a time and tested it, suprisingly it stays connected.Somewhere i feel that the more interrupts at a time is causing issue.so, to resolve this i want to disable rest of the interrupts while isr is handling the interrupt.For this task to be done, Can you suggest me changes i need to do .

    Please suggest me if any clue regarding this.Thankyou!

  • Hi Elin, 

     The code looks stable with android device now, but could not get the same stability with ios device. What could be the reason for this !

    When testing with ios device , we get "error: The connection has timed out unexpectedly".

    Assuming it could be issue with connection parameters, have changed them and checked for stability but could not achieve it.

    If it is issue with connection parameters,Can you please suggest me the exact parameters which gives stability both with android device and also ios device.

    If not, what are the reasons for this specific issue!

  • Hi Manisha, 

    Did you check with ROV, as I mentioned in my previous post? It would be interesting to see if you have enough stack to support both tasks. 

    Which connection parameters are you using now? How many combinations of connection parameters did you test, and what was the result with each parameter? 

    Thanks, 
    Elin

  • Hi Ellin,

    Couldn't try with ROV as my device is completely enclosed.Not able to connect debug probe to device.

    Three different combinations have been tried by me(this has been tried to increase stability in ios)

    ADVERTISING_INTERVAL                      152.5

    MIN_CONN_INTERVAL                            12

    MAX_CONN_INTERVAL                           24

    SLAVE_LATENCY                                     0

    CONN_TIMEOUT                                      500

    SBP_PERIODIC_EVT_PERIOD               600

    //////////////////////////////////////////////////////////////////////////

    No stability observed using these

    ADVERTISING_INTERVAL                      152.5

    MIN_CONN_INTERVAL                            16

    MAX_CONN_INTERVAL                           80

    SLAVE_LATENCY                                     1

    CONN_TIMEOUT                                      550

    /////////////////////////////////////////////////////////////////////////

    This default combination is giving stability in android but little less in ios.

    ADVERTISING_INTERVAL                      160

    MIN_CONN_INTERVAL                            8

    MAX_CONN_INTERVAL                           8

    SLAVE_LATENCY                                     0

    CONN_TIMEOUT                                     1000

    SBP_PERIODIC_EVT_PERIOD               600

  • Hi Manisha,

    Has this been tested on a custom board or the LaunchPad?

    If you have used the custom board:
    Use the LaunchPad and see if you can reproduce the issue. 

    If you have tested with the LaunchPad:
    Please provide the changes you have made so I can reproduce the issue here and perform tests  

    Thanks, 
    Elin

  • Hi Elin,

    Disconnect issue using,

    Android device : got resolved, could get stability

    IOS device : still issue exists,but far better than before.

    This is achieved by handling interrupts properly in the code. Disabling the specific interrupt when it is in ISR and enabling it when the periodic task gets executed.

    ISR()
    {
    //Disable the interrupts
     
    //flag=true to trigger the Task()
    }
    Task()
    {
    //check for the flag
     
    //if flag is true, send message through BLE
     //clear pending interrupts
    //Enable the interrupts
    }
     

    By this implementation,we could achieve the stability. Please, let me know if any better option to resolve this specific issue. 
    I am very thankful for your support and would like to take your support in future as well.