download logged data

When I'm downloading logged data from 2 Metawearboards simultaneously using anonymous routes, the download works fine for a bit, than just stops without throwing any exceptions or errors. No unexpected disconnects occur and the boards are still connected to the phone. Downloading with only 1 sensor may also just stop without any exception, error or unexpected disconnect, but it seems like it is a lower chance of it occuring.

Also, is there any way to speed up downloads of logged data? I've reduce the max connection interval to 7.5ms (11.25ms for Android M+) and experienced some download boost, but still slow.

Comments

    • Do you have the same issue when using the MetaBase app?
    • What Android device & OS are you using?
    • Post your log setup and download code.
  • Have not experienced the same problem with MetaBase app, but haven't done much testing here. Streaming works flawless though.

    Android device is a Samsung S7 (flat) with android 7.0

    Anonymous route and subscriber:
    https://pastebin.com/WgX5ub4a

    Logcat from when sensors connects to just randomly stopping:
    03-15 12:35:09.698 10795-10875/com.appitude.appitude I/MainActivity: Connected
    03-15 12:35:10.022 10795-10876/com.appitude.appitude D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=10 device=C0:A8:08:79:C1:XX
    03-15 12:35:10.112 10795-10808/com.appitude.appitude D/BluetoothGatt: onClientConnParamsChanged() - Device=C0:A8:08:79:C1:XX interval=6 status=0
    03-15 12:35:10.516 10795-10808/com.appitude.appitude D/BluetoothGatt: onClientConnParamsChanged() - Device=C0:A8:08:79:C1:XX interval=29 status=0
    03-15 12:35:11.047 10795-10874/com.appitude.appitude D/BluetoothGatt: discoverServices() - device: C0:A8:08:79:C1:XX
    03-15 12:35:11.061 10795-10808/com.appitude.appitude D/BluetoothGatt: onSearchComplete() = Device=C0:A8:08:79:C1:XX Status=0
    03-15 12:35:11.132 10795-10808/com.appitude.appitude W/BluetoothGatt: onCharacteristicRead() - Device=C0:A8:08:79:C1:XX handle=26 Status=0
    03-15 12:35:11.138 10795-10808/com.appitude.appitude D/BluetoothGatt: setCharacteristicNotification() - uuid: 326a9006-85cb-9195-d9dd-464cfbbae75a enable: true
    03-15 12:35:11.279 10795-10808/com.appitude.appitude I/MainActivity: Connected
    03-15 12:35:11.285 10795-10869/com.appitude.appitude I/MainActivity: Wait is over
    03-15 12:35:11.646 10795-10876/com.appitude.appitude D/BluetoothGatt: onClientConnParamsChanged() - Device=C0:A8:08:79:C1:XX interval=9 status=0
    03-15 12:35:11.674 10795-10875/com.appitude.appitude D/BluetoothGatt: onClientConnParamsChanged() - Device=F8:89:C0:0D:07:XX interval=9 status=0
    03-15 12:35:11.948 10795-10875/com.appitude.appitude I/MainActivity: Progress Update = 427022/427022
    03-15 12:35:11.973 10795-10808/com.appitude.appitude I/MainActivity: Progress Update = 418732/418732
    03-15 12:35:12.454 10795-10800/com.appitude.appitude I/art: Do partial code cache collection, code=59KB, data=61KB
    03-15 12:35:12.455 10795-10800/com.appitude.appitude I/art: After code cache collection, code=58KB, data=60KB
    03-15 12:35:12.455 10795-10800/com.appitude.appitude I/art: Increasing code cache capacity to 256KB
    03-15 12:35:17.104 10795-10807/com.appitude.appitude I/MainActivity: Progress Update = 414544/418732
    03-15 12:35:17.218 10795-10876/com.appitude.appitude I/MainActivity: Progress Update = 422751/427022
    03-15 12:35:22.187 10795-10808/com.appitude.appitude I/MainActivity: Progress Update = 410356/418732
    03-15 12:35:22.390 10795-10808/com.appitude.appitude I/MainActivity: Progress Update = 418481/427022
    ....
    03-15 12:36:43.441 10795-10875/com.appitude.appitude I/MainActivity: Progress Update = 350161/427022
    03-15 12:36:46.681 10795-10875/com.appitude.appitude I/MainActivity: Progress Update = 339160/418732
    03-15 12:36:48.463 10795-10808/com.appitude.appitude I/MainActivity: Progress Update = 345891/427022
    03-15 12:36:51.796 10795-10876/com.appitude.appitude I/MainActivity: Progress Update = 334972/418732

    10 min passed as of now with no further update

  • also the unexpected disconnect handler that should produce a log if it occurs:
    @Override
    public void disconnected(int status) {
    Log.i("MainActivity", "Unexpected disconnect");
    }

  • Hrm...This download hanging issue sounds like the Bluetooth stack has locked up.

    Where in your code do you change the connection interval and when does this happen in relation to starting the log download?

  • As of current it happens right before creating the anonymous routes to download, defined in function setSettings() called in the code i posted above.

  • Try adding in a 1000ms delay between setting the ble conn params and creating the anonymous routes.

  • Removed changing the connection interval entirely and still facing the same issue, but less frequently.-

  • Try testing your code on another Android device and test the MetaBase further to see if you do experience this download issue with the MetaBase app.

Sign In or Register to comment.