Under Review
over 1 year ago

Need to turn on Mobile Connection to Download Fit file over Bluetooth

When a Connect Iq app wants to download a fit file stored on a Bluetooth connected mobile device, the download is not working anymore. You need to turn on the "mobile data connection" too to get it to work. Seems the localhost is not reachable over bluetooth only anymore.

Reproduceability: always

Affected apps: iqmapreceiver, gimporter, locus maps..

Connect iq sdk version: any latest

Devices: any (edge, fenix)

  • Hello Travis, thx for checking this out, let me explain one concretr use case for Android mobile devices

    1. Mobile has Cellular data disabled (would be a PASS condition)

    2. Mobile has Wifi disabled (would be a PASS condition)

    3. Mobile has Bluetooth enabled. Garmin device connected over Garmin Connect Mobile

    4. Companion app on Mobile installed. E.g iqmapreceiver. Running localhost webserver

    5. Garmin device has companion app installed, e.g. iqmapreceiver (app or widget)

    6.  Communication over http, working, localhost://127.0.0.1:<port>. Only fit download does not work, doesnt matter the file size

    Fenix API command

    var params =

                               {

                               "file" => fileName

                               };

                               var options =

                               { 

                    :method       => Comm.HTTP_REQUEST_METHOD_GET,

                    :responseType => Comm.HTTP_RESPONSE_CONTENT_TYPE_FIT

                };

                                            Comm.makeWebRequest

                                             (

                                                            url

                                                          , params

                                                          , options

                                                          , Lng.Method.method(:onReceivemakeFitFileRequest)

                                             );

    7. Fail

    Need to let on 1. Or 2. to succed with 6.

    Mobile: samsung s23 ultra, Android 13

    Garmin device: fenix 6 pro 25.10

  • I'm sorry, I need some clarification here so I understand the the scenario you are having trouble with:

    1. Mobile device has cellular data disabled
    2. Mobile device may have WiFi enabled or not, should not matter
    3. Mobile device has bluetooth enabled, and Garmin device is connected
    4. Mobile device has companion app installed
    5. Garmin device has correct app installed
    6. ConnectIQ app attempts to download a FIT file using a localhost URL, and presumably http (not https)
    7. FAIL?

    Is the companion app running a web server running on the mobile device? You mention localhost not being reachable, so this is the only thing that makes sense.

    There was a problem related to localhost requests on Android a while back. If memory serves, this isn't a thing on iOS as you can't start a web server on that platform at all, but I could be mistaken (never looked at any iOS stuff). I need to look to see what the actual issue was there and if it was resolved, but my gut says that this was not a thing that was supported.

    For completeness, could we get a specific device model and firmware version that the problem occurs on?

  • Reproduced on mobile OS: Android 12-13. Unknown behaviour on ios.