This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Connection interval problem

I'm facing a strange problem that I don't really understand:

I'm using 51822 (s130) on a custom board to communicate with iPhone 5S. The parameter that is able to establish a stable connection so far is as follow:

#define  MIN_CONN_INTERVAL           MSEC_TO_UNITS(504, UNIT_1_25_MS) 
#define  MAX_CONN_INTERVAL           MSEC_TO_UNITS(780, UNIT_1_25_MS)
#define CONN_SUP_TIMEOUT             MSEC_TO_UNITS(4000, UNIT_10_MS)
#define SLAVE_LATENCY                0  

Instead of value pair 504/780 (for MIN/MAX interval), I have tried 500/1000, 600/900, 750/1125 etc. but no other value pair seem to hold connection. When I used these values the connection usually only last for a couple of minutes then disconnected.

Apple suggest Interval Min ≥ 15 ms (multiples of 15 ms) for establishing and holding a connection successfully.

504 / 1.25 = 403.2 is actually NOT multiples of 15ms, while 750 / 1.25 = 600 satisfy this. But why does 504 /780 actually work? not 750/1125? What other reasons could cause constant disconnection?

Thanks for help!

Parents
  • First problem is that even Apple don' follow their own recommendations. They are not updating it either, they basically don't care nowadays. Secondly all rich OS platforms like Android/iOS/Windows don't like long connection intervals. They don't like super short either, so the best is to settle with their typical value (iOS natively 30ms, Android 48.75ms, Windows 50 or 60ms - don't remember right now). If you really want to save some power by going beyond 100ms then you are in the shadow area of try and error. Which is what you experience right now I believe. I would say you should rather feel lucky that some values work, regardless how "random" and illogical they look;) I would personally consider settling down to default min = 30ms max = 60ms and use slave latency to really save power (you should be fine to set values like 8 or even more which would effectively bring you into 400-1200ms range).

Reply
  • First problem is that even Apple don' follow their own recommendations. They are not updating it either, they basically don't care nowadays. Secondly all rich OS platforms like Android/iOS/Windows don't like long connection intervals. They don't like super short either, so the best is to settle with their typical value (iOS natively 30ms, Android 48.75ms, Windows 50 or 60ms - don't remember right now). If you really want to save some power by going beyond 100ms then you are in the shadow area of try and error. Which is what you experience right now I believe. I would say you should rather feel lucky that some values work, regardless how "random" and illogical they look;) I would personally consider settling down to default min = 30ms max = 60ms and use slave latency to really save power (you should be fine to set values like 8 or even more which would effectively bring you into 400-1200ms range).

Children
Related