I looked at the epcam code and picked out the commands I understood. Unfortunately, after staring at the epcam code, I'm stuck - it only seems to have support for webcam mode, not normal camera mode. Either that, or I missed it, which I think is more likely. I'll try contacting the author when I'm more coherent. In the meantime, can someone more experienced take a look and perhaps point out how you're supposed to be able to use epcam with cameras?
==
Warning: Long results section ahead. It's not at all interesting, but at least it makes sense. As I've not done anything like this before, simply getting consistent data makes me feel good.
Getting the camera info (mentioned in epcam_init) yields:
16 00 02 04 6a 31 00 05 00 04 03 00 00 00 01 00 01 00 03 02 08 00
This is a series of two-byte values, LSByte first.
value-by-value, referenced against user output in epcam, it turns into:
16 00: size of data (0x16 = 22 bytes)
02 04: camera ID (0x204 = 1026)
6a 31: revision (0x316a = 12650) - same as what you get when you hold shutter during power on
00 05: max width (0x500 = 1280)
00 04: max height (0x400 = 1024)
03 00: zoomcaps - anyone know what this refers to?
00 00: ISPcaps - anyone know what this refers to?
01 00: number of formats supported
01 00: 1st format: bayer
03 02: unused?
08 00: unused?
The bios version (mentioned in epcam_init) is 0x20
Getting the image info (mentioned in epcam_send_pict and epcam_recv_pict) yields:
20 00 82 06 00 00 00 01 90 01 00 00 48 00 00 7d
c4 09 82 06 00 00 00 00 96 00 00 00 82 06 0a 00
The only value mentioned in epcam is the second one, which is related to brightness. The first value is the size of data. Beyond this, I don't know what any of it means. I've taken 1 picture. When the camera was hooked up, it was face-down of the table.
Getting the capture info (mentioned in epcam_send_size) yields:
10 00 01 00 00 00 00 00 00 05 00 04 00 00 00 00
value-by-value, referenced against user output in epcam, it turns into:
10 00: size of data (0x10 = 16 bytes)
01 00: mode (bayer?)
00 00: x start - anyone know what this refers to?
00 00: y start - anyone know what this refers to?
00 05: width (0x500 = 1280)
00 04: height (0x400 = 1024)
00 00: frame rate
00 00: zoom
In epcam, x start and y start are set to be width/4 and height/4 (why, I'm not sure) and the modified capture info is then written back to the camera. I think.
This is as far as I got before realizing there only seemed to be references to streaming frames (ie webcam), not selecting and reading/streaming an image (camera). While a webcam would be useful, I'd probably have to do isochronous transfer without handy existing code to steal^H^H^H^H^Hlearn from. And I really want a camera, anyway.