Skip to content
mlt edited this page May 16, 2012 · 16 revisions

THIS PAGE IS SOMEWHAT OUTDATED

General

  • Commands are mostly sent in 32 bytes. With the only exception when 0 bytes are attempted to be written(?).
  • Data is read in chunks of 36 bytes.
  • Most of the reads with standard sowftare are timed out with 0x0d return code.
  • Readiness of RX queue is checked by an attempt to read data and return code 0x3. I guess no async stuff, plain polling.

Connect to device

Likely the following It was coordinates query or something. Fetch settings

0x0 = SI_Write(cyHandle=0x20, lpBuffer, dwBytesToWrite=0x20, lpdwBytesWritten=0x2F9218)
 >00000000 00000000 00000000 00000000< ................ 00000000
 >00000000 00000000 00000000 0000EEEE< ................ 00000010

combined with The following

0x0 = SI_Write(cyHandle=0x20, lpBuffer, dwBytesToWrite=0x20, lpdwBytesWritten=0x2CDFE8)
 >EEEE0000 00000000 00000000 00000000< ................ 00000000
 >00000000 00000000 00000000 00000000< ................ 00000010

Charge only mode

0x0 = SI_Write(cyHandle=0x20, lpBuffer, dwBytesToWrite=0x20, lpdwBytesWritten=0x34FDE0)
 >FFFFFFFF 00000000 00000000 00000000< ................ 00000000
 >00000000 00000000 00000000 00000000< ................ 00000010

Get tracks

0x0 = SI_Write(cyHandle=0x20, lpBuffer, dwBytesToWrite=0x20, lpdwBytesWritten=0x2D8110)
 >0808AAAA 00000000 00000000 00000000< ................ 00000000
 >00000000 00000000 00000000 00000000< ................ 00000010

In reply

0xD = SI_Read(cyHandle=0x24, lpBuffer, dwBytesToRead=0x24, lpdwBytesReturned=>0x1)
 >13270000 4B001E08 00AD450B 0C040028< .'..K.....E....( 00000000
 >82313131 35333031 2D303230 02000000< .1115301-020.... 00000010
 >A44400FF<                            .D..             00000020
  • Bytes 1C-1F in returned chunk contain number of tracks.

Then comes track metadata

0xD = SI_Read(cyHandle=0x24, lpBuffer, dwBytesToRead=0x24, lpdwBytesReturned=>0x1)
 >0A011218 030C0004 01440040 0001012A< .........D.@...* 00000000
 >00343033 32343130 31001512 18030C00< .40324101....... 00000010
 >000000FD<                            ....             00000020
  • bytes 2-3 - local start time, e.g. 18:01, i.e. 6:01pm
  • bytes 6-7 - number of laps +1, e.g. 3+1=4
  • bytes 1a-1b - local end time, e.g. 6:21pm
  • bytes 4-5 - day & month, e.g. 24th of March
  • Number of points in track (0x012a) bytes 8-9

And laps

0xD = SI_Read(cyHandle=0x24, lpBuffer, dwBytesToRead=0x24, lpdwBytesReturned=>0x1)
 >000C0B11 0002451E 000EF962 0144004A< ......E....b.D.J 00000000
 >00000000 00000000 00000000 F4740000< .............t.. 00000010
 >000100FD<                            ....             00000020
  • it was 0x0c' 0x0b" 0x11 or 12'11"17
  • 11th byte is the (cumulative for the track) amount of calories I've burned supposedly, e.g. 98

And coordinates

0xD = SI_Read(cyHandle=0x24, lpBuffer, dwBytesToRead=0x24, lpdwBytesReturned=>0x1)
 >35020000 02401519 12050000 00000044< [email protected] 00000000
 >5925614E 00931117 89570000 187E0000< Y%aN.....W...~.. 00000010
 >000201FA<                            ....             00000020
  • First DWORD is a track time (little-endian) 0x235=565 of 10 ms ~ 5.65 sec

  • Last DWORD is made of point # (WORD), track # (BYTE) starting from 0, and 0xFA

  • Lon, Lat are noticeably separated by W and N and are encoded using packed BCD, e.g. we've got 44°59'25"6159.2561' North 93°11'17"8911.1789' West .

End of track points signature?

0xD = SI_Read(cyHandle=0x24, lpBuffer, dwBytesToRead=0x24, lpdwBytesReturned=>0x1)
 >EEEEEEEE 03000000 1E000000 03000000< ................ 00000000
 >3CF80000 A6850000 01000300 CC000000< <............... 00000010
 >00000000<                            ....             00000020