Best practices
Perform computations on Movesense, transmit only the results
This approach is more energy-efficient than sending large amount of data through BLE and processing them on the mobile side. BLE is not designed for streaming data. This might also cause problems with stability of the BLE connection.
Avoid subscribing sensors at frequencies higher than needed
Up to 52 Hz, accelerometer runs in low-power mode. There is significant difference in power consumption between 52 and 104 Hz. Higher frequency also means higher CPU load in order to process data.
Avoid staying connected for longer than needed - prefer connections on demand
Movesense system automatically reduces CPU frequency based on computation demand so this is the easiest way to reduce power consumption. After unsubscribing all providers and disconnecting Bluetooth you can get down to as low as 10uA current consumption, while still maintaining all aplication data and RTC (Real-Time Clock):
-
Unsubscribe from all un-needed providers. This depends on what kind of an event you want to use to wake up sensor again. For example, you can unsubscribe from all providers and use a timer to wake the sensor up, or subscribe only for system states and wait for any movement event to occur.
-
Disconnect BLE (there are two ways):
-
Turn off advertising in Movesense application and disconnect mobile from Movesense:
asyncDelete(WB_RES::LOCAL::COMM_BLE_ADV::ID);
-
Use BLE Disconnect from Movesense API. It'll turn off advertising automatically and disconnects from mobile. Mobile will try to reconnect until Movesense application turns on advertising again.
Check connection handle using GET on /Comm/Ble/Peers (usually connection_handle = 0 for single point BLE connection):
asyncDelete(WB_RES::LOCAL::COMM_BLE_PEERS_CONNHANDLE::ID, AsyncRequestOptions::Empty, (int32_t) connection_handle );
-
-
Wait for subscription or timer to turn on advertising again.
asyncPost(WB_RES::LOCAL::COMM_BLE_ADV::ID, AsyncRequestOptions::Empty);
Note! If something goes wrong with your BLE wakeup procedure and you're unable to wake up your device again, you can manually enable DFU mode (device firmware update) and flash the sensor with working firmware. ( Refer to: FAQ )
If possible, use system mode Full Power Off when device is left unused for a longer period of time
Device can be woken up by a configurable event from accelerometer (any movement, single tap, double tap, etc.) or analog front-end (AFE, by touching HR belt connectors). However, be aware that system time will be reset during full power off.