Movesense sensor framework 2.0 sneak preview
Movesense sensor software 2.0 "sneak preview" is now available in "movesense-device-lib" bitbucket repository in a branch release/2.0-preview. Please note that this is not production quality release but instead provided to give a way to try out developers own code with it and to root out any remaining issues before official release.
NOTE: The MovesenseCoreLib sneak preview has a version number 1.9.99 to avoid confusion with the official 2.0 release
What's new in 2.0
- Completely re-vamped, docker based, build system for hardware compilations
- Works equally well in Windows, OSX and Linux
- Bluetooth 5.0 support:
- Faster speed (1Mbps -> 2Mbps) only for now
- Much improved bootloader
- Much faster DFU speeds (1-2kB/s -> 10 kB/s)
- timeout in DFU mode (2 minutes) that boots back to application if there is no connection
- blink indication for data transfer
- Much improved BLE service modules:
- CustomGattService now supports full 128bit uuid's and more of them
- HRS (Standard HR Service) and NUS (Nordic UART Service) modules have now a simple Whiteboard API
- No need to create your own advertising packet with HRS service, service id added automatically
- Improved system settings
- More robust operation and Settings API available for clients in (some) later 2.x release
- Improved DataLogger/Logbook control
- Prevent code gen of unneeded paths
- Storage format change with math conversion (Fixed point formats etc.)
- Ability to choose array lengths
- ECG logging support
- Hardware Watchdog
- Reboots a sensor that is in deadlock state for more than 30 seconds
- expanded Bluetooth memory to have more space for base-uuid's and user services (simultaneous NUS & HRS etc.)
- Changed Whiteboard BLE GATT communication to use new registered AmerSports 16-bit UUID
- Saves a lot of space from Advertising packet and RAM from Bluetooth stack
- requires the MDS 1.39 or newer
- TONS of bugfixes
How to update the sensor over Bluetooth
Because the Bluetooth stack (Softdevice) and bootloader have been updated, the first update of a sensor from 1.9.x (or older) to 2.0 has to be done with a DFU packet that contains a bootloader. These are recognizable by the filename that ends with _w_bootloader.zip. After the 2.0 bootloader has been installed, the application can be changed with the smaller "non-bootloader" DFU packet.
Also: The new SoftDevice requires the use of the latest nrf DFU library for Android / iOS. The updated Showcase apps (Android: 1.9.8, iOS: 1.0.5) are available in the usual places (bitbucket Downloads or Apple store).
NOTE: It is not possible to downgrade the sensor back to 1.9 series except with the programming jig!
How to flash the sensor with the programming jig
The updated bootloader has changed the way that the sensor is flashed, so the old piecemal flashing (bootloader, softdevice, application) will not work. Instead the hex files are merged in a single file "Movesense_combined.hex".
In Windows and Mac the flashing can be performed from the separate (non-docker) terminal window by running the following command from the shared build folder:
nrfjprog -f nrf52 --sectoranduicrerase --program Movesense_combined.hex --reset
NOTE: The old Movesense.hex and Movesense_w_settings.hex -files are no longer needed or used. The build process still leaves them around, but you should not use them for anything.
The flashing command ninja flash
, only works if the programming jig is attached to the computer that the command is run. In the new build system that "computer" is the virtual computer that runs the docker image. Attaching USB port to docker VM is possible in Linux but not in Windows or Mac. For instructions on how to attach USB to docker VM in linux, see here.