sanferro
sanferro

Reputation: 19

Movesense cannot be put into DFU mode because it does not connect via the Movesense Android App

I wanted to use new sample codes, which have been recently updated on BitBucket (plippo/c85e1ba - Updated Movesense Core Lib to version 0.3.1.105 - Updated Movesense sample applications to version 0.3.1.105).

The new code compiled and built properly. After successfully putting the into DFU mode and uploading this firmware I was unable to read out the characteristics with the Movesense android app.

The Movesense is detected by the Android App as well as by other BLE tools (e.g. nRF connect app). The Movesense app gets stuck while connecting to the device. Hence I cannot readout anything, or put the device into DFU mode in order to reprogramm it. However, with the nRF connect app I am able to connect to it.

Comparing the previous and current versions of the embedded code, I noticed that the sample apps have been split. However in the app_root.yaml file the section

apis:
  AccelerometerSample.*:
    apiId: 100
    defaultExecutionContext: PrimaryServices
  HelloWorld.*:
    apiId: 101
    defaultExecutionContext: PrimaryServices

remained the same. I uploaded the sample app "accelerometer_app" where the HelloWorld Service is no longer available (compared to the old code). But is still listed in the yaml-file. I wonder if this is the reason why I cannot connect anymore with the Movesense App.

The last logged lines in the Android Monitor are the following ones

In the case of the old code, which is working:

05-24 15:52:05.350 29854-29854/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: connect() - device: C2:4B:A6:1E:73:AE, auto: false
05-24 15:52:05.350 29854-29854/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: registerApp()
05-24 15:52:05.350 29854-29854/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: registerApp() - UUID=7eec028c-3252-434f-9dcf-cc5ced36dd30
05-24 15:52:05.352 29854-29866/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
05-24 15:52:05.414 29854-29854/com.movesense.android.sample_A_G_H.debug V/ViewRootImpl: Contents drawing finished : com.movesense.android.sample_A_G_H.debug/com.movesense.android.sample_A_G_H.MainActivity
05-24 15:52:07.548 29854-29881/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=C2:4B:A6:1E:73:AE
05-24 15:52:07.548 29854-29881/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: discoverServices() - device: C2:4B:A6:1E:73:AE
05-24 15:52:08.531 29854-29881/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: onSearchComplete() = Device=C2:4B:A6:1E:73:AE Status=0
05-24 15:52:08.531 29854-29881/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: setCharacteristicNotification() - uuid: 34802252-7185-4d5d-b431-630e7050e8f0 enable: true
05-24 15:52:08.563 29854-29928/com.movesense.android.sample_A_G_H.debug D/MovesenseAndroidWrapper: Connected device! serial ECKI5ABE47F3 address 10000001
05-24 15:52:08.563 29854-29928/com.movesense.android.sample_A_G_H.debug D/BleEnumeratorImpl: adding device 10000001
05-24 15:52:08.563 29854-29928/com.movesense.android.sample_A_G_H.debug D/BleEnumeratorImpl: getDevices 1
05-24 15:52:08.698 29854-30184/com.movesense.android.sample_A_G_H.debug D/RouteObserver: onNotify {"Serial": "ECKI5ABE47F3", "Type": "New"}
05-24 15:52:12.937 29854-30184/com.movesense.android.sample_A_G_H.debug D/addWhiteboardDevice: {"manufacturerName": "Suunto", "productName": "Movesense", "variant": "Unknown", "hwCompatibilityId": "C", "serial": "ECKI5ABE47F3", "pcbaSerial": "UNKNOWN", "sw": "0.3.0", "hw": "UNKNOW", "additionalVersionInfo": "UNKNOW", "addressInfo": "UNKNOW"}
05-24 15:52:13.022 29854-29854/com.movesense.android.sample_A_G_H.debug D/MainActivity: Connected to device: Peripheral [address: C2:4B:A6:1E:73:AE, name: Movesense ECKI5ABE47F3, RSSI: -43]
05-24 15:52:13.064 29854-29854/com.movesense.android.sample_A_G_H.debug I/Timeline: Timeline: Activity_launch_request id:com.movesense.android.sample_A_G_H.debug time:47413961

In the case of the new code, which is not working:

05-24 15:39:23.643 18160-18160/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: connect() - device: E8:E6:77:21:D1:45, auto: false
05-24 15:39:23.643 18160-18160/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: registerApp()
05-24 15:39:23.643 18160-18160/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: registerApp() - UUID=6c391ed2-8e59-42e5-9700-99758e9e8877
05-24 15:39:23.647 18160-18207/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
05-24 15:39:23.771 18160-18160/com.movesense.android.sample_A_G_H.debug V/ViewRootImpl: Contents drawing finished : com.movesense.android.sample_A_G_H.debug/com.movesense.android.sample_A_G_H.MainActivity
05-24 15:39:27.577 18160-18171/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=E8:E6:77:21:D1:45
05-24 15:39:27.577 18160-18171/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: discoverServices() - device: E8:E6:77:21:D1:45
05-24 15:39:28.647 18160-18190/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: onSearchComplete() = Device=E8:E6:77:21:D1:45 Status=0
05-24 15:39:28.647 18160-18190/com.movesense.android.sample_A_G_H.debug D/BluetoothGatt: setCharacteristicNotification() - uuid: 34802252-7185-4d5d-b431-630e7050e8f0 enable: true
05-24 15:39:28.688 18160-18171/com.movesense.android.sample_A_G_H.debug D/MovesenseAndroidWrapper: Connected device! serial ECKID9F62D52 address     10000001
05-24 15:39:28.688 18160-18171/com.movesense.android.sample_A_G_H.debug D/BleEnumeratorImpl: adding device 10000001
05-24 15:39:28.688 18160-18171/com.movesense.android.sample_A_G_H.debug D/BleEnumeratorImpl: getDevices 1

It stops at the line D/BleEnumeratorImpl: getDevices 1.

This is an issue as I cannot put the movesense into DFU mode and reprogram it, so basically "it is broken" ;).

Question 1: Are the services described in the yaml file the issue for this problem.

Question 2: As I am able to see and connect to it via nRF connect App and be able to write data manually to the WRITE Characteristic, is there a way (command) which can be sent to the movesense, to put it into DFU mode.

Question 3: I cannot locate where the code gets stuck as I cannot track/follow BleEnumeratorImpl (see log lines). Where, in the entire android project is the BleEnumeratorImpl located?

I appreciate your help ))

Upvotes: 0

Views: 764

Answers (2)

Esperanz0
Esperanz0

Reputation: 1586

Please use new Android App. There is a working option for running DFU mode (from Toolbar menu).

Soon all DFU operations will be included into this new example app.

Now after You will run DFU Mode You need to use Nordic DFU App.

Upvotes: 0

PetriL
PetriL

Reputation: 1299

EDIT: The new movesense-device-lib is out that fixes this BLE connectivity issue

This is a known issue that was causing random builds to get stuck in BLE connection phase. The issue is fixed in the next release that should be out either today or tomorrow. Since the bug prevents booting into DFU firmware update mode, the sensors can be only saved using programming jig (J-TAG cable). For those customers that do not have the jig, please contact the Movesense support via email (info (at) movesense.com) and you'll get new sensors to replace the bricked ones.

I'm really sorry about the inconvenience.

Full disclosure: I work for Movesense team

Upvotes: 0

Related Questions