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

Configuration Max- Min interval, supervision timeout for android

Hello,

I'm trying to configure the max -min of interval params and supervision timeout to obtain timeout of android = 1s.

i configure all parameters to run function sd_ble_gap_conn_param_update() . 

But it't only fit to some android phone. Although supervision timeout obtain timeout of android = 1s but sometime it's disconnected with phone. I don't know why? please help me!!

Parents
  • You need to see at the disconnect reason on your device

    in the ble_evt_handler you can see the log

    This will tell you why the phone disconnected.

Reply
  • You need to see at the disconnect reason on your device

    in the ble_evt_handler you can see the log

    This will tell you why the phone disconnected.

Children
  • hello, thank for your answer. The log show "Disconnected, reason 8. "  => BLE_HCI_CONNECTION_TIMEOUT. You know way to fix it.

  • There you go, The meaning is that the phone stopped responding to your device connection packets.

  • Hi, sorry for late answer, I am still struggling with this.

    More info about my casse:

    1. When I keep the phone (no matter IPhone or Android phone) as close as possible to the nrf51822, this problem never appears, but when I moved it further, just around 2-3 meters away, Iphone seems to have this problem, but Android still worked fine. 

    2. About interval connection, I set it to be 9 ms in Android and 24 ms in IPhone , since IPhone can not go down more than 24 ms. (I want it to be as small as possible). About supp_conn_timeout, I set it to be 1 s in android and 720 ms (as default) in IPhone .

    Could you please help me to find out what is the reasons for this error and how to fix this? 

    Thank a lot.  

  • Hi Tung,

    It seems to me that you are in a very radio noisy environment and other radio signals operating in the same spectrum. just two meters of connectivity is really bad with a line of sight. Are there a lot of devices around your transmitting packets?

  • Thank for your fast response. 

    Indeed, there are some devices around my table but all of them are nordic devices (same chip: nrf51822). The strange thing is: when I browsing around devzone, I got a recommend to change the xtal accuracy.

    I changed it from 

    NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM to 
    NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM. 
    And somehow, it works. Seems like the problem 0x08 does not appear anymore. 
    When I read more about this, some one said  that this could drift the timer over time. So when I use this for couple hour, the timer will be wrong or something? 
    I still very confuse about this. Is there any consequense when I config xtal this way? And there are several level of NRF_CLOCK_LF_XTAL_ACCURACY, from 20 to 500, how do I know which one is suitable for my design?