J'essaye d'utiliser le programme suivant: rs200_decoder (
http://rs200-decoder.sourceforge.net/), pour transférer les données de mon cardio-fréquencemètre (Polar RS200) vers mon PC via le microphone afin de pouvoir ensuite les charger et les traiter dans un programme d'entrainement. Voici le mode d'emploi du pgm:
---------- Polar RS200 Decoder ----------
README for version 0.9.0, source
This program can be used to read, decode and store information recorded by RS200 and sent to the program over SonicLink.
Copyright (C) 2005, Jani Hursti (<jani.hursti@hut.fi>)
Portions Copyright (C) 2001-2003, Tomás Oliveira e Silva (http://www.ieeta.pt/~tos)
This program is base on the original GNU/Linux program for Polar S410 heart rate monitor
by Tom Oliveira e Silva and has been modified to work with Polar RS200 and Polar RS200sd.
Please send comments, suggestions and corrections to the e-mail given above.
This program is released under the GNU general public license (version 2 or any later version); see the gpl.txt file (or the page http://www.gnu.org/licenses/gpl.html) for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INSTALLATION
This program has been tested to compile with SuSE Linux 10.0 (or openSuSE) with gcc version 4.0.2 20050901 and with Windows XP SP2, Visual Studio 2005.
To use the program on Linux you will need to have read rights to /dev/dsp or use recorded wav-files.
To compile with Linux, simply type "make" in the source directory of the program. After successful compilation, you will find a standalone program called "rs200_decode" in the directory.
To compile with Windows XP, open the included project file with Visual Studio and choose compile from the Tools menu.
USAGE
You can get usage information for the program by running
./rs200_decode -h
This lists the available flags
-m [src] specify input from microphone (/dev/dsp used as default, you can specify other source as parameter)
-i [file] specify input from a wav file or from /dev/dsp
-e [file] specify input from a byte file
-t [file] specify input from an ascii file with raw bytes
-o [file] write output to a file
-d [dir] write output to a directory (file names generated automatically)
-s output as summary data of exercise
-x output as importable XML data
-c output as importable csv data
-r output as an ascii list of raw bytes from RS200
-b output as a byte file of the SonicLink transmission
-v verbose messages
-u unlimited read, discard error messages and end of file marks
-D debug output
If you use input files in wave format, you need to record the SonicLink sounds with a microphone using 16 bit 44100 Hz mono sound, lsb first.
The program supports wildcards so if you process files, you can for instance re-decode all of them with one command.
Note: follow-up data is recognized automatically if you choose to send some from the wrist unit. However, all output options are not supported with follow-up data. Currently you can output follow-up data in raw and human readable formats.
Examples:
Read data from microphone at /dev/dsp and output everything on screen in human readable form
./rs200_decode -m
Read data from microphone and write results into automatically named files under the directory "session_data" in human readable, raw and xml formats:
./rs200_decode -srx -d session_data/ -m
Read data from the input "input.wav" and output it to "output.csv" in csv format
./rs200_decode -c -i input.wav -o output.csv
Read data from microphone and output it as bytes to a file
./rs200_decode -b -m -o output.bin
Read data from /dev/dss and print results to output.csv while showing full debug messages
./rs200_decode -m /dev/dss -Dc -o output.csv
Display (re-decode) all data stored as raw data bytes and stored in directory "session_data"
./rs200_decode -t session_data/*.raw
Create xml files into directory "my_training_xmls" from raw data bytes in directory "session_data"
./rs200_decode -x -t session_data/*.raw -d my_training_xmls
Je ne parviens pas à lire les données... si j'essaye de les lire directement à partir du microphone, j'obtiens le résultats suivant:
$ ./rs200_decode -m /dev/snd/pcmC0D0c -Dx -o /home/Cactus/RS200/output.xml
--- Polar RS-200 SonicLink decoder ---
Parameters passed:
Input file: (null)
Input from microphone
Input device: /dev/snd/pcmC0D0c
Output file: /home/Cactus/RS200/output.xml
Output directory: (null)
Output format summary: 0
Output format csv: 0
Output format raw: 0
Output format xml: 1
Output format binary: 0
Unlimited read: 0
Debug: Reading data from microphone.
Debug: Decoding signal into bytes.
Debug: Errors in signal, restart reading.
..
Debug: Opening /dev/snd/pcmC0D0c for input
^Z
[3]+ Stopped ./rs200_decode -m /dev/snd/pcmC0D0c -Dx -o /home/Cactus/RS200/output.xml
Le programme ne détecte pas la fin de la transmission. Je dois l'arrêter moi-même. En fait il semble ne pas pouvoir interpréter le signal sonore émis
Si j'essaye d'enregistrer le signal et le sauver sous format WAV (Avec Audacity p.e. ou Gnome-sound-recorder), j'ai le résultat suivant:
$ ./rs200_decode -Dc -i test.wav -o /home/Cactus/RS200/test.csv
--- Polar RS-200 SonicLink decoder ---
Parameters passed:
Input file: (null)
Input device: (null)
Output file: /home/Cactus/RS200/test.csv
Output directory: (null)
Output format summary: 0
Output format csv: 1
Output format raw: 0
Output format xml: 0
Output format binary: 0
Unlimited read: 0
Debug: Processing input from files, total number of files: 1
Debug: Input file number: 1 name: test.wav
Debug: Decoding signal into bytes.
Debug: Errors in signal, restart reading.
..
Debug: Opening test.wav for input
...............................................................................................................................................................................
Debug: Hit EOF
Debug: No more bytes.
Debug: Finished decoding, extracted file size 0 bytes, found 0 bytes and 0 data bytes.
Encore une fois, le pgm ne decode pas le signal audio. Comment et avec quel pgm pourrais-je enregister le son sous le bon format: WAV 16 bit 44100 Hz mono sound, lsb first. Avec audacity, j'ai essayé l'échantillonage 44100 Hz et le format WAV 16 bits PCM...