SRMCMD(1)

πŸ“¦ version 0.1.1.1, in fedora 43, fedora 44

✨ NAME ✨

okay bestie, meet srmcmd πŸ’… β€” it's your download/access plug for SRM PowerControl. that's the whole vibe. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

srmcmd [options] path

🌸 DESCRIPTION 🌸

so srmcmd implements the serial protocols for SRM's PowerControl V, VI and 7 πŸ”₯. and it lets you adjust the most important settings. that's it, that's the girl. she's small but she's doing a LOT.


πŸ’– OPTIONS πŸ’–

Options available for the srmcmd command:

  • -b, --baud=rate β€” use only the baudrate you specified. by default she probes all the supported baudrates, which is very main character of her. PCV factory setting is 9600 baud. PCVI and PV7 always use 38400 β€” no negotiating, they're fixed like that. πŸ’€
  • -c, --clear β€” delete data on the PC. well. actually she just marks it as deleted πŸ™ˆ. you can still get it back with --get=all on PCV. it's giving "deleted (not deleted)".
  • -d, --date β€” print the start date of the recorded data as seconds since 1970-01-01. lowkey useful for creating srmwin compatible filenames. πŸ—“οΈ
  • -x, --fixup β€” try to fix time glitches in the retrieved data. here's the tea: 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. on top of that, 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, so they're fine, they're thriving.
  • -f, --ftdi β€” use the ftdi serial driver and open the device by the given description.
  • -g, --get[=all] β€” download newly recorded data from the PC. with all specified, the "deletion" on the PCV is ignored and all the data (that's not yet overwritten) is retrieved from the PCV β€” note that PCVI and PC7 don't seem to support getting "deleted" data 🫢. by default, data is written to stdout as a tab-separated list.
  • -h, --help β€” a brief message. short and sweet.
  • -i, --int=recint β€” set the recording interval. the 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 the 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 the format of the file to read. see below for supported file formats. defaults to srm7.
  • -s, --split=time β€” split data on gaps of the 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. ⚠️ (that's the original wording, bestie, i'm just the messenger)
  • -t, --time β€” set the PC's time to the current system time. clock sync slay. ⏰
  • -v, --verbose β€” enable verbose status messages. for when you need her to yap.
  • -V, --version β€” show the srmcmd version number and exit.
  • -w, --write=destination β€” write data retrieved from the PC (or, with --read, from a file) to the specified destination file.
  • -W, --write-type=type β€” specify the format of the file to write. see below for supported file formats. defaults to srm7.

πŸ¦‹ FILE FORMATS πŸ¦‹

  • srm5 β€” binary format written by ancient srmwin versions. supports the same fields as srm6. only reading is implemented. πŸ“–
  • srm6 β€” binary format as written by srmwin until PCVI was introduced. supports power, heartrate, speed, cadence. only reading is implemented.
  • srm7 β€” 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 πŸ”.
  • wkt β€” custom text-based format that has a lot less restrictions than both SRM formats. supports all fields. only writing is implemented. ✍️

🌈 EXAMPLES 🌈

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
(good luck) is literally in the original and honestly? valid. 😭

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-separated list

srmcmd -r foo.srm

πŸ’œ SEE ALSO πŸ’œ

this is just a very simplistic frontend for the lib. please check the source distribution for details. πŸ“¦ (iykyk β€” the real lore lives in the source)


😭 BUGS 😭

Yes. For sure. πŸ’€ keep in mind though, that protocol and file formats are reverse engineered... so like, be nice to her, she's doing her best.


πŸ‘‘ AUTHORS πŸ‘‘

Rainer Clasen


and that's the page, bestie 🫢 this one's from Version 0.1.1~git1, it's the SRM access tool, dated 9 Mar 2011, and it's living in section 1 of the manual. go forth and talk to your PowerControl πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from