Coder Social home page Coder Social logo

jonasprimbs / movesense-ble-ecg-firmware Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 949.79 MB

A custom firmware for Movesense ECG devices which implements a Bluetooth Low Energy (BLE) GATT Service for electrocardiograph voltage measurements.

License: Other

CMake 1.69% C 11.94% C++ 84.20% Python 1.80% HTML 0.04% JavaScript 0.21% Assembly 0.14%
ble bluetooth-low-energy ecg electrocardiogram gatt

movesense-ble-ecg-firmware's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mcculloh213

movesense-ble-ecg-firmware's Issues

Heart Rate Service - No data on Heart Rate Measurement notification Characteristic 0x2a37

Describe the bug
With the v.0.5.0 firmware installed, the ECG data works correctly, data arrives via Notify for the ECG Voltage Characteristic, and the ECG Measurment Interval Characteristic works for read.

The ECG Voltage Characteristic does not send any data.

I have verified both with my own Python application.

I have also verified using Zwift that it can correctly get the Heart Rate data with the standard firmware. And that it recognizes the Movesense with the ECG firmware installed, can connect to it, but no heart rate data arrives.

To Reproduce
Steps to reproduce the behavior:
With Zwift, in the connection screen, for heart rate, select the Movesense. Then start the game, and look at the heart rate data, there is no valid data.

Expected behavior
Data should arrive on the ECG Voltage Characteristic via NOTIFY access.

       try:
            await client.start_notify(self._characteristic, self._data_conv)
        except Exception as e:
            print("BLE_Data.start_notify[%d:%s][%s]: exception e: %s" % (self.tid, self.name, self.data_name, e), file=sys.stderr)
            self.data_info(self.data_name, f" start_notify failed {e}")

N.b. We do not see the exception. The start_notify() does not fail. Just do not see data arrive and the self._data_conv() function called.

My test code works correctly with the standard Movesense firmware, also Polar H10 and Garmin Dual.

Desktop (please complete the following information):
Zwift on Windows.
Also, my own Python app connecting with Bleak.

Additional context
The Movesense Showcase app in IOS does continue to be able to get the heart rate. I suspect it is using their Whiteboard protocol, not the GATT Heart Rate Service.

I will be using this to add support for Movesense ECG to my dashboard and ecg apps. https://www.fitnesshrv.com/

Stop Notify on the ECG Voltage Characteristic sometimes fails

Describe the bug
I am using Python Bleak to get ECG data from the ECG Voltage Characteristic.

After successfully doing a start_notify and getting data, to stop the connection I use a stop_notify and then close the BLE client connection.

This apparently does not correctly get the Movesense to always correctly drop the connection.

The Movesense sensor (even after removing from the HR strap) continues to blink the red LED every 5 seconds.

It does this until the battery is removed.

To Reproduce
I can provide a Python script to demonstrate if needed.

Expected behaviour
For the Movesense sensor to close the BLE connection, start advertising, and accept a new connection.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux
  • Library: Bleak

Firmware v2.2

Do you plan to update for firmware v2.2?
[https://www.movesense.com/news/2023/12/movesense-sensor-firmware-2-2-published-new-features-and-improvements/]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.