Tuesday, June 16, 2015

Emergency Garmin FR220 charger clip.


OK.. i'm in the far south of Sulawesi at a lovely cabin stay and want to log a run... bugger... the 220 is at 10% and i forgot the charger clip.
The USB clip and fr220 have 4 contact points so i assumed there were normal USB connections.
 +ve, data, data , -ve
Nothing on google.... and i didn't have a multi-meter or test LED with me...

Ah. stuff it..
I cut a generic USB lead , cut the two data wires which left me with the red and black.
Stripped them and pulled one strand of the fine copper wire , folding the rest back out of the way.
This gave me a very fine probing wire that would act as a very crude 250mA or there abouts fuse.
I tossed a coin to choose if the black goes to the left or right contact on the back of the watch.
Looking at the back of the watch, contacts at the bottom i connected Red to the left , Black to the far right. "Beep"... sounds good.. struggle to turn the watch over... bugger the watch was coming back from a reset.  I swapped the wires and tried again, this time facing the screen side at a mirror.
"Beep" ... but this time the watch went into its normal 'Charging' screen.
Well that was easy.

Now to make the clip... Cardboard with its ribs running up and down the watch should be stiff enough but allow the tabs to fold around the watch to hold the contacts against the pads on the back of the watch.
Trace around the watch, leaving room at the sides to not press on the buttons ( we don't want it going into Test Mode do we ;-)




Tracing showing rough location of contact points.

With a pin i then poked holes through the cardboard that aligned with the pads on the watch and poked the wires through. NOTE polarity ! 



I then stripped about 20mm of the insulation from each wire, twisted the strands together and then rolled the twisted strands into balls that were just firm enough to press firmly against the pads but not to soft that they would crush and get loose.

Twist strands then roll into firm balls.
I connected the other end of the cable to a USB power bank and held the cardboard creation on the back of the watch.  Ripper , it worked the first time !

( no idea why Blogger wont let me flip the image ! )
I wasn't going to hold the thing in place for an hour or so. Thats what the wings on the side of the cardboard were for. Wrap them around the watch, secure with a rubber band and leave it for a while.



After a few minutes i heard a beep...um... it may have stopped charging... i cant see the screen. 
Easy fix , cut a bit off the wings.


This setup worked without a single problem or missed charge for the rest of the 2 week holiday. Packed and unpacked 4 or 5 times from my carry on.

 Hope it helps someone one day.

 HooRoo,
  

Tuesday, March 17, 2015

Garmin Forerunner FR220 'What else can it do...'


 Morning,
 This is a spin off of my other FR220 post. This one will cover stuff that we can do with the 220 and probably the 620 that involves messing with the setup files but does not require messing with the firmware.

Here is a teaser that i'll get to ....



While corresponding with a new friend about my work on the test mode data EPO status, this new friend ( Lets call him 'MiniQ') started investigating the SETTINGS and 0RRUNNIN .FIT files.
MiniQ wanted to be able to select a slower Virtual Partner WALK pace than the slowest available in the watch  ( 8.55min/KM). After many hours of  bit twiddling MiniQ sent me an email  " Now I've successfully raced the Virtual Partner while walking (VP pace set to 14:00/km). I WON! :-)
He passed on info on how the activity screen metrics are indexed on the FR620 and where the number of fields per screen was stored. Here is a list of the 620 metrics.
I have since found the same metrics have the same index number on all garmin forerunner devices. 910,920,620,220 and fr10. I hope to create a full list . Anyone got one before i start ?
I re-ran his tests on the FR220 and here are my results based on his hours of work.
Seeing that the FR620 can display up to 4 screens of fields and the FR220 can only display up to 2 screens of 3 i wanted to see if i could enable more...

Testing every combination i can not get more than 2 activity screens but CAN set both to 4 fields !

You will need 

  1. Hex editor to edit the .FIT file.
  2. The ANT .FIT SDK  ( i use the FitTestTool.jar JAVA script from it to create the new checksum for the modifyed .FIT ) 
  3. Some DOS skills if you do it the way i do it . MiniQ uses Unix scripts. 


MiniQ found the FR620's first activity screen settings started at address 0x0280 in the 0RRUNNIN.FIT file.
0RRUNNIN.FIT is found in the GARMIN\SPORTS folder on the watch.

Here is what the header looks like in the hex editor.




Here is the bit around address 280hex we are interested in..



Grab your current 0RRUNNIN.FIT file and drop it in the working folder on your computer.
( Excuse the mess. I hate path problems so put the utils and data in the same folder.)

Run the FitTestTool over your .FIT to make sure its ok and that you can run the tool.

D:\Downloads\Garmin\FitSDKRelease_14.00\java>java -jar fittesttool.jar -d 0RRUNNIN.FIT > 0RRUNNIN.txt

 This will create a .txt file like the section below. ( open it in Wordpad if on a PC to keep correct newline formatting).

To help make things clear i have made an indexed version with Decimal and Hex and comments. 


(*** Screens The 3rd and 4th screens above maybe wrong. i'll update the pic and text ASAP.)


Here you can see the Activity screen settings at the time were Screen 1 Enabled and showing 3 fields, Distance , Timer , Elevation.  Activity Screen 2 was Enabled and only showing 2 fields, Average Pace and Speed. The HRM screen was NOT enabled but if it was it would have shown 2 fields, HR and HR Zone ( there are the default for HR and not adjustable from the watch menu. The 4th screen would be the Workout screen. It was NOT enabled but would have shown Average Pace, Average HR and Time Of Day.

The fields in the green text are normal metrics for the two main FR220 activity screens. The others were only available when the extra HR and workout screens were enabled but look to be available on the main activity screens if added via the 0RRUNNIN.FIT

Dec  Hex   Metric         Comment                                                           
0   0x00  Calories        Calories burned during the current workout.
3   0x03  Cadence         Number of steps per minute.

6   0x06  Distance        Distance travelled during the current activity.
7   0x07  Lap Distance    Distance travelled during the current lap.
9   0x09  Elevation       Current altitude above sea level.

13  0x0d  Heart Rate      Current heart rate (heart beats per minute, bpm).
14  0x0e  Average HR      Average heart rate for the current activity.

16  0x10  HR %Max.        Percentage of maximum heart rate.

19  0x13  %HRR            Percent of heart rate reserve (HRR=MaxHR-RestingHR).

22  0x16  HR Zone         Current heart rate zone (1..5).
23  0x17  Heart Rate      Ibid nr 13 decimal - duplicate?]

33  0x21  Pace            Current pace.
34  0x22  Average Pace    Average pace for the current activity.
35  0x23  Lap Pace        Average pace for the current lap.
48  0x30  Speed           Current speed.

50  0x32  Lap Speed       “ Unknown _ _ _ _ . _ “

56  0x38  Timer           Stopwatch: Duration of activity. Paused if stopped.
58  0x3a  Lap Time        Elapsed time for the current lap.
59  0x3b  Time of Day     Current time of day

64  0x40  Calories to Go  Remaining calories to burn. If workout target]
65  0x41  Distance to Go  Remaining distance. If set as a workout target]
66  0x42  HR to Go        Difference between current HR and workout HR target]
67  0x43  Repetition      Repetition ? no lines or numbers; “
68  0x44  Time to Go      Remaining time during workout. If a time target is set]
_______________________________________________________________________________

I can get a max of 2 screens of 1 to 4 fields.
I have not run with the other two screens we can get on a 220 that are for HR and Workout with other field numbers entered into screens 3 to 8.
_____________________________________________________________________________

I have been running and riding with 4 fields for 4 weeks now and its stable and required no clunky workarounds. The only drawback is that once you enable the 4th field you are stuck with the selected 4th field until you do a hard reset or replace the 0RRUNNIN.FIT file. You can change the first 1, 2 or 3 fields to any of the normal metrics from the watch menu as before.

Lets make Activity Screen 1 a 4 field screen showing LapTime, Speed, Pace and Timer.
I put timer last as its a field that i would always have on a screen. This allows me to add and change the first 3 from the watch at any time.

From the above table we need. Laptime (3A), Speed ( 30), Pace (21) and Timer( 38).
Copy your 0RRUNNIN.FIT to your PC as above.
Open it with the hex editor.
Edit addresses 0x28A to 0x3A, 0x28B to 0x30, 0x28C to 0x21, 0x28D to 0x38.
Edit address 0x291 to 0x04 to enable the 4 data fields.
Save the file.
All done... Not quite.. for the watch to suck the .FIT file into to its belly it needs to make sure the file is correctly formed and not corrupt. We have not messed with its format but will have changed the checksum of the file.
There maybe other tools out there to create a new 16bit checksum but i use the FIT tool tester.
Re-run the tool over the new .FIT and look at the last few lines.

java -jar fittesttool.jar -d 0RRUNNIN.FIT 

Your should see a 'File integrity failure' error.
Take note of the hex number at the end of the 3rd last line. The below example is E873.



Take the E8 and the 73, reverse them and with the hex editor put them into the LAST 2 locations in the .FIT file you are working on.



Save it and re-run the fit test tool.


Dont worry about the last 2 lines that show an error. As long as the CRC and the last 2 bytes match you are done.

At this point you have not changed anything on your watch at all. If you do proceed from here and IF it screws up your watch don't come crying to me. Its your choice and and you do so at your risk.


Replace the 0RRINNIN.FIT on your watch in the GARMIN\NEWFILES folder.
When you unplug the watch from the USB clip you should see it 'Updating' for a few seconds.

That's it. go into your watch activity screen menu or just press start, start to see how 4 fields looks. ( you may need your glasses ;-)





Thursday, March 5, 2015

Garmin Forerunner FR220 Test Mode.

Garmin FR220 training for a 1/2 marathon.

Good morning anyone ;-)
I love to run...more than 2 km but at this stage less than 30 km..Road , track , hills, Hot..
After 4 years of random training, my times were with-in 2 minutes of a 90 minute 1/2 marathon. I needed to train smarter & better.
My old Polar watch died so having Garmin Forerunner watches burned into my mind as the top of the pile, i jumped on the early adopters list for a new Garmin Forerunner 220...  Garmin look to do both Alpha and Beta testing of products on production user purchased devices. My opinion is if you want to purchase a watch, not have to do updates and just want to go running, then don't get a Garmin watch that has been out for less then 12 months. Pre-read the Garmin Forums and Ray's site http://www.dcrainmaker.com/

It had a few ( cough..cough) bugs when it was first released in November 2013, but by firmware version 2.90 it was stable and very usable for distance running.

Basing my training on the Hanson method of training for the last 16 miles, not the first.And using heart rate zones based on LTRH i had the best 18 weeks of running that eventuated in getting under 90 minutes with energy to share ! 87 minutes for the Gold coast half in July 2014.

OK... what now.... hm... time to play with this USB/Bluetooth connected device....
The watch mounts like a USB memory device.. several folders with settings, logs , activities... nothing all that interesting for now...

_____________________________________________________

 TEST Mode.


Most Garmin devices have a TEST MODE.. it only took a few minutes to find Test Mode on the FR220.

Power it off.
Hold in the UP and Down buttons ( lower left two) while powering the watch on with the light button ( top left). Release the light button but keep the other two pressed for over 7 seconds.

You should get the first image in the below photo.

Pressing the LAP button ( lower right) steps through the other test screens before looping back to the first screen.

When on screen 1 pressing the start/stop button ( top right) turns the vibrate motor on and off.

On screen 2 the start button steps through a range of LCD colour and alignment screens.

Screen 3 is a button test screen.

Screen 4 is GPS, Heart rate and footpod test screen. If you have a footpod or HRM on and in range it should display their serial numbers and some times my unit shows movement data.
The GPS test is in 'GPS TEST' mode by default. Pressing the light button toggles between TEST and FULL. When in full the watch turns on the internal GPS and displays the SNR ( Signal noise ratio ). I have found it to display a nIumber between 16.00 and 28.00 if it can just see one or two satellites but would not show GPS lock if you were to have it in normal mode and want to run. An SNR of over 42.00 is very good. Normally I see mid 30s when in clear open sky's.

Test screen 5 just looks like a back light, contrast and pixel test screen. Pressing start button just flashes a black refresh or something up the screen.

Screen 6 is the 3 axis accelerator test screen.

Screen 7 is ANT test mode. you can turn on and off ANT test mode and switch between 3 carrier frequencies. Love to know if anyone knows how to put this to use ?

The last test screen is the Blue tooth 4/ BLE test screen. Several selections of tx rx freq and channels are available. Again i have not done anything with this mode.

So that was it.
Usefulness .... We can see the battery voltage , and if the watch is getting a good satellite signal.
                         ___________________________________________________

USB conversations when in Test Mode.

When the watch is docked into its USB cradle and powered it shows the battery charge level in %.
Unlike some previous Garmin watches you can not charge the watch while using it for an activity.

I had the idea to see if the USB drive looked different when i try to connect to it with it in TEST MODE. It didn't jump to the usual % charged mode , it stayed in TEST MODE and was not mounted as before in USB memory stick mode.

I tried to talk to the watch using all number of terminal emulators and GPS tools with NO response at all... until i used the free version of GPSU52.  ( I may have loaded the 'GarminUSBdriver'  by this stage as well.)

Here are the settings that worked for me.



Open 'Interface Monitor' in the GPS menu.
Then click 'Connect' in the same menu.
BINGO !...well its something..


Poking keys did nothing more.. but when i clicked 'Connect' for the second time i got this:

As the red annotation on the image shows, converting the hex string returned by the watch to characters tells me i have good data from the watch.

Web searching for a few hours found a few very old docs on Garmin USB protocols but nothing that looks like the record types in the above image.
Wait a minute.. back when playing with TEST Mode, screen 4 allows for TEST and FULL GPS testing. The above dump was in TEST mode, not full.. lets look at the data in Full mode.


The FULL mode dump was taken outside with clear a clear sky. Googling finds that record type 99 looks not to have been decoded, but there is some info out there on type 72 ( Satellite Data Record ). See page 15 of this doc).

Now lets pull apart one type 72 record.

Now lets pull out each field.
The data in the green box should be the GPS satellite number, Elevation and Azimuth at the time i did the capture ( Bendigo Victoria Australia, 5:33PM 13-March-2015 DST ).

The staus bits do not look to match 100% with the document. More work needs to be done on this. Got any ideas ?

I used the Trimble web site to take a snapshot of a skymap that i hope will show the GPS satellites that should have been visible to the watch at the time of the capture.


Your Beauty ! All 9 satellites reported by the watch were in view at the time AND each elevation and azimuth are with in 1 unit of the watch ! ( Sat#21 is under the QZSS data box in the above image).
By the way the QZSS satellite is the first of 3 Japanese satellites that will allow us in this side of the world to have GPS lock in built-up streets, canyons and in doors through windows.