Setting up photo-card access

This file documents the procedure to set up access to the photo-card readers on hpoj-supported models with this functionality, including the PhotoSmart printers and several OfficeJet- and PSC-branded products.

There are two possible methods you can use for photo-card access, depending on what model you have:

See the hpoj Supported devices page for the most up-to-date list of which models support photo-card access using which of the above possible methods.

In case of difficulty

If something goes wrong with these instructions, then refer to both of the following separate documents for more information:

mtools method

Initial setup

Be sure to follow the instructions to compile and install the hpoj software and set up basic device connectivity if you haven't already. When "ptal-init setup" adds a new device, it probes the device for photo-card reader support and arranges for ptal-photod to be started automatically.

Place the following lines in /etc/mtools.conf (for all users) or ~/.mtoolsrc (for individual users):

	mtools_skip_check=1
	drive p: file=":0" remote
If you have more than one hpoj-managed device with photo-card readers, then add as many additional lines as needed, incrementing the "drive" letter and "file" number each time as follows:
	drive q: file=":1" remote
	drive r: file=":2" remote
	drive s: file=":3" remote
The drive letters are how you refer to the device with the mtools commands, and the numbers specified by the file=":0" keyword are used to match the drive letter with a specific instance of ptal-photod.

Important: Look through the rest of the configuration file to make sure you aren't re-using a drive letter that is already defined. If you are, then use different drive letter(s), and/or comment out drive definitions that you don't need. Also, try running mtoolstest to see if it detects any configuration file problems.

Accessing photo cards

The following mtools commands are useful for manipulating files and directories on the currently inserted photo card. For more information, refer to the manual pages for each command and the general mtools manual page.

Examples:

USB-mass-storage interface method

Follow this procedure as root to set this up:

  1. Create a "mount point" for the file system (for example, "/photos"):
    	mkdir /photos
    

  2. Make sure the "usb-storage" kernel module is loaded:
    	/sbin/lsmod
    	/sbin/modprobe usb-storage	# If it's not already loaded
    

  3. Look in the syslog file (probably /var/log/messages) for messages relating to usb-storage or "USB Mass Storage". Depending on your kernel version, there should be a message saying something like "Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0". (If you don't see any such messages, then try running "/sbin/rmmod usb-storage ; /sbin/modprobe usb-storage" and check for the messages again.)

  4. Insert the photo card if it isn't already inserted.

  5. Mount the file system:
    	mount -t vfat /dev/sda1 /photos
    
    Substitute for sda the drive name you found in the log message above, but append "1" after it. Also, specify the actual mount point you created if it's not "/photos".

  6. You can now use /photos as you would any other mounted file system:
    	cd /photos
    	ls
    	ee foo.jpg
    	cp foo.jpg ~/saved_photos/
    

  7. Important: Before removing the photo card or disconnecting or powering off the device, cd out of the /photos file system, close any applications that are accessing files on the device, and unmount the file system:
    	cd
    	umount /photos
    

  8. If you'd like to simplify the mount command above to something like "mount /photos", then add the following line to /etc/fstab (again, adjusting "sda" and/or "/photos" as needed):
    	/dev/sda1    /photos    vfat    defaults,noauto,user    0 0
    
    This line allows any user to mount the file system; remove ",user" if you want only root to be able to do that.
In general, this procedure should work on any USB device which, according to usbview or /proc/bus/usb/devices, has a non-print interface with a class/subclass/protocol ID of 08/06/50 (USB mass-storage).

If you have multiple SCSI (including USB mass-storage) devices, beware that the device numbers you used above could change, resulting in incorrectly mapped mount points, if you add or remove devices, or depending on what order you connect or power them on.

If you experience problems with this functionality on an older kernel version, then you may need to upgrade to the latest stable kernel version.

In case of difficulty

If something goes wrong with these instructions, then refer to both of the following separate documents for more information:

Next steps

You may now set up printing and/or scanning (depending on your model) if you haven't already, or return to the index.