srmcmd - Man Page
download/access for SRM PowerControl
srmcmd [options] path
srmcmd implements the serial protocols for SRM's PowerControl V, VI and 7. It allows you to adjust the most important settings.
Options available for the srmcmd command:
- -b, --baud=rate
Use specified baudrate, only. By default all supported baudrates are probed. PCV factory setting is 9600 baud. PCVI and PV7 always use 38400.
- -c, --clear
Delete data on PC. Well, actually just mark it as deleted. You're still able to get it with --get=all on PCV.
- -d, --date
Print start date of recorded data as seconds since 1970-01-01. This is useful for creating srmwin compatible filenames.
- -x, --fixup
Try to fix time glitches in retrieved data. The PCV sends 11 Tuples in one 64Byte block. Timestamps are only sent per Block - with a granularity of 1 sec - so they're always off with recints < 1sec. In addition these timestamps often mismatch the time covered by the tuples. With this option set, timestamps are adjusted to fit the recint and gaps at block boundaries of up to 2sec are filled with averaged data. That's what srmwin is doing, It seems wko doesn't ... The protocol for PCVI and PC7 doesn't have this problem.
- -f, --ftdi
use ftdi serial driver and open device by the given description.
- -g, --get[=all]
Download newly recorded data from PC. With all specified, the "deletion" on the PCV is ignored and all data (that's not yet overwritten) is retrieved from the PCV (PCVI and PC7 don't seem to support getting "deleted" data). By default data is written to stdout as tab-separated list.
- -h, --help
A brief message.
- -i, --int=recint
Set recording interval. Interval is specified *10. so "10" means 1 sec. Supported values: 1 to 9 and 10 to 150 in steps of 10.
- -n, --name
Show athlete name (initials) stored on the PC.
- -p, --pc=type
Type of PowerControl protocol to use. Supported are PowerControl 5, 6, and 7. Default is "5".
- -r, --read
instead of accessing the PC, the specified file is read. By default data is written to stdout as with --get. See below for supported file formats.
- -R, --read-type=type
specify format of file to read. See below for supported file formats. Defaults to srm7.
- -s, --split=time
Split data on gaps of specified minimum length. Time is given as 10*seconds - same as --recint. With a non-zero time, the argument given to --write will be used as template for mkstemps. So it has to have printed to stdout.
- -t, --time
Set the PCs time to the current system time.
- -v, --verbose
Enable verbose status messages.
- -V, --version
show srmcmd version number and exit.
- -w, --write=destination
Write data retrieved from PC (or with --read from file) to the specified destination file.
- -W, --write-type=type
specify format of file to write. See below for supported file formats. Defaults to srm7.
Binary format written by ancient srmwin versions. Supports same fields as srm6. Only reading is implemented.
Binary format as written by srmwin until PCVI was introduced. Supports power, heartrate, speed, cadence. Only reading is implemented.
Binary format as written by srmwin that supports PCVI. Supports power, heartrate, speed, cadence, elevation, temperature. For reading, the srm file sub-type is autodetected.
custom text-based format that has a lot less restrictions than both SRM formats. Supports all fields. Only writing is implemented.
Show name configured in PC:
|srmcmd -n /dev/ttyUSB0||# linux|
|srmcmd -n -p 7 /dev/ttyUSB0||# linux, PowerControl 7|
|srmcmd -n /dev/ttyS1||# cygwin, com1|
|srmcmd -n /dev/cu.usbserial*||# Mac OS X, prolific driver (good luck)|
|srmcmd -n /dev/cu.PL2303-*||# Mac OS X with http://osx-pl2303.sourceforge.net/|
srmcmd -n -p 7 -f "POWERCONTROL 7" # ftdi, PowerControl 7
Download data to out.srm, delete data on PC, adjust clock and set recint to 1sec:
srmcmd -g -t -i 10 -w out.srm /dev/ttyUSB0
Auto-split on 2h gaps and save to files named foo*.srm
srmcmd -g -s 72000 -w fooXXXXXX.srm /dev/ttyUSB0
Dump file contents as tab-seperated list:
srmcmd -r foo.srm
This is just a very simplistic frontend for the lib. Please check the source distribution for details.
Yes. For sure. Just keep in mind, that protocol and file formats are reverse engineered...