Monday, February 25, 2013

Recover lost JPG files on an SD Card

I recently cut and pasted some family reunion files from an SD Card to my PC hard drive where I proceeded to do some editing. Yes, 'CUT & paste' rather than 'COPY & paste' was a rather stunning act of carelessness and inevitably Murphie's Law prevailed; I over-wrote a source image which I later needed and there was no easy way to recover it.

Fortunately, there had been no activity which had written to the SD Card since the deletion, so the original images were still intact and could be recovered. Unfortunately, there are no ready use tools in Windows 8 like "undelete" or recycle bin access for SD Cards.

A quick look on Google showed a range of third party tools capable of recovering lost images in cases like this, including recovering partial images where part of the data may have been lost. (More about that later).

I downloaded and tried two tools and was immediately frustrated and disappointed by the exercise. It was a timely reminder that in the Windows 8 environment the installation process for unknown and untrusted third party software can deliver crap that is either crippled (a demo version which required the user to purchase a key on line - no forewarning regarding price), or comes with other headaches such as changing the web browser environment.

Sometimes I wonder why I don't just stick to the Linux Ubuntu environment and be done with it. The Linux solution is just so easy.

I went back to Google, and after researching likely recovery tools for Linux, I selected 'recoverjpeg' as weapon of choice. It had a good review, is a mature product developed by a trusted source, has a dead simple command line interface and bugger all footprint.

Here's how the heck I did it:

I fired up Linux on my dual boot machine. In a terminal window, I downloaded and installed 'recoverjpeg' using the following command:

     sudo apt-get install recoverjpeg

Sudo as you may know is used to provided access and control when not logged in a 'root'. It will require the system password to be entered.

Instal a temporary directory on the desktop to hold the recovered images. The command sequences is:

     cd Desktop
     mkdir JPEGS
     cd JPEGS/

Do a quick check to confirm the device name for the SD Card presently sitting in a USB card reader. The command is:

     sudo fdisk -l

The output from fdisk indicated I had a 32 Gb card at /dev/sdk

Run recoverjpg from the destination or output directory with it pointing to the source directory. The command is:

     sudo recoverjpg /dev/dsk1

Note the file name 'recoverjpg' does not include the letter 'e' and in 'recoverjpeg'.

Voila! Success.....

It took about 30 minutes to run as my SD card was holding quite a lot. Eventually it recovered 1859 images, many of which were in the 16 Mb size range. I opened the destination folder in a separate file browser and could see things progressing quite nicely as each image was recovered.

I didn't persist with options to drill into the SD card sub-directories or go looking for particular files by date, time or file name. I just let it go to see what it would recover and with the simple command line, it recovered every JPG on the hard drive, regardless of whether or not it had been deleted or partially over-written.

It is worth mentioning that partial images were also recovered where some of the image data had been overwritten. The partial image may be useful if it can be cropped using an image editor. It is worth noting that if you catch it early enough, even if you have been writing to the SD Card, there is a chance an image you may want to recover may still be intact.

'recoverjpeg' gives each image recovered a new file name in the format "image00000.jpg" and it will jump to 6 digits when there are more than 100,000 images recovered in one session.

Because the returned files are not necessarily date time sorted, it may take a little while sifting through the thumbnail views to find the ones you want, but the results are well worth it.

I plan to put 'recoverjpeg' in my shoe box for later review. I would like to see if I can find a version of 'recoverjpeg' with a GUI interface or create a GUI wrapper that gives easy access to the options. In the meantime, now I have the lost files safely stored, I'm as happy as a dog with two tails and can now get back to processing some more irreplaceable family reunion images.




Thursday, December 13, 2012

A wireless printer port that keeps on changing

Lately I have been pestered by my wireless printer not printing. It seems to be something that has started to happen as I have added more wireless enabled devices to my network such as my tablet, mobile phone, iTouch, desktop, laptop, and ad hoc devices owned by family members come and go.

Invariably when I encounter this problem I find the printer port address is wrong. Although I have tried to fix it via my wireless router, it is only fixed while the printer server is turned on. Turn it off, and an ad hoc device will grab that port address. Turn it back on and the printer server will be on a different port. What a lot of buggery.

Well at this stage I can't find an easy fix for my Belkin Router so I can lock that port to the printer server permanently. In the mean time, here is the quick solution for getting the printer up an running again.


  1. Printing fails.
  2. Confirm the printer server and printer are turned on and status lights are OK.
  3. Open a browser window and log in to the wireless router, typically on 192.168.0.1
  4. Enter the security password and call up the DHCP Client list.
  5. Note the port number for the pinter server, typically 192.168.0.4
  6. Open the Windows Devices and Printers dialog from the Control Panel.
  7. Double click the printer.
  8. Double click 'See whats printing'.
  9. Cancel anything in the print queue.
  10. Double click 'Customize your printer'.
  11. Open the 'Ports' tab.
  12. Select the printer from the list.
  13. Select 'Configure port'.
  14. Change the printer IP address to agree with that in line 5 above.
  15. Click OK. (If it can't change the port because it is busy, then there is still something in the queue).
  16. Print a test page.
Occasionally it is necessary to re-install the print server. To do this, use the browser to log in to the printer port given in line 5. Run the add port program then repeat above steps.

Nifty Nev
Dec 2012.


Thursday, October 28, 2010

Sony DSC-F828 loose lens turret - part 8

With the lens turret swivel mount screws nicely tightened up and secured, we can now carefully retrace out steps. There key things to keep in mind when reassembling are screw tensions, don't miss out on any steps, or parts, look for pinched cables and cables that are not properly seated. Work you way backwards through steps 8 to 1 or if you are really confident you can just use this part which will get you back to power on:


Step 1:
Make sure you replace the swivel mount bearing washer and be careful with the grease and potential for contamination.


Step 2:
When you replace the retainer, make sure you have the dentent engaged in the slot otherwise entrapment will occur. Tighten the three retaining screws evenly and apply enough pressure to just prevent the swivel mount binding.


Step 3:
Reset the swivel mount and the plastic cable tie-down seat. Ensure the screws holding the lens turret swivel mount on the camera body are very tight.


Step 4:
Reseat the flexible cables and pass through the swivel mechanism without undue twisting or distortion. Screw the seating mechanism into place. Test the swivel can rotate about the flexible cables without undue rubbing, bending, twisting or abrasion.


Step 5:
Ensure the flexible cables are properly seated in their appropriate slots in the camera body. 


Step 6:
Pass the power cable through the lens turret swivel mechanism via the guide.

Step 7:
Present the camera back to the camera body as shown. Carefully inspect your work done so far looking especially for flexible cable that are not seated properly. Fit the camera back cables to their matching headers. Carefully close the camera back onto the camera body. Do not force anything. It should go into place easily. Carefully inspect for any flexible cables that may be pinched.
Step 8:
Apply all screws to the camera back. Tighten firmly with Lock Ace on each screw.


Step 9:

Plug the power cable in to the lens turret and route the cable via the plastic lugs as shown.


Step 10:
Ensure the tripod mounting bracket is attached.
Step 11:
Reattach the lens turret to the swivel mechanism. Again, make very sure these screws are tight and use Lock Ace or similar.
Step 12:
Reseat the three flexible cables. Make sure the ferrite is in place. Ensure the cables are slotted into the headers properly.


Step 13:
Restore the small connector cable to its position as shown.


Step 14:
Present the side cover to the lens turret assembly and connect the flexible cable.


Step 15:
After carefully checking the work done, and ensuring there will be no pinched cables, carefully screw into place the side cover.

Ensure there are no parts left over.

Fit the memory cards and battery into the camera and turn on. The camera should now spring back into life with no ill-effects and a rock steady lens turret mount. 

Thanks for reading through this. All constructive comments appreciated.



















Sony DSC-F828 loose lens turret - part 7

In this part we will inspect and repair the lens turret swivel mount.


Step 1:
Observe the detent mechanism and the three screws holding the retaining plate on the swivel.  If these screws have come loose then this may be the cause of your problem. Tighten each screw in small amount sequentially in order to apply even pressure to the swivel. The swivel should not be loose, and the amount of tension applied should be enough to require firm pressure to rotate the lens turret. Warning - ensure the plate is only tightened with the spring loaded detent in the slot provided, otherwise the detent will be trapped under the retaining plate and become distorted when you try to tighten the screws.


Step 2:
If the swivel retaining plate screws are not the cause of the problem, then remove the screws and the retaining plate and set safety to one side.


Step 3:
Carefully lift the washer out of the swivel mount bearing slot. Note the part has a grease lubricant. Be careful to not contaminate the grease or the bearing slot, or introduce grease by contact with other parts of the camera. With the washer out of the way, four screws will be revealed. These must be nipped down very tight and held in place with Lock Ace or similar.


This should now have addressed every possible cause for having a loose lens turret. In the next part we will quickly review the reassembly.

Sony DSC-F828 loose lens turret - part 6

In this part, we will withdraw the flexible board ribbon and power cables from the lens turret swivel mechanism. This will allow us to separate the swivel mechanism from the camera body. We can then inspect the swivel mechanism and initiate the necessary repairs.


The three flexible board ribbon cables pass through the swivel mechanism. Note the clamp used inside the camera body to secure the three flexible boards, bolted down by 2 x 1.7mm screws (item 6) above must be removed before the ribbon cables can be withdrawn.
Step 1:


The silver screws either side of the ribbon cable must be undone. You will need the screwdriver extension to reach the one on the left. Use a tiny dot of petroleum jelly on the screwdriver tip to hold the screw while you lift it out (do the same later when you put it back)
Step 2:
Here we can see the ribbon cable clamp has been removed and the flexible cables have carefully been folded back over the camera body and out of the way.


Lift the ribbon cable clamp seat up, off the locating dowel and the two cast pillars that accept the clamp screws, and place safely to one side. Observe the detent spring mechanism on the inside left of the swivel mechanism. Warning! -  the flexible ribbon cables must be moved out of the way as described in Step 1 and 2. Failure to do so will result in the detent spring mounts damaging the flexible cables when the next step is attempted.


Step 3:
Remove the two retaining screws attaching the lens turret mechanism to the camera body. Next, with the cables safely out of the way, grasp the camera body in your left hand as shown and rotate the lens turret swivel mechanism out of its seat in the camera body. (Rotate the lens turret up, or clockwise in the view shown here). Carefully set the camera body to one side.


In the next part we will examine and repair the lens turret swivel mechanism.














Sunday, October 24, 2010

Sony DSC-F828 loose lens turret - part 5

Now we have the lens turret off the camera, its time to remove the swivel assembly so we can tighten up those loose screws. Here are the steps:


There may be subtle differences between your camera and the version described here. Note there are 8 x 2mm screws to be removed and two flexible board ribbon cables to disconnect before the back can come off.


Step 1:


Remove the two screws at the left hand end of the rear cabinet assembly.
Note one of the screws is partially hidden by the camera strap attachment point




Step 2:


Remove the two screws at the right hand end of the rear cabinet assembly.
Right hand end, rear cabinet assembly, lower screw




Step 3:


Remove the two screws on the bottom of the rear cabinet assembly.
Both screws are located near the battery access cover




Step 4:


Remove the single screw on the top of the rear cabinet assembly.
One screw in the top of the rear cabinet assembly




Step 5:


Remove the single screw on the top right hand end adjacent to the thumb wheel selector.
In this image you can see there are three screws in total. The one referred to in step 5 is lower left. The others are removed in step 2




Step 6:


Carefully withdraw the rear cabinet assembly housing away from the camera body. It should not require any force. If it appears to be hanging on at any one point, it is almost certain you have not removed a retaining screw.




Step 7:


With sufficient room, disconnect the two ribbon cables from their sockets on the boards at the camera body end. Note one header is a slot receptacle and the other is a miniature dual in line connector.
The rear cabinet assembly will come clear and leave enough room to access the two connecting flexible board cables.




Step 8:


With the rear cabinet assembly now separated, place it safety to one side.
The rear camera assembly is now separated. Note the differences between the two flexible cable connectors.




This now exposes the inside of the lens turret swivel mechanism. In part 6 we will show you how to withdraw the flexible board ribbon cables and power wires that pass through the swivel mechanism. It is extremely important that you complete part 6. DO NOT ATTEMPT to remove the swivel mechanism until the ribbon cables have been moved well out of the way





Sony DSC-F828 loose lens turret - part 4

In Part 4 the challenge is to remove the lens turret assembly from the swivel mount.

Follow the numbered steps. The photos below will assist.


Step 1.
Remove the tapping screw holding the radiation shield in place.


The bright silver tapping screw holds the copper shield and three ribbon cables in place. Remove the screw.



Step 2.

Remove the tape and fold out the copper shields. The copper shields may have been glued down in the factory, but they will separate with a bit of gentle pressure.

Note the retaining strip holding the flexible cables in place. Do step 3 then the retaining strip can be be lifted off the dowel at the end near the bottom of the image, and drawn out from under the claw at the other end. Note the plastic dowel near the claw has broken off in this example



Step 3.

Carefully draw each of the three flexible board ribbons from the terminating headers on the lens turret board.

Note - some headers have a brown strip that may be lifted up and snapped back into position. This helps clamp the edge connector and aids in removing and positioning the connector. In this image you may notice the brown strip has been lifted up.

Step 4.



The retaining strip holds the three flexible board cables in place is now visible. This is located by two plastic dowels and has one end held down by a plastic claw. Carefully lift the retaining strip up off the dowel at the opposite end to the claw then draw it out from under the claw and off the other dowel.

Remove the flexible board ribbon cables from the retainer housing
Step 5.

Carefully lift the flexible board ribbon cables up and clear of the terminating board and retaining strip. Be very careful to not drop or loose the ferrite core which is attached to the flexible board at the bottom of the stack of three.


Step 6.

Remove the small flexible board strip connecting the lens turret board designated AJ-006 to the board behind the lens turret, on the camera body.

Disconnect AJ-006 at both ends and set safely to one side to avoid damage. Note it is only a small, 6 pin cable. It is located under the lens turret assembly, just near the tripod mounting block.

Step 7.

Undo the two retaining screws holding the lens turret in place on the camera body. These are located on the right hand side of the lens - one is near the ACC socket and the other is up near the pop up flash.

Here are the two lens turret retaining screws mentioned in Step 7

Step 8.

Carefully disconnect the two wire power cable from the lens turret assembly. The lens turret can now be set carefully to one side. Note the route used to keep the white wires in place where they will not be likely to abrade or be damaged by movement.

Firmly and gently withdraw the two wire plug from the lens turret and take the loom out of the routing clips. Watch out when you put the lens turret down. It can roll away - you don't want it falling on the floor!

Now we have the lens turret out of the way, we can now see the swivel assembly much more clearly. It may still not be possible to clearly see what is causing the looseness. We will look at that in part 5.