BLE_HOST_TIMEOUT - intermittent issue with MakeWebRequest

Over the past month I have lots of issues with BLE for makeWebRequest. I develop apps that use makewebrequest to request data from a public web server, using BLE through Garmin Connect Mobile. It has been working fine for many years but about 1-2 months ago I started to get lots of connectivity issues. makewebrequest times out and returns -2 (BLE_HOST_TIMEOUT)

The only way to resolve the problem is either to open or restart the Garmin Connect Mobile app. it is not an issue with Bluetooth connectivity. I always check the status of the Bluetooth connection before i make a call to makewebrequest. I have also verified the watch is connected to the mobile when the problem occurs (I can receive notifications). This is clearly not a problem with the BT connection itself. as soon as I open the GMC app, the watch syncs and the BLE connection starts working again (but only temporary). 

The BLE_HOST_TIMEOUT problem is unfortunately very intermittent. Sometimes it would work for hours and sometimes I get it more or less all the time. I have noticed that the problem is more frequent if I use other apps on the mobile phone (e.g. browse the Internet), and also when the mobile phone roams between wifi and 3G/4G connectivity. Also, it happens very frequently when the watch has been out of BT reach and then get back its BT connection with the phone. 

My main assumption is that something broke with the "BLE Internet gateway" in GCM after a recent update (the app looks very different now vs before so I assume a major deploy was made just before the summer. 

Is there anyone else here seeing the same issue lately? Also, do you know where I can get in touch with the GCM developers to ask them directly? I have posted tickets previously in the GMC group here but never gotten any responses back

Device tested: Fenix 5  (Sw version 25.00)

iOS 15.6.1

GMC ver. 4.58.2.2 

  • Something has changed in last SDK/CIQ  Do you call webReq few times before revive data?

  • Hi, and thanks for responding. On my watch face, I call webreq only once per five minutes, and from my activity app only once per minute. In the activity app I get the call-back from the webreq (after a pretty long time), with responseCode = -2 (BLE_HOST_TIMEOUT) and no data.

    with the watch face, the call-back function never triggers, probably the background process timed out before the makewebrequest returned with BLE host timed out. 

    The only way to resolve is to go in to the Garmin connect app, or restart it. Then the watch synchronizes with Garmin Connect and the BLE connection appears to get re-initialized. I never get a bluetooth error, the BT connection is fine, but there seems to be some issue with the BLE "bridge". 

    Perhaps there are two issues here:

    First, something is really not working well with BLE through Garmin Connect, and this problem started just before or during summer. Probably related to a GC or iOS update. The GC team needs to fix this, the problem is that I really don't know how to reach them.

    Second: it is not ideal that makewebrequest never calls the call-back function. The background process should perhaps not time out before the makewebrequest responds back. This creates loads of problems with my apps that use webreq in the background.       

  • This could have nothing to do with CIQ.  I ran into a case just a week or so back where there were issues with both my ISP and the server where I was getting odd errors.  Since then all my apps that do make web requests have been fine

  • Hi Jim, there is no issue with my ISP nor the web server (it's my web server). Those were my first thoughts. The problem always resolves as soon as I go into GC, immediately. The issue is clearly with the BLE connection between the device (Im testing on a Fenix5) and the mobile (testing on iOS)

  • well, it could be something else on the mobile that disturbs the connection, but nothing that I can think of. Again, the problem always goes away as soon as i open GC. 

  • The times I see -2 are when I'm at a borderline BT range between the Garmin and my Phone.  Anything change as far as your garmin's FW (like a BLE update)?  I run a WF with a background service to get weather data that I've run for weeks without issue (except the one I mentioned with my ISP/Data provider)

  • Thanks for replying Jim. I should perhaps try to test with another mobile and another watch, to see if the issue is with my mobile or watch. However, I do get a lot of support requests from people with similar problems but its hard to know if its the exact same issue. Since I don't get any response back on my webrequest (background times out before webrequest times out) its hard to catch the error and display some informative error message 

  • I can't recall the last time I got a support request like yours for any of my apps that do makeWebRequest calls.  I use Android, but I doubt that's the case with all the users.

  • okey. I will try to test with another iOS mobile and another watch, to see if its device/mobile specific. 

  • Have you had any success testing with other devices? I'm not aware of any reports of this recently, but based on what you're describing, it sounds to me like a potential Garmin Connect Mobile issue (aside from the case where the device and the phone are too far apart to maintain a BLE connection).

    I'm also curious whether the complaints you've received from users are limited to a specific device or set of devices.