Photo-card access details and troubleshooting

This file provides more detailed information about setting up photo-card access with the hpoj software, including possible troubleshooting steps in case something goes wrong.

Additional information may be found in the separate document pertaining to ptal-photod.

Also, be sure to consult the connectivity details and troubleshooting document, because some issues here may actually be connectivity-related.

General photo-card issues

Problem: I inserted a photo card, and the device asked me if I wanted to save photos to my PC. I selected "Yes", but nothing happened.

This method of saving photos to your PC is not currently supported by the hpoj software. Use the mtools commands instead.

Question: I want to copy files from one type of photo card to another. Can I insert both cards and do a direct copy?

No. Even though your device may have multiple slots for different card types, only one card may be inserted and accessed at a time.

If you want to copy files from one card to another, then you can copy them to your hard disk as an intermediate step. Alternatively, if you have more than one hpoj-supported device with card readers, then each one can have its own mtools drive letter and/or USB-mass-storage mount point, and you can copy from one drive letter directly to another using a single mcopy or cp command, depending on which photo-card-access protocol(s) each device support.

Question: Can I use gPhoto with hpoj?

No.

Question: My PSC 2510 supports "Instant Share" over the integrated network interfaces (10/100T ethernet and 802.11 wireless). Can I use this from Linux?

No.

mtools-specific issues

Question: What is the significance of the the X-Windows-style "display numbers" specified in /etc/mtools.conf or ~/.mtoolsrc?

The original intention behind mtools's "remote" feature was that you could run floppyd (the floppy-disk-drive daemon) on your local system, log into a remote system, set your DISPLAY back to your local system for purposes of running remote X-Windows applications, and use mtools commands on the remote system to access the floppy drive (for example) on your local system. Typically you would be using a single drive in this manner and using display number ":0" on your local system. For security purposes, the remote mtools instance would look for X authentication information for the display name/number corresponding to the remote drive letter, and pass that back to the local floppyd instance, which would validate it before granting remote access to the drive.

The hpoj ptal-photod-based photo-card access method stretches somewhat this floppyd concept. In this case, the user is presumed to be logged into the same local system on which ptal-photod is running, and it's possible to have more than one photo-card-capable device. As a result, the "display name/number" specified in /etc/mtools.conf or ~/.mtoolsrc doesn't necessarily have anything to do with that of the X server or the DISPLAY environment variable, but is merely used to connect a particular mtools drive letter to a particular instance of ptal-photod. However, due to the mtools historical bias towards the original X-Windows-based floppyd concept, the mtools client utilities still expect to find something that looks like an X authentication token for the drive letter's "display name/number", even though ptal-photod makes no use of it.

Problem: I got an "authentication failed" error message.

If an mtools command gives an error message such as:
	Permission denied, authentication failed!
	Auth failed: X-Cookie doesn't match!
	Can't open :2: No such file or directory
	Cannot initialize 'R:'
then try running the following command:
	xauth add :2 . 00
Substitute for ":2" the display name/number specified in /etc/mtools.conf or ~/.mtoolsrc which is being complained about.

Caution: Don't do this otherwise (i.e. on an display name/number on which you have an active X session), or you may break your X session.

Although mtools requires an xauth token in order to connect to ptal-photod, ptal-photod ignores any authentication information passed to it. Therefore, it's not actually necessary to be running X Windows on the specified display name/number, or even at all, as long as mtools can find an xauth token (valid or not) for the specified display name/number in the user's .Xauthority file.

Problem: I can't access the photo-card readers on the OfficeJet D or 7100 series through an LIO JetDirect.

ptal-photod doesn't work with the OfficeJet D or 7100 series via an LIO JetDirect connection. This is a limitation in the device, not ptal-photod or the LIO JetDirect. Use a parallel or USB connection instead, which can be connected either directly to your computer or to an hpoj-supported external JetDirect print server. Note that with the OfficeJet D and 7100 series, you can still otherwise use your LIO JetDirect even if you're also using the USB port.

Question: How can I make ptal-photod accessible to other computers on the network?

Add the ptal-photod -bindto or -bindtoall switch to the "init.photod.append+=" line in the device configuration file in /etc/ptal, but make sure you have an appropriate firewall set up to prevent access by untrusted clients. Then change /etc/mtools.conf or ~/.mtoolsrc to use something like file="other.machine.com:0" and try it out (this hasn't been tested as of the time of this writing).

Question: Do I really need to set "mtools_skip_check=1"?

The "mtools_skip_check=1" line is needed for photo cards formatted with certain digital cameras and relaxes some of mtools's sanity checks on the photo-card's file system. It's safe to remove it if it turns out you don't need it for your photo card(s).

Question: How do I format a brand-new photo card so mtools can access it?

It is recommended to format it using your digital camera if possible.

There is an mformat command which might work, but this has not been tested, so proceed with caution. If you do try it, then let us know on the hpoj-devel mailing list if it worked or not.

Problem: mtools -based photo-card access is slow.

Question: Why can't I just mount the photo card as a file system and use standard Unix file-manipulation commands?

That would require writing a non-portable kernel-mode block-device driver, which would be complicated by the fact that it would have to access a user-mode I/O protocol stack (libptal, ptal-mlcd, etc.).

There is also FUSD (Framework for User-Space Devices). Currently it only supports proxying of character devices. Once FUSD is able to proxy block devices, it may be possible to add FUSD support to ptal-photod and allow photo cards to be mounted as a file system.

It might be possibile to develop a kernel-mode block-device driver that implements the mtools "floppyd" client network protocol to talk to ptal-photod, assuming it's possible to use TCP/IP client sockets from kernel space.

On the other hand, if your device also provides a standard USB mass-storage interface, you can mount that as a file system.

Question: Are HP PhotoSmart cameras supported using mtools and ptal-photod?

No. Some PhotoSmart cameras work using a standard USB mass-storage interface, where you can mount the photo card as a file system. Others work using gPhoto, using a PTP (Picture Transfer Protocol) or other backend driver. Others may not work with Linux at all.

USB mass storage - specific issues

Problem: The mount command failed for my device with a USB mass-storage interface.

If the mount command fails, then try it again 2-3 more times.

If that doesn't help, try mounting the device node /dev/sda (without the "1") once, which will probably fail, and then go back to trying /dev/sda1 one more time.

Or on a system with devfs (a dynamic /dev file system) enabled, if all else fails look at the /dev/sd* device nodes, which are probably symlinks into the /dev/scsi tree, search through the /dev/scsi tree for part* (partition) block device nodes (possibly with a command such as "find /dev/scsi -type b"), and try mounting the appropriate block device there.

Question: My device has a USB mass-storage interface but is connected to a USB JetDirect print server. Can I somehow use the USB mass-storage interface over the network?

No. Try using the mtools method instead.

Next steps

Use the Back button on your browser to return to the previous document, or click here to return to the index.