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

Troubles with bluetooth syncing - GDIService vs vivofit

I've tried to investigate a problem related to that sometimes the vivofit will connect and sometimes it don't. So I've run logcat and found that the GDIService seems to also listen for "classic connection"? I only has paired a vivofit and assume its using bluetooth LE, why is the gdi service listening for classic connection and the error seems not to be catched by the gdiservice?

E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): activate: unable to accept connection
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): java.io.IOException: read failed, socket might closed or timeout, read ret: -1
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:560)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:537)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at android.bluetooth.BluetoothSocket.accept(BluetoothSocket.java:395)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:131)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:117)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at com.garmin.android.deviceinterface.connection.btc.AcceptBluetoothClassicConnection.activate(AcceptBluetoothClassicConnection.java:69)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at com.garmin.android.deviceinterface.connection.AbstractConnection$1.run(AbstractConnection.java:323)
E/GDI#AcceptBluetoothClassicConnection_1100340832(27853): at java.lang.Thread.run(Thread.java:841)


It seems like the GDIService is able to sync in the background without starting the main app, it would be nice if a notification was available too give some feedback?

In the logcat log I also see I/com.garmin.android.apps.connectmobile.ForegroundListener(17898): went background
D/GarminConnectMobileApp(17898): Background
V/TMP#DeviceManager(17898): setApplicationVisibility(): FYI - Unable to execute operation. Invalid unit ID (-1).


___
I'm using v2.7.3 of the app.
Android 4.3 SDK 18
  • Former Member
    0 Former Member over 10 years ago
    I only has paired a vivofit and assume its using bluetooth LE, why is the gdi service listening for classic connection

    Because, if a customer purchases a Garmin device that uses BT Classic, GDI must be able to perform a handshake and communicate with the device when it is being paired outside of the app. (BT classic pairing is still performed outside of the app, while BLE pairings should be performed from within the app.) The stack trace, below, is shown once a BLE connection is made (for example, with the vivofit) and we know a BT classic connector is no longer necessary. Having multiple connections (BLE and BTC) is in the works. :) The stack trace below isn't really an error, but can be treated more of "parting words" from the Android bluetooth stack.

    It seems like the GDIService is able to sync in the background without starting the main app, it would be nice if a notification was available too give some feedback?
    Good idea! Would you like to an Android notification when this is occurring?
  • Good idea! Would you like to an Android notification when this is occurring?


    Yes I would like that, but i most of the time start the app first and then sync the vivofit (so the in app notifications are sufficient here). Since there sometimes are problems with the connection to various services on garmin connect, maybe some status indicators should be available for feedback to the user within the app.
  • Former Member
    0 Former Member over 10 years ago
    I can connect each time with my vivofit to my Acer E700 and upload.

    It uploads the info with no problems at all but then disconnects from the server with a red bar at the bottom of the app.


    I can do this 3 times a day and still get the same error.
    Data is always uploaded and is correct.

    Info from phone.
    bluetooth friendly name: vívofit, product number: 1837, software version: 360, device name: vívofit, device model name:

    ---Android Device Info---
    Ver. Release: 4.4.2
    Ver. SDK: 19
    Ver. Codename: REL
    Locale: en_GB
    Manufacturer: Acer
    Brand: acer
    Model: E39

    This is info each time:

    ---Sync Info---
    ******************** SYNC RESULT ********************
    Upload Status=SUCCESSFUL
    Download Status=FAILED [Unable to download file content for deviceId=3894594324. Invalid download response from server.: jav...]
    Time Sync Status=SUCCESSFUL
    Overall Sync Status=FAILED
    *****************************************************
    SYNC#DeviceSyncUpload:
    LISTED { listed=1512ms }
    - 6 (80/MONITORING_B/590B): ARCHIVED { extracted=2445ms posted=1563ms archived=198ms }
    - 7 (80/MONITORING_B/979B): ARCHIVED { extracted=3718ms posted=2043ms archived=223ms }

    #Auto Upload=true
    #Types=[32] | [FIT_TYPE_32, FIT_TYPE_4]
    *****************************************************
    SYNC#DeviceSyncDownload:
    BROWSED { browsed=1027ms }
    - 103297617 (FF/DEVICE_SETTINGS): DOWNLOADING FAILED [Unable to download file content for deviceId=3894594324. Invalid download response from server.: java.lang.Exception: Invalid download response from server.
    at com.garmin.android.apps.connectmobile.sync.FitDownloadStrategy$1.onQuerySuccess(FitDownloadStrategy.java:63)
    at com.garmin.android.apps.connectmobile.sync.FitDownloadStrategy$1.onQuerySuccess(FitDownloadStrategy.java:31)
    at com.garmin.android.apps.connectmobile.protobuf.QueryManager$1.asyncTaskComplete(QueryManager.java:28)
    at com.garmin.android.framework.util.AsyncTask.handleMessage(AsyncTask.java:242)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:5333)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
    at dalvik.system.NativeStart.main(Native Method)
    ] { downloading=533ms }
    - 175548109: not processed

    #BitMask=4870