Coder Social home page Coder Social logo

s725's Introduction

Build

s725

About

Communicate with Polar S725X heart rate monitor watches via IR interfaces. This project is based on s710 from https://code.google.com/archive/p/s710/.

Supported watches: S725X. The code for older models like S610, S710, S625X is still present in the code and might work, but due to lack of hardware is not tested.

Building

Building s725 requires make, gcc/clang, flex, yacc/byacc/bison:

# Debian/Ubuntu
apt-get install gcc make flex bison
make

# Fedora
dnf install gcc make flex byacc
make

# OpenBSD
make

s725 has been tested on the following systems:

  • Ubuntu 20.04 and 22.04 amd64 via Travis CI
  • Fedora 23 amd64 with both USB/FTDI/IRXON and builtin IR
  • Debian GNU/Linux 8.0 amd64 with USB/FTDI/IRXON
  • OpenBSD-current amd64 (May 2016) with USB/FTDI/IRXON
  • OpenBSD 5.9 sparc64 with USB/FTDI/IRXON
  • OpenBSD 5.9 hppa with serial/IRXON
  • OpenBSD 5.9 alpha with serial/IRXON

Usage

The s725get utility downloads the data from the watch and writes it to disk in various selectable formats: srd, hrm, tcx, txt.

The s725get utility takes a -d argument which specifies the driver type to be used to communicate with the watch. The only valid value is "serial". The "serial" driver requires the device file to be specified with -D. The default is -d serial. See the "Drivers" section for more details.

Examples:

s725get -d serial -D /dev/cua00 -o tcx
s725get -d serial -D /dev/ttyUSB0 -o hrm

You must have write permissions for the device file to use s725get.

Downloaded workout files are stored in the current directory by default. To change this, you can pass the -f command line option to s725get:

s725get -f ~/workout/

s725get reads the configuration file ~/.s725rc which might contain the following settings:

#
# ~/.s725rc
#

# driver. possible values: serial
driver = serial

# device file name
device = "/dev/cuaU0"

# output directory
directory = "/home/user/polar/data/"

# output format
format = tcx

There are two ways to transfer data from the S725X watch: Put the watch into "Connect" mode, put it next to the IR interface and run s725get like this:

[user@host ~]$ s725get -d serial -D /dev/ttyUSB0 -f tmp -o txt
Reading [19163 bytes] [########################################] [  100%]
File 01: Saved as /home/user/tmp/20160503T180809.03621.txt
File 02: Saved as /home/user/tmp/20160501T215815.00149.txt
File 03: Saved as /home/user/tmp/20160428T173144.01881.txt
File 04: Saved as /home/user/tmp/20160426T181506.01677.txt
File 05: Saved as /home/user/tmp/20160302T102256.07165.txt
File 06: Saved as /home/user/tmp/20151103T140918.01129.txt
File 07: Saved as /home/user/tmp/20150829T093131.03392.txt
File 08: Saved as /home/user/tmp/20150813T180106.00149.txt

This way the IR interface sends a "get" command and then waits for data to arrive. All training records will be downloaded.

The second option is to run s725get in listen mode. Put the S725X watch into connect mode and select the file to transfer using the buttons on the watch:

[user@host ~]$ s725get -d serial -D /dev/ttyUSB0 -f tmp -o txt -l
Reading [456 bytes] [########################################] [  100%]
File 01: Saved as /home/user/tmp/20160501T215815.00149.txt

Drivers

serial

This driver is known to work with:

hrmtool

Convert Polar SRD files to HRM, TCX and TXT format. By default it tries to auto-detect the different SRD variants (S610, S625, S725).

Usage

usage: hrmtool [options] [-i intype] [-s srdversion] [-o outtype] [-f infile] [-F outfile]
        -i intype      input file type: srd
        -I variant     input variant: S610, S625, S725 (default: auto)
        -o outtype     output file type: hrm, tcx, txt
        -f infile      input file name
        -F outfile     output file name
        -v             verbose output

s725plot

Script to plot heart rate over time, altitude over time and heart rate histogram. Requires Python 2.7 or Python 3, matplotlib (tested with 2.2) and numpy. Input has to be in 'txt' format as written by s725get or hrmtool.

Usage

Usage: s725plot <INPUT> <OUTPUT DIRECTORY>

Examples

Heart Rate Diagram

Altitude Diagram

Speed Diagram

Histogram

s725's People

Contributors

ra1fh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

s725's Issues

hrmtool: add support for S625sx srd-files

Hi,

I have a bunch of old srd-files, recorded by a Polar s625sx -watch. I've been trying to convert them to a filetype which would be more generally supported (like tcx), but so far I haven't managed it.

I found your hrmtool, which looks to be able to do precisely what I'm looking for, but it chokes on my srd-files:

❯ hrmtool -i srd -o tcx -f 20050211T123700.02625.srd -F test.tcx -v
workout_read_buf: unable to auto-detect HRM type
fatal: 20050211T123700.02625.srd: invalid file

I have uploaded a srd here.

I suspect this is an old project of yours, maybe not relevant anymore, but nevertheless hoping it would be an easy fix to add support for s625 srd-files.

Kind regards,
Kristian

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.