What causes (and how can I advise a customer to avoid) error -104 (BLE_CONNECTION_UNAVAILABLE)?

Hi,

I've got somebody using one of my watch faces who is consistently running into -104 (BLE_CONNECTION_UNAVAILABLE) errors. He has occasionally seen a good result, so the configuration and code is fine, but he (and he appears to be an isolated case) seems unable to consistently get background connections working.

Some background:

1. I schedule background calls every five minutes until I get a good result.

2. When I get a good result, I drop back to a call after roughly 24 hours.

3. If the scheduled call is unsuccessful, I revert to every five minutes until I get a good result.

4. This is mature code that is widely used (and I use myself) with no issues for the majority of users.

So...

It looks a lot like it is local settings that are conflicting with the watch / phone / network transit somehow.

  1. Are there any privacy settings on phone or watch that could be conflicting? (He has iPhone and has both of Connect IQ and Connect apps - ConnectIQ was marginally more reliable.)
  2. Are there any network access settings on phone that could be conflicting?
  3. Etc,

Thanks,

G

  • -104 is fairly common, and when you get it varies based on the phone and how far from the phone you are (BLE range which does vary by device).  

    You can see the state with Sys.getDeviceSettings().phoneConnected.  There's also a setting on device for "connected alerts" where you can see when the phone connects/disconnects.  With that a user can see how stable the phone connection is.  If I leave my phone on my desk and walk to the kitchen or garage, the connection may drop for example.

    To reduce the -104 errors, suggest the user keeps the phone close - in their pocket for example - and see if things get better.

  • -104 is fairly common

    Yes, it is, but it also would typically resolve itself over the course of 24 hours. This guy has been seeing weeks of failure.

    To reduce the -104 errors, suggest the user keeps the phone close - in their pocket for example - and see if things get better.

    Will do.

    G

  • Using a Samsung phone and with a couple different watches, with one I may lose the phone connection when I leave the room, and another, not until I leave the house.  And it's not just the phone - I have apps that use CIQ BLE to talk to a raspberry pi and I see the same type of thing. Some watches have better BT range.

    What type of watch and what type of phone is the user using?

  • I'm still trying to find out about the watch, but the phone is iPhone.