• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D17-Dec-200217.6 KiB341281

MakefileH A D03-May-20221.8 KiB7652

READMEH A D17-Dec-20027.3 KiB190146

config.hH A D17-Dec-200265 32

exif.hH A D03-May-20224.7 KiB13078

exifparse.cH A D17-Dec-20025.4 KiB241191

hppsmtools.lsmH A D17-Dec-2002500 1413

psm.cH A D03-May-202221.3 KiB927765

psm.hH A D17-Dec-20021.9 KiB6148

psmdel.1H A D17-Dec-20021.7 KiB6058

psmdel.cH A D03-May-20223.9 KiB180157

psmdir.1H A D17-Dec-2002936 4342

psmdir.cH A D03-May-20223.9 KiB164147

psmget.1H A D17-Dec-20021.8 KiB7270

psmget.cH A D03-May-20225.3 KiB234210

psmsho.1H A D17-Dec-20021.2 KiB3837

psmsho.cH A D03-May-20222.4 KiB11496

README

1hppsmtools 0.99
2---------------
3
4hppsmtools is a program for communicating with the HP PhotoSmart
5and Konica Q-EZ digital cameras.  I've written it because I don't
6(and don't want to) have Windows and wanted to access the camera
7anyway.  Quite possibly it will work for you as well.
8
9In the meantime, of the order of 40 people have provided feedback
10about using this program, and most of them were happy with it.  I,
11on the other hand, was not when I got myself a notebook with a
12somewhat flaky serial port and so I gave the program an overhaul.
13Since I also had an chance to glimpse at the protocol docs, this
14program should be much better behaved than its predecessors.  In
15particular, doing a ^C should be safe in most cases.
16
17In January 2000, Jeff Schaller <schaller+psmget@southwind.net> did some
18good things to this program.  Among other things, he made it work with
19the PhotoSmart C30 and made the source look so pretty that I'm no longer
20exactly ashamed of it.  Later, he convinced me to split the binaries
21and do a big cleanup, and in the end did most of the work.  What you see
22now is the result of that effort.
23
24In December 2002, Brian Goines provided man pages for the four programs.
25Thanks, Brian.
26
27
28Installation
29------------
30
31You may want to change PREFIX (and ADDIT_DEFS if you are on a libc5
32system) in the Makefile, and/or config.h (see below) before compiling.
33
34Doing make will hopefully produce the binaries psmget, psmdir, psmdel,
35and psmsho, and make install will put them into $(PREFIX)/bin, the
36man pages will go to $(PREFIX)/man/man1.  That's it, nothing else gets
37dumped into your file system.
38
39Psmget does not have any configuration files.  However, if the environment
40variables PSM_BPS and/or PSM_PORT exist, it will use the values in there
41as the bitrate and the port used to talk to the camera.  Built-in defaults
42(defined in config.h in DEFAULT_PORT and DEFAULT_BITRATE, in case you want
43to change that) are 115200 and /dev/ttyS0, respectively.  Legal values
44for PSM_BPS are 19200, 38400, 57600, and 115200, PSM_PORT has to contain
45the full path to the device.
46
47
48
49Usage
50-----
51The following options are available in all four programs
52
53-p <port>       \ These two override the settings
54-r <bitrate>    / in PSM_PORT and PSM_BPS
55-t              sync the camera's clock with the host computer's
56-h              print a short help
57
58In addition, psmget and psmdir understand
59-n <string>     sets a prefix for the names of the files written
60                (For psmdir, the idea is that you can do
61                psmdir -n blabla > index.txt and then comment the
62                images with the proper names filled in)
63
64psmget and psmdel understand
65-i              the number in the parameter(s) are image ids as opposed to
66                image numbers.  Basically, you can ignore this option
67                unless you use psmsho, when you have to use -i with the
68                number psmsho returns.
69
70psmget understands
71-b              get thumBnails instead of full size images.  The file names
72                are then *.tbn.jpg.  If you have a better idea, tell me...
73
74psmsho understands
75-f              don't switch off the flash (once you switched off the flash,
76                it will remain off until you switch off the camera)
77
78psmdir understands
79-w              don't show directories, give some not so terribly interesting
80                numbers about the camera
81
82psmget {<number>}|all  reads the numbered picture and puts it to stdout
83  or to files <prefix><image id>.jpg if -n was given.  Thus,
84  psmget 1 >test.jpg
85  reads the first picture to the file test.jpg, whereas
86  psmget -n test 1 2
87  writes pictures 1 and 2 into the files test01.jpg and test02.jpg.
88  psmget -n today all
89  reads all pictures in the camera.
90
91psmdel {<number>}|all  deletes the given pictures
92
93psmdir prints a directory of the camera with dates (in the
94  rather odd form the camera gives them) and the image quality.
95
96psmsho instructs the camera to take a picture. By default, the flash
97  is turned off by this command.  You may try to do some kind of a
98  webcam with this command, I won't bet how long your flash card will
99  take this, though.  psmsho returns the image id of the picture just
100  taken (or -1 on failure, whatever your shell makes of that)
101
102You probably don't want to read the following two paragraphs.
103
104There is a catch -- when you communicate with psmget, you'll use image
105numbers, counting the images from 1 to the number of images consecutively.
106The camera, on the other hand, deals with image ids, numbers that are
107usually identical with the image numbers but may differ when you have
108deleted images.
109
110Now, the hppsmtools try to hide these image ids from you, but psmsho
111returns an image id (because I couldn't find an easy way to find an image
112number from an image id), and therefore the dreaded -i option exists.
113Also, just to confuse you, the image ids are displayed in the download
114messages generated by psmget, and of course they are in the exif headers.
115
116Your probably want to forget the last two paragraphs.
117
118
119Examples
120--------
121
122Get all images in the cameras, naming them mypic1.jpg through mypicnn.jpg:
123psmget -n mypic all
124
125Get image 15 and write it to file gronk.jpg:
126psmget 15 > gronk.jpg     or      psmget -n gronk 15
127(actually, the second form will write to gronk15.jpg)
128
129Take a picture and write it to test.jpg (in (t)csh):
130psmsho; psmget -i $status > test.jpg
131the same, only delete the image after the fact
132psmsho; set tmpvar=$status; psmget -i $tmpvar; psmdel -i $tmpvar
133(notice the i)
134
135Look at the directory of the flash card and set the time while being at it:
136psmdir -t
137
138Look at the directory with the names that the a psmget -n would store
139the pics in filled in:
140psmdir -n mypic
141
142
143If it doesn't work
144------------------
145Check the permissions on the device the camera is attached to and all the
146usual things.  If you may read and write to it, it's serious and you
147should really contact me.  Which you should do anyway, or else this
148program will always only do what *I* need and will always be the mess
149it is now.
150
151If it works
152-----------
153Please contact me anyway.
154
155Non-Legalese
156------------
157Since it looks like this program is almost serious, I decided to go
158for a serious license: the GPL.  If you want to lift the exif stuff,
159do so, I won't sue you even if it ends up in a closed-source thing.
160Otherwise, read COPYING.
161
162I did not re-engineer or disassemble programs from either HP or Konica
163to write this program (quite obviously).  All the information that went
164into the program come entirely from watching the camera and the software
165HP bundles with the camera talk to each other (and from a glimpse I was
166allowed to take at the HP's docs).
167
168To-Do
169-----
170Probably still a lot. I'll have to look into portability issues.  Wishes
171may be directed to me and will probably be encouraging.  Bug reports, too.
172If you send in bug reports, core dumps or debug logs (set MASTERDEBUG in
173psmget.c to 1, recompile, catch stderr into a file, and send it to me),
174even strace logs will be helpful.
175
176The compression ratios for the C-30 are *very* weird indeed.  I doubt
177that this is correct, and if so, than HP's (or whomever's) engineers have
178messed up royally.  Any tips on where the errors are is greatly appreciated.
179
180Updates
181-------
182Check out http://unimut.fsk.uni-heidelberg.de/demi/photosmart
183
184Contacting me
185-------------
186Write an E-mail to
187msdemlei@users.sf.net
188
189Dec 2002
190