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

What will happen when device moves in and out of range rapidly

Hi

we are implementing a system where in an iOS app, we use the ranging functionality with iBeacons. We read device characteristics when the app is in background.

A side effect of this might be that, when we move in and out of range, and as setting up a connection and reading characteristics can take a few seconds, something might go wrong.

We have seen devices that seem to be stuck in the 'connected', and never get a disconnected event.

Is this possible? What can happen in this use case? What extra error states should I handle? Should I implement a hardware watchdog for this?

  • You should add some information like sniffer logs that show what you are doing. This will help us help you better.

  • Well the problem is that it is very hard to reproduce the issue. So it was more a general question to give me some direction.

  • A sniffer trace still helps as it gets information about the GATT Characteristics that are present, which ecosystem (iOS/Android etc) are you seeing this issue. For example if the "Service Changed" Characteristic is present, every connection will require a Service Discovery which will take a few seconds (which will impact your application latency). The number of packet misses that you have will indicate link quality and the goodness of your antenna design. The connect request packet will contain information on the supervision timeout used and the default connection interval. Using the GAP Preferred Peripheral Connection Parameters and changing the link timing will allow you get better latency for your application.

    In short a lot of stuff can happen and a lot of improvements are possible.

    If you need one on one support due to confidentiality please as your question in the support portal.

Related