Friday, April 1, 2016

Flashing Recovery to the Reach RTK from Emlid

When I received my anxiously awaited Reach RTK GPS units, I immediately had a problem with one of them - it initially didn't boot properly to a green light which initially means "I have made a Wifi hotspot" or later in the procedure "I have joined your Wifi network"...

In the quickstart section of their documentation I saw how to reflash with the latest firmware and as there wasn't anything I could loose at this point I decided to give it a try.

I downloaded the latest Reach image from their site and followed the directions. I have Windows 10, and had no problems flashing the image initially - you run the flashall.bat file they provide and it all happens automagically; you unplug and replug the Reach unit and the flashing starts.

However I did not end up with a usable Reach. I forget the exact sequence of events but eventually I ended up with the flashing process suggesting that I run "flashall --recovery" and then when I did so suggesting that I install xFSTK tools. Which on further investigation are only available on Linux.

I next tried my daughter's Linux desktop - she is getting into programming etc - and looked into compiling and installing xFSTK tools. Not easy for someone who doesn't use Linux. I read through Ubuntu's "easy" guide for compiling a program and followed it with some success, also following other guides online re installing xFSTK in particular - installing what seemed an interminable number of packages needed to support this software and still failing: as near as I can tell because I was running Linux 15.10 and the xFSTK was expecting 14.04.

I then found a guide for installing Ubuntu to a thumb drive for the purpose of reflashing an Intel Edison which I followed not without some headache and here regurgitate for you because I found so many things referenced that I had to find out myself I thought it would be helpful to list them in one place.

  • Find a USB thumb drive, at least 8GB, faster is better unless you are patient.
  • Download Ubuntu 14.04.4 32-bit ISO. - Although they recommend 64-bit ignore them, it needs to be 32-bit!
  • Download and install Universal USB Installer
  • Using the universal-usb-installer, create a live-boot USB key. Check the format drive option, and make sure you give it plenty of persistent storage in step 4 of the dialog, as you'll need that to extract your flash images. Recommend 4GB.
  • Download and unzip it and copy it to the thumb drive.
  • Unzip (if you haven't already) the Reach 1.2 image and copy that to the thumb drive. I'll be referring to it as being in the directory "reach_image"
  • Now boot a computer using the USB stick. You'll be pressing a key when the computer display first comes on that will give you boot options, then choosing the thumb drive. Check out this page for various hotkeys... When booting, select the "Try Ubuntu" option. The persistent storage we selected when creating the bootable USB key will allow us to make changes that persist across boots, so we don't have to re-do everything every time we boot.

Once you boot up Linux you need to open a Terminal window. I found that pressing the Windows key shortcut brings up a search bar, type "terminal" and you find the shortcut.

You will also need to be connected to the internet - so connect to wifi or whatever is necessary to do this. Test in pre-installed firefox browser...

Now you need to mount the thumb drive as a disk so you can see it. You'll need to know what the drive is called to mount it. To do that, type the following (followed by enter) into terminal. It really helps to use copy and paste so you may want to open this page in a browser...:

sudo fdisk -l

You're looking for a partition that should look something like: /dev/sdb1. Remember what it's called.
Create a new directory in /media so you can mount the drive onto the filesystem:

sudo  mkdir /media/usb

Mount disk:

sudo mount /dev/sdb1 /media/usb 
note that your disk might not be /dev/sdb1 - replace as needed!

Now change directory to the thumb drive:

cd /media/usb

Now you can install the xFSTK tools -

dpkg -i xfstk-downloader-_0.0.0_all.deb

(If you get errors at this point just move on to these next steps anyway.)
The apt-sources need to be tweaked to give us access to the dfu-util package, it's not present in the live-boot image, so:

sudo nano /etc/apt/sources.list

Now you are in the Nano text editor where you can navigate using the arrow keys. Add the line:

deb trusty universe

...and then exit using ctrl-x, pressing Y to save changes on your way out.

Now update packages:

sudo apt-get update

followed by

sudo apt-get install dfu-util

At this point try to flash recovery:

cd reach_image

Now run the flashall script (leave Reach unplugged, plug in after the script starts to tell you it can't find the device...):

./ --recovery

Note: it is important to have the "./" in front of, it is also important to note that there are 2x dashes in front of "recovery"...

You should see feedback indicating that the flashing was successful.

If, however you see that you still need to install xFSTK tools, something must have gone wrong in the steps above! If the "dpkg" line didn't work but the subsequent installation of packages did, it might be worth trying to "dpkg" again and hopefully end up with a successful installation.


Now for an interesting footnote: I was able to flash recovery no problem by this method BUT when, after recovery, I used
to write the Reach image 1.2 although it appeared to write correctly I was still left with a Reach that did not boot correctly - still booted to solid red light!!!!!

I found that to write the image successfully I had to:
1) flash recovery from Linux
2) use flashall.bat to flash the reach image from Windows 10
Then I finally had a working Reach unit!

If I had any previous experience working with the Intel Edison I could tell you which bits of this complicated mess are just par for the course for this particular micro computer - and which bits are due to the Reach software running on it. But I don't...

I'm still having another problem with my Reach units that is as yet unresolved, but I live in hope:)

Good Luck!

Tuesday, April 14, 2015

Fixing Color Offset / Ghosting on Ricoh C820 Printer

We've had a Ricoh C820DN color laser printer at our office for some time now. Bought online without service contract 5 years ago and it has been printing well and reliably since then. We've bought toner cartridges but that has been the extent of our maintenance program.

Enter the Ricoh Repair Guy. Shades of "Twas on a Monday morning, the Gas Man came to call..." I don't remember exactly why we called him - I think certain sizes of paper were sometime sticking but because no-one in office had the time we found a Ricoh service center and had a tech come in.

After he left the printer did not have the sticking paper problem but the magenta color was ghosting - or offset - by quite a bit, rendering every color print unusable.

Called the guy up and he says he will order a part to fix it.

Called the guy a week later - he forgot to order the part. But it will be about $600. He says something about the waste drum for the red being full. He either doesn't know what he is talking about or doesn't want me to know - this print HAS no red, it is CMYK. He suggests we order the part ourselves from Ricoh.

The nearest part I can come up with that he might be talking about is the Color Drum Unit which has three parts for CYM and can be bought for around $400 online. But I'm not really satisfied with this response so I do some more digging.

Finally I find the Service Manual (if you need it let me know...) and read this:


Line Position Adjustment

The automatic line position adjustment usually is done for a specified condition to get the
best color prints.
Do the following if color registration shifts:
Do “Forced Line Position” as follows to do the forced line position adjustment.
1) First do SP2-111-3.
2) Then do SP2-111-1.
To check if SP 2-111-1 was successful, watch the screen during the process. A
message is displayed at the end. Also, you can check the result with SP 2-194-10 to

Image Adjustment

You should also do the line position adjustment at these times:
After you transport or move the machine (you should do the forced line position
adjustment if you install the machine at the user location.) if the machine is
pre-installed at the workshop and moved to the user location,
When you remove or replace the motors, clutches, and/or gears related to the
drum/development/transfer sections
When you remove or replace the image transfer belt or laser optical housing unit

My guess is that the tech did not know he was supposed to run these after messing with the printer.

With some more digging online I found the way to access the C820 Service Mode:

Press up and down arrows simultaneously for 5 seconds then press ok.

SP2 is to be found under "Engine" and then "Drum". Then choose 111 and then 003 as you might expect, and so on.

My results for SP2-194-10,11,12 were: M1,C1,Y1 respectively where 1 means completed successfully.

And the test print came out looking great!

I hope this helps someone else out there...


Thursday, July 19, 2012

Gluing Repairs

Hot Glue

And by this I do not mean "super glue" or Cyanoacrylate.. I mean the stuff that actually gets hot, in a little gun you plug in, and oozes out molten plastic.

You can buy two different melting temperature sticks as well as a two-temperature gun. You can also buy woodworking sticks which take longer to harden once heated to give you more time to position items together.

Here are some uses:

1) fixing drywall. Or plasterboard as the folks on the other side call it... If you don't have much time - not enough for a proper "wait for a deep crack fill job to dry" you can use hot glue as the initial stage and follow with a final coat of real filler - or plaster, whatever.

2) Any kind of temporary "tack-welding" of pieces that need to be held together while a stronger glue joint sets up

3) Fastening an external t-stat wire & sensor to an outside wall.

4) Use inside heat shrink tubing to create a good water-tight seal. Sure, you can buy heat shrink with the stuff already inside - like well wire splices - but that is not always convenient...

5) Amusing kids - add a handful of small junk items like old screws, cardboard, etc and they won't hardly complain about the inevitable burns they give themselves(!) making strange contraptions. Word of advice though - don't leave them unsupervised!

6) Fixing books - a quick a dirty method admittedly, I would not use this on any book I really cared about - but I have fixed a number of books that my 3 year old torn the cover of.

Super Glue

A really strong bond can be made by wrapping multiple turns of a strong cotton thread around something and then applying a drop or two of superglue, which will stop the cotton unravelling. Thin wire can also be used - and if you are using thin wire you can substitute solder for superglue depending on the situation.

Super glue sets in response to pressure, moisture and also certain chemicals - you can buy a "kicker" spray that sets it instantly. One alternative to buying "kicker" spray is to hold the glued-up item over the spout of a boiling kettle. Perhaps a combination of the moisture and the heat from the steam pretty much instantly cures at least the surface of the glue.

A good cheap source for this is the Gorilla brand at Home Depot, a 20g container for under $7 is great value. Those little tubes run out quickly and clog if they don't run out!

Solvent Glues

Use a solvent type glue when possible rather than gravitating to superglue for everything.

You can test if the glue might work by applying a little to an inconspicuous area of plastic, waiting a few seconds and then gently scraping the area with a screwdriver or something - some of the plastic (color) should come up if the plastic is dissolving. If so then chances are the glue will make an excellent repair. PVC glue obviously works on PVC. ABS on ABS. There is also a multi-purpose type glue that can be bought at the same type of stores (builder's, these are plumbing/electrical items) that works on both these plastics and probably other relatives.

Lego, and quite a few other similar toys, are made of ABS and so the real "Kraggle" would be ABS glue :)

For acrylic (some kitchen appliances - fridge shelves - display shelves that are clear) use something like IPS Weld-On plastic cement. The link is to quite a large tube!

Solvent glues have very strong fumes as you might expect.

Epoxy or Two-Part Glues

Epoxy comes in many different flavors and to some extent it does matter which you buy for which application.

Main differences:

  • time to cure. Can be from 90 seconds to 24 hours - in general the stronger bonds are from slower curing glues.
  • consistancy: you can buy thin liquid (for pouring in a mold) or the normal tube/plunger type which is fairly gooey and will need some containment or to be used in thin layers; or a stick / paste type which is good for filling large voids or making solid shapes.
  • additives. This is what makes one type good for plastic (it will have solvents added which help dissolve the surface of the plastic and increase bond strength) or metal / masonry where dust of the same material is added to increase strength plus I'm sure specific bonding agents. In a pinch they should work interchangeably though perhaps not as well!
  • Flexibility. Some are designed to cure fairly brittle and hard, others to a more plastic material.
Epoxy makes a really strong bond when done correctly. It is often worth roughening the mating surfaces before gluing.

One really great two-part glue is Plyogrip Plastic Repair. I used the 3 minute version to repair leaks and prevent leaks in some ABS tubular membrane shroud housings. This stuff is great in that it cures well and contains solvents to make it basically a part of the plastic you are trying to repair. It will be expensive to get started with because you have to buy the application gun - but with the right project, for instance repairing a car bumper, which I believe it is designed for - it would be invaluable. A really tough & pliable finished product.

Melting / Welding

Combine this method for best effect with the insertion of a metal strengthening member. You can use an old soldering iron (will hurt the tip of a new one or at least get it very dirty...) to "weld" the plastic together. Some plastics respond better than others to this. Some don't like it, "burning" and getting bubbly and brittle. Sometimes you can use scraps of plastic cut of things you don't want like buckets etc as "welding rods" to fill gaps. Once solidified the plastic can be filed into shape. It never looks very good afterwards but it often fixes something better than glue is able to.

Re the metal strengthening member: use whatever is at hand that works... Often a metal coat hanger comes in handy, snipped to the right length. Obviously it will depend on the size of what you are fixing! The soldering iron can be applied right to the metal and as it heats up it will sink into the surface of the plastic. When below the surface the plastic can be smoothed over the top and you have a finished product that may be stronger than the original if you did it right!


Wednesday, July 18, 2012

USB to Serial

People tell me that usb to serial adapters don't work for certain things. Well, that may be true, but so far I have found that with the right adapter they do work, as transparently as a real serial port. Note: I am speaking of RS232 here...

So, what to use?

The FDTI chipset is the answer.

For programming Monaco Fire Alarm Panels (mainly M2 addressable) I've habitually used an FDTI "sample cable" they sell for research - really for people to buy who want to develop for their chipset, or rebrand. But you can buy it as a consumer. Here: - though this looks like an updated version of the cable I use.

I also searched for products that use the FDTI chipset, and found - which I have tested and used for programming a Versamax PLC. It just works, out of the box (yes, you do have to install drivers...).

Some attached topics of interest:

1) Replace Hyperterminal with TeraTerm Pro. I've been using this a while, I found it while searching for terminal software (free!) that would log my session - because while testing the aforementioned M2 fire alarm panels they spit out a log of device tested, time the alarm came in, etc etc which is nice to round up into a final inspection report. In the beginning I would ctrl-a > ctrl-c the contents of hyperterminal and paste it into a wordpad document - but hyperterminal added things and occasionally lost things, or crashed - I forget the exact things that happened but it happened enough that I knew I wanted something that could log a session. 

TeraTerm Pro has been free for a while but is now open source and thus still being developed past the last 1999 edition. Here: It does a lot of other things too...

2) Modify the coolgear serial adapter to work with the Versamax PLC. The gender is right, and the cable length is nice (6'). The nuts to either side of the DB-9 port do however need to be pulled side to side then off (not threaded) in order to not conflict with the threaded nuts on the PLC (worth more $ so remains unmodified:) ). Then the blue case needs to be removed (blade slipped between the two halves of the case where the clips are - you can see through the translucent case where. Now the bare circuit board can be plugged into the PLC port with no problem. Careful not to disconnect the PC cable and forget which way round it goes, though - there is nothing to stop you putting back on wrong! See attached photos.

You can also see my desktop ass'y of the VersaMax PLC - I'm setting it up in the office ready to take out to the field. Setting it up here involves learning how to program etc...

- JB

Friday, February 17, 2012

Valentine's Day Aurora

So I've finally put together the pieces of a time lapse video of the Northern Lights. On Valentine's Day after dinner I stepped outside to see the beginnings of the most amazing display I've seen yet this winter.  And it was only 20° F (above 0) outside! We've had some amazingly long stretches of -30° to -40 this winter, and that is not fun weather to set up any kind of camera equipment in... So I was thrilled to see temperature and northern lights together!

After getting my kids to bed it was about 10pm by the time I had strung together the 5x 50' and 1x 100' extension cords from the back of my van (sometimes being an electrician comes in handy!) and started setting up my tripod in the middle of the field in front of my house, where the camera could view both the neighborhood house lights (to give some context) & the northern lights. 

I often borrow this same old bogen tripod that is beastly heavy but very stable from a friend whenever I want to do something like this. It has a video head but that doesn't matter now - I quickly tighten down the camera and after some experimentation settle on the lowest position the tripod affords, breaking through the crusty snow to get a good bite in the field below. I've already inserted my canon power adapter in the camera and run through a quick refresher course of the various Magic Lantern settings (I'm still pretty unfamiliar with Magic Lantern, though I've used it to video a tutorial on faux wood grain which I will be sharing sometime in the future... Anyway hats off to the developers, it has given my camera a new spring in its step!). I also use the time in my warm van to take a few trial photos out of the window to get the basic settings down. The temperature outside has dropped to 10° and with a bit of wind you get cold quicker than you expect when fiddling with camera buttons.

Here's the setup, from my inadequate phone camera...!

I used manual focus, and the live view screen zoomed in 10x to check the focus - this is a great method whenever using manual focus when you have time for it... Especially when everything is pretty dark.

Here's a list of equipment & settings:
  • Canon 50D with Magic Lantern
  • Canon power adapter (ACK-E2)
  • Good solid tripod
  • F2.8 (it was pretty dark and I needed all the light I could get)
  • iso 800 (I tried for 400 but the shutter times it gave me were too long)
  • exposure: 8 seconds.
  • long exposure noise reduction ON
I used jpg rather than raw because I don't have the time to mess with raw on this project & my cf card is not big enough currently to take a night of raw photos one every 16 seconds - I ended up with 1967 photos from about 10pm to 7:45am. The camera was still clicking away as I walked up to it in the morning.

Pretty simple really! Magic Lantern is simple enough to use once I figured out that the Q button that is mentioned in the menus is the "func" button on the 50D... The intervalometer is better than the one that comes with the Canon utility - which only works if you are tethered. Thats because a) you don't have to be tethered and b) the photo count limit is much higher - Canon's EOS utility stopped at around 500 shots for me last time I used it.

In actual fact the camera lost a few seconds every time and so I ended up with more like 17-18 seconds between shots. I confirmed that if you were to set an interval of 5 seconds and specify a 9 second exposure (for instance) magic lantern would honor the exposure time (+noise r. if selected...) rather than sticking to its interval and cutting the exposure short.

The good part is that once I was happy with my setup I could just go inside and get warm - and forget about it until morning.

Next day, I used Time Lapse Assembler to put the photos together. It couldn't be simpler - and is also free!

The vertical resolution is NOT, as greyed out, 853 but turns out to be 1280. I chose 30fps because I wanted smoother given that in each photo the lights would have moved position quite a lot - because of that 8 second noise reduction: during those 8 seconds nothing is recorded and any movement is lost so the picture "jerks" to the next position. I will have to try a night without noise reduction! Sure would increase the number of stars :)

Then in iMovie I added sound and a few bits of text to give some sense of time passing as well as a black fade in and a white fade out - goes well with the fade to white effect you get at dawn!

Custom resolution in iMovie:

To get a custom resolution of 1920x1280 I started my project as 1080p. Then I selected the video clip (once imported to the project) clicked the settings gear wheel and chose "cropping and rotation". Then I selected "fit" instead of "crop" which was the default - it was going to chop 200px off the vertical resolution which I didn't want. Next time I might position the camera so anything important is framed by 1080 high, but this time I didn't want to miss out on seeing the buildings OR any of the northern lights themselves... Lastly in the top menubar I chose "share > export using quicktime", chose "movie to MPEG-4" (I wanted the h.264 codec) and then used the following settings (reached by clicking on "options"):

For "Data Rate" I used 300,000 k/sec which isn't entirely clear in the screenshot. This was arrived at after a quick googling of "best data rate for 1080p video" - I scanned the results and made up an average. Final file size was 104mb so while I may be off (and I in no way claim to be a codec/compression guru!!!) I am not far enough off to bother me. Quality is pretty good also.

I really love seeing the stars move. Its also interesting to see the street lights pick up intensity - I think some light fog settled at some point - and then I think some ice must have formed on my lens as I was getting more little red streak refractions from the light towards the middle/end. The motion sensor light on the right hand house obviously needs adjusting!

For next time, higher frame rate either from lack of noise reduction (would save me 8 seconds) or higher iso.

And I just installed Aurora Buddy on my phone so that I can have some heads up next time there is a good display on! You can set it to notify you if an aurora prediction above a certain threshold happens. I'll let you know if it works:)

thanks for reading! I'll be back with more fun stuff in the future! - Jon

Saturday, January 28, 2012

Introduction - Omnibus

Omnibus - "my friend Mr Swann informs me, comes from the Latin, "omnibus", meaning to or for, by, with, or from everybody" - Flanders & Swann, "At the Drop of a Hat"

This blog will be a bit like that. I intend to post on various tools, interests, hobbies and so forth, on the premise that most gifts worth giving are things you would like to receive!

So, without further ado: "Hold very tight please! Ting! Ting!"